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

pymultimonaprs corrupts packets by re-encoding #40

Open
hessu opened this issue May 30, 2020 · 0 comments
Open

pymultimonaprs corrupts packets by re-encoding #40

hessu opened this issue May 30, 2020 · 0 comments

Comments

@hessu
Copy link

hessu commented May 30, 2020

pymultimonaprs makes the assumption that all packets could be decoded or encoded as ISO-8859-1 printable strings, and decodes and subsequently re-encodes them as such. In reality a lot of packets contain binary byte sequences which cannot be correctly decoded or encoded as such. Many packets also contain substrings (such as APRS text message content) which are UTF-8 encoded, but other encodings are also widely used.

Encoding and re-encoding will often fail and cause packet data corruption, and modified duplicated packets as other igates will pass these packets without corrupting them. APRS packets in transit on the network must be processed as binary byte arrays, not strings of some specific encoding.

tnc2_frame = tnc2_frame.decode('ISO-8859-1')

tnc2 = tnc2.encode('ISO-8859-1')

See this implementation hint for more info:

https://github.com/hessu/aprsc/blob/master/doc/IGATE-HINTS.md#packets-getting-modified-due-to-character-encoding-issues

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