Skip to content

muzi_base: fix GPS UART pins and re-enable ATGM336H NMEA output - #1

Merged
fdlamotte merged 1 commit into
fdlamotte:gps_refactorfrom
nGoline:gps_refactor-muzi
Nov 4, 2026
Merged

fdlamotte merged 1 commit into
fdlamotte:gps_refactorfrom
nGoline:gps_refactor-muzi

Conversation

@nGoline

@nGoline nGoline commented Nov 4, 2026

Copy link
Copy Markdown

Muzi Base fixes on top of meshcore-dev#3753, tested on a Muzi Base Uno + SuperIO (muzi_base_uno_superIO_companion_radio_ble).

GPS UART pins

With meshcore-dev#3753 as-is, the GPS powers on but no bytes are received at all (ub:0). The refactor dropped Serial1.setPins(PIN_GPS_TX, PIN_GPS_RX) on nRF52, so Serial1 now uses PIN_SERIAL1_RX/TX from variant.h, and those were swapped: the GPS transmits on P0.20, which must be PIN_SERIAL1_RX (it matches the Meshtastic muzi_base variant). On main the setPins() call happened to swap them back.

This fixes PIN_SERIAL1_RX/TX and defines PIN_GPS_TX/RX from the gps module's side (PIN_GPS_TX = PIN_SERIAL1_RX), like wio-tracker-l1.

ATGM336H NMEA output

The SuperIO's GPS is an ATGM336H (CASIC AT6558). It keeps its NMEA output config across power cycles, and Meshtastic's probe sends $PCAS03,0,… (all sentences off) before re-enabling GGA/RMC. A module in that state sends only its boot banner, then nothing (details in meshcore-dev#3760). MuziBaseSensorManager::loop() now sends $PCAS03 enabling GGA + RMC 1 s after each power-up, detected from isActive(), so it covers the switch, the UI/app toggle and periodic wakeups. It doesn't block.

This could move into NmeaGpsDriver if other CASIC boards need it; I kept it in the variant so it doesn't change the driver interface.

Tested

  • Boot with switch in middle: GPS off (en:0).
  • Boot with switch up: GPS on, GGA + RMC every second.
  • Switch up → middle → up while running: power off, then back on, and data resumes.
  • UI toggle: gps off(sw) and power off, then gps on and data resumes.
  • Fix with 8 satellites.
  • Builds: muzi_base_{uno,duo}_superIO_companion_radio_ble, muzi_base_uno_companion_radio_ble, muzi_base_uno_repeater.

Note: on my unit the switch's top position is GPS on (P0.12 HIGH); middle and bottom are off.

🤖 Generated with Claude Code

The refactor no longer calls Serial1.setPins() on nRF52, so Serial1 uses
PIN_SERIAL1_RX/TX directly. Those were swapped (the GPS transmits on
P0.20), so no data was received. Fix them and define PIN_GPS_TX/RX by the
gps module's side, as other variants do.

The ATGM336H keeps its NMEA output config across power cycles, and other
firmware may leave every sentence disabled. Re-enable GGA + RMC after each
power-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fdlamotte

Copy link
Copy Markdown
Owner

Thank you, that's nice to have some feedback for this device, as I saw there were some quirks here ;)

@fdlamotte
fdlamotte merged commit 3800d18 into fdlamotte:gps_refactor Nov 4, 2026
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