afsk icon indicating copy to clipboard operation
afsk copied to clipboard

Bug with 2-digit APRS SSID Suffixes

Open mfhepp opened this issue 9 years ago • 3 comments

Hi, this is a great piece of work! Unfortunately it does not accept APRS-SSIDs with more than one digit for the suffice (like -11 for a balloon).

The fix is simple AFAIK:

Change line 114 in ax25.py to

 assert(len(ssid) <= 2)

mfhepp avatar Oct 27 '16 20:10 mfhepp

It seems not that simple :-( Now, the resulting packets cannot be properly decoded.

mfhepp avatar Oct 27 '16 20:10 mfhepp

I seem to understand the problem: The SSID seems to be encoded as 4 Bits in the resulting AX.25 sequence of octets. So somewhere in the code, the string of a one-digit SSID is being translated in the respective bit pattern. But I did not find out where :-(

If you an ASCII character beyond the numbers, you can actually get the proper pattern. For instance, -K will actually produce -11 for a balloon as a temporary fix. But it would really be very nice to fix this issue, for APRS defines up to 16 SSIDs.

Thanks in advance!

mfhepp avatar Oct 27 '16 21:10 mfhepp

Ok, now I have a solution that should work reliably:

Insert the following at line 113 of ax25.py:

if 10 <= int(ssid) <= 15:
    ssid = chr(ord(ssid[1])+10)

That will translate the SSIDs 10 - 15 to a character that will later be properly converted into the 4-bit representation of these SSIDs.

@casebeer It would be great if you could add this fix to the release.

73s

Martin

mfhepp avatar Oct 27 '16 22:10 mfhepp