Test GPS messages from a TOML file using satpulsetool
Test GPS configuration messages and report verification results. This skill runs as an agent and returns a verification report.
Extract the following from the user's request or conversation context:
configs/gpsmsg/allystar.toml)/dev/ttyUSB0)115200)TAU1201)pps, nmea-rmc)If any required information is missing, ask the user before proceeding.
Ensure the tool is built:
make
Determine architecture and set ARCH variable:
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
The satpulsetool binary is at: out/$ARCH/satpulsetool
You MUST follow this workflow for EACH tag tested:
DO NOT test multiple tags and then add comments later. Add the comment right after each successful test.
Check satpulsetool output for acknowledgment:
OK in response (e.g., $PQTMCFGPPS,OK*xx)After setting a value, query it back and confirm it matches.
Check if a corresponding get-* tag exists:
out/$ARCH/satpulsetool gps -d $DEV -s $SPEED -m $MSGFILE --show-tags
If get-$TAG exists (e.g., get-pps for pps), query and verify:
out/$ARCH/satpulsetool gps -d $DEV -s $SPEED -m $MSGFILE -t get-$TAG --packet-log get.jsonl
Parse the response and compare to expected values:
payload.typespayload.types field to decode the payload (e.g., U4I4U1 means: unsigned 4-byte, signed 4-byte, unsigned 1-byte)U1/U2/U4 = unsigned 1/2/4 bytes, I1/I2/I4 = signed, X1/X2/X4 = hex/bitfieldpayload.values from the set commandThe configuration change produces a measurable effect. See verification strategy references below for details on each message type.
For each tag, follow these steps IN ORDER:
Send the command and check for ACK:
out/$ARCH/satpulsetool gps -d $DEV -s $SPEED -m $MSGFILE -t $TAG --packet-log test.jsonl
Query configuration if a get command exists (Level 2)
Verify observable effect using the appropriate strategy (Level 3)
IMMEDIATELY add verification comments to the TOML file (unless --no-comment specified)
Report results to user before moving to next tag
Choose the appropriate strategy based on the tag being tested:
| Tag Pattern | Strategy | Reference |
|---|---|---|
nmea-ver-* | NMEA version | verification/nmea-version.md |
nmea-*, binary-*, rtcm-* | Message enable/disable | verification/message-enable-disable.md |
gnss-* | Constellation selection | verification/constellation-selection.md |
pps, pps-off | PPS configuration | verification/pps.md |
reload | Reload configuration | verification/reload.md |
save | Save configuration | verification/save.md |
reset | Reset/reboot | verification/reset.md |
factory-reset | Factory reset | verification/factory-reset.md |
survey | Survey-in | verification/survey.md |
speed-* | Baud rate changes | verification/speed.md |
Packet logs are JSONL with one JSON object per line. Key fields:
t - timestamp (ISO 8601)tag - protocol type: NMEA, ASBIN, UBX, CASBIN, RTCM, etc.msg - specific message type: GPGGA, GPRMC, MON-VER, etc.out - direction: true = sent to receiver, false = received from receiverascii - for NMEA: the raw sentencebin - for binary: hex-encoded payloadAfter testing, add verification comments to the TOML file (unless --no-comment was specified). Find the [[messages]] section for the tested tag and add comments directly above it.
Use one line per verification performed, always including the receiver model:
Successful verification:
# Verified ACK received on TAU1201
# Verified RMC sentences appear in capture after enable on TAU1201
[[messages]]
tags = ["nmea-rmc"]
Query verification (Level 2):
# Verified ACK received on TAU1201
# Verified get-pps returns expected values on TAU1201
[[messages]]
tags = ["pps"]
Observable effect verification (Level 3):
# Verified ACK received on TAU1201
# Verified GPRMC messages appear in capture after enable on TAU1201
[[messages]]
tags = ["nmea-rmc"]
Feature not supported:
# NAK received on TAU1201 - survey mode not supported on this receiver
[[messages]]
tags = ["survey"]
Verification requires manual steps:
# Verified ACK received on TAU1201
# Note: PPS output effect requires manual verification with oscilloscope
[[messages]]
tags = ["pps"]
Choose phrases based on what was verified:
| Verification Type | Comment Format |
|---|---|
| ACK received | Verified ACK received on [MODEL] |
| Message appears | Verified [MSG] messages appear in capture after enable on [MODEL] |
| Message stops | Verified [MSG] messages no longer appear after disable on [MODEL] |
| Query matches | Verified get-[TAG] returns expected values on [MODEL] |
| Config persists | Verified save persists configuration across reload on [MODEL] |
| Config restores | Verified reload restores saved configuration on [MODEL] |
| Reset works | Verified reset causes receiver to restart on [MODEL] |
| Survey starts | Verified survey starts and status shows in progress on [MODEL] |
| Constellation | Verified GSV shows only [CONST] satellites after [TAG] on [MODEL] |
| Baud change (UART) | Verified communication works at new baud rate on [MODEL] |
| Baud change (USB) | ACK received but baud rate change cannot be verified on USB CDC device |
| Not supported | NAK received on [MODEL] - [feature] not supported on this receiver |
| Manual needed | Note: [feature] requires manual verification with [equipment] |
Return a verification report:
Receiver: [MODEL]
Verification comments for TOML:
# Verified ACK received on [MODEL]
# Verified [specific verification] on [MODEL]
[Any notes about manual verification needed]
Ask user before testing:
save - modifies persistent statefactory-reset - loses all configurationspeed-* below 38400 - may cause bandwidth issuesls -la $DEVdialout groupfuser $DEV