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

Correct test for Galileo capability #6434

Merged
merged 3 commits into from
Dec 21, 2020
Merged

Conversation

stronnag
Copy link
Collaborator

@stronnag stronnag commented Dec 20, 2020

@Mateyhv discovered that if one has a BN220 based on ublox-8 rather than Ublox M8N, then:

  • The versions are (HW [00080000] SW[3.01]) are the same
  • The ublox-8 does not have flash
  • The ublox-8 does NOT support Galileo

This can result in erroneously reserving channel slots that cannot be used as the device passes the HW/SW test.
See https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29.pdf page 5

This PR changes the test to explicitly test the version extensions for "GAL"; it may also be considered to be a corner case to far.

// after hw + sw vers; each is 30 bytes, ensure NUL terminated
for(int j = 40; j < _payload_length; j += 30) {
_buffer.bytes[j+29] = 0;
if (strstr((const char *)(_buffer.bytes+j), "GAL")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to use strnstr here and avoid adding the \0 terminator?

@stronnag stronnag merged commit a15993c into master Dec 21, 2020
@stronnag stronnag deleted the jh_improve_galileo_test branch December 21, 2020 12:41
@stronnag stronnag added this to the 2.7 milestone Dec 21, 2020
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

Successfully merging this pull request may close these issues.

2 participants