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

Null Ascii Characters in delta #3

Open
mxtommy opened this issue Jun 18, 2018 · 0 comments
Open

Null Ascii Characters in delta #3

mxtommy opened this issue Jun 18, 2018 · 0 comments

Comments

@mxtommy
Copy link

mxtommy commented Jun 18, 2018

Hi!

Started using the iKommunicate this past week and ran into an issue. I have a B&G v50 VHF connected to the network, however the delta's from the iKommunicate for this device contain null ascii characters in the JSON, which causes parsing issues.

This is an example of the full delta.

{"context": "vessels.urn:mrn:imo:mmsi:316033892","updates":[{"source":{"type": "NMEA2000","src": "000","pgn": 129799,"label": "N2000-01.000"},"timestamp": "2010-01-01T12:35:32Z","values":[{"path": "communications.radio.rxFrequency","value": 157100000.000000},{"path": "communications.radio.txFrequency","value": 157100000.000000},{"path": "communications.radio.txPower","value": 1.000000},{"path": "communications.radio.bandwidth","value": 0.000000},{"path": "communications.radio.channel","value": "22"}]}]}

The radio.channel value is 22 followed by a some non-ascii bytes (they don't show up but they're there)

I did a packet capture and got the following directly from the packet. This is the last few bytes of the delta, run it through a hex to ascii thing like https://www.rapidtables.com/convert/number/hex-to-ascii.html and you can see.

2c:22:76:61:6c:75:65:22:3a:20:22:32:32:00:00:00:00:22:7d:5d:7d:5d:7d

You can see the 4 "00"'s there that are causing the issue. This causes the entire delta to be dropped as the json can't be parsed.

Thanks!

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