Conversation
GPS was hardcoded to /dev/ttyS0, which is where the AIO V2 board exposes it on CM4-based uConsoles. CM5-based units expose the same UART at /dev/ttyAMA0, so GPS silently never worked there. - Auto-detection now probes /dev/ttyS0 then /dev/ttyAMA0. - The port can be pinned explicitly via Settings > GPS Device or the MESHCORE_GPS_DEVICE env var, which wins over both auto-detection and gpsd — needed when gpsd is running but bound to the wrong device, the case reported in #82. - An explicit device is accepted even if the node is absent at startup (e.g. a USB GPS plugged in later); start() surfaces the open error. - Changing the setting rebuilds the provider in place, so it takes effect without restarting the app. The GPS provider is now built after the settings load rather than before, since it needs the configured path. Based on the patch contributed by @educationalpurposes in #81. Closes #82 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Fixes #82. Split out of #87 — the contributed patch bundled both issues into one commit.
Problem
GPS was hardcoded to
/dev/ttyS0, which is where the AIO V2 board exposes it on CM4-based uConsoles. CM5-based units expose the same UART at/dev/ttyAMA0, so GPS silently never worked there.Fix
/dev/ttyS0then/dev/ttyAMA0.MESHCORE_GPS_DEVICEenv var, which wins over both auto-detection and gpsd — needed when gpsd is running but bound to the wrong device, the case reported in the issue.start()surfaces the open error rather than falling back silently.The GPS provider is now constructed after the settings load rather than before, since it needs the configured path.
Credit
Based on the patch contributed by @educationalpurposes in #81. Unmodified apart from the split, a
MESHCORE_GPS_DEVICEentry in the AGENTS.md env var table, and a comment tidy.Verification
uv run pytest: 101 passed, 1 skipped.ruff check/ruff format --checkclean. Not tested on CM5 hardware — I don't have a unit; the reporter confirmed the change fixes it for them.🤖 Generated with Claude Code