Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with 2-digit APRS SSID Suffixes #2

Open
mfhepp opened this issue Oct 27, 2016 · 3 comments
Open

Bug with 2-digit APRS SSID Suffixes #2

mfhepp opened this issue Oct 27, 2016 · 3 comments

Comments

@mfhepp
Copy link

mfhepp commented Oct 27, 2016

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
Copy link
Author

mfhepp commented Oct 27, 2016

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

@mfhepp
Copy link
Author

mfhepp commented Oct 27, 2016

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
Copy link
Author

mfhepp commented Oct 27, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant