Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Long UBX packet may be lost as checksum failed. #55

Merged
merged 1 commit into from
Dec 23, 2019
Merged

Long UBX packet may be lost as checksum failed. #55

merged 1 commit into from
Dec 23, 2019

Conversation

mayopan
Copy link

@mayopan mayopan commented Dec 20, 2019

It's first time to pull request on github for me.

When I use NEO-M8N module, and run the example #7 "GetProtcolVersion",
the version is shown as "0.0" instead of "18.0".

After straggling debug, I found the ubxFrameCounter is overflowed and rolling checksums are not correct.

When MON-VER is sent, NEO-M8N returns 260bytes UBX frame : 8bytes header, 250 bytes payload (40bytes soft/hard version and 7 x 30bytes extensions), and 2bytes checksums.
The default ubxFrameCounter is defined as uint8_t, so it counts till 255 and rollovers to 0 and checksums are reset.

I modified type of ubxFrameCounter from uint8_t to uint16_t.
It works fine!

@nseidle
Copy link
Member

nseidle commented Dec 23, 2019

Thanks! Welcome to your first PR.

I don't think the ubxFrameCounter has to do with the protocol version coming back corrupt. The getProtocolVersion() method is pretty fragile and if any comm goes wrong, the value gets corrupt. I'll accept this PR because I think the ubxFrameCounter should be uint16_t but I have more work to do on the getProtocolVersion problem.

@nseidle nseidle merged commit 440ef4f into sparkfun:master Dec 23, 2019
@mayopan mayopan deleted the LargerUBXFrameCounter branch December 25, 2019 16:32
@mayopan mayopan mentioned this pull request Dec 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants