Repository navigation
fix: answer UBX MON-HW and CFG-CFG during ublox init - #11
Merged
Merged
Conversation
linuxptp-daemon's ublox initialization polls MON-HW and then sends CFG-CFG (SAVE), waiting for both. The mock only handled MON-VER and CFG-MSG/CFG-VALSET, so GNSS monitoring never started and T-GM stayed at clock class 6 instead of entering holdover (CC7) with gnss-sim. Reply with a valid MON-HW payload and ACK CFG-CFG. Extend the UBX test script with both cases, fix its lsmod pipefail check, and drain buffered NAV frames before sampling fix state.
Merged
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
linuxptp-daemon initializes its GNSS monitor through ubxtool. Its init sequence polls
UBX-MON-HWand then sendsCFG-CFG(ubxtool-p SAVE), waiting for a response to both. The mock only answeredMON-VERand ACKedCFG-MSG/CFG-VALSET, soublox.NewUbloxtimed out:It retried forever, no GNSS data ever reached the GM state machine,
isSourceLost()stayed false, and a T-GM with gnss-sim never left clock class 6 (no holdover/CC7).Fix
UBX-MON-HW(0x0A/0x09) poll with a well-formed 60-byte payload (healthy aStatus/aPower).UBX-CFG-CFG(0x06/0x09) withUBX-ACK-ACK.NAV-STATUS/NAV-CLOCK polling, periodic NAV emission on open, and CFG-VALSET ACKs were already present.
Testing
makebuilds cleanly for 6.17.0-40-generic.{06 09}, CFG-VALSET ACK, NAV-STATUS with gpsFix 3.scripts/test-gnss-ubx.shwith MON-HW (payload length) and CFG-CFG SAVE ACK cases; also fixed itslsmod | grep -qcheck underpipefailand made NAV sampling drain buffered frames first. Suite passes 45/46; the remaining GGA case is only affected when a gnss-sim instance is concurrently writing to the same /dev/gnss node.