SABM and SABME swapped in frame.py
vk2tds opened this issue · 1 comments
In the file frame.py, SABM and SABME classes have their modifiers swapped. The correct values should be :-
Class AX25SetAsyncBalancedModeExtendedFrame should have a modifier of MODIFIER = 0b01101111
Class AX25SetAsyncBalancedModeFrame should have a modifier of MODIFIER = 0b00101111
It also appears that the P/F flag needs more investigation, and should possibly be set. The basis for this is that my PicoPacket TNC with 1996 firmware has the P/F bit set. In my case, the picopacket is using 0x3f as the value for SABM.
I suspect that existing code uses a mask to ignore the p/f bit.
Following your code, you could ADD these MODIFIER = 0b01101111 and MODIFIER = 0b00101111 respectively for SABME and SABM.
So, I had a look… indeed, the AX25BaseUnnumberedFrame
class defaults to PF=False
, but we can override this in sub-classes.
However, the constructor for AX25BaseUnnumberedFrame
was omitting passing pf
to the superclass. Thus every U frame generated had PF=False
regardless. Oops. :-)
I've now corrected this in the branch. Many thanks for spotting these omissions. There might be other U-frames where PF
should be set True
instead of the current default… we'll play those by ear I guess. :-)