thinknode_m6: don't drive GPS REINIT pin so the L76K is detected - #2863
Conversation
The M6's L76K GPS streams NMEA at 9600 baud on its own, but the firmware reported no GPS. Root cause: pin 29 (PIN_GPS_RESET / the module's REINIT line) was driven HIGH, which holds the L76K silent so it never emits any sentences and detection fails. variant.cpp drove pin 29 HIGH at boot, and because PIN_GPS_RESET was defined, MicroNMEALocationProvider also drove it HIGH in begin(). Bench testing on a sealed M6 (passive NMEA capture, no logic analyzer) confirmed: pin 29 driven HIGH = 0 bytes; pin 29 floating = full NMEA stream. Define GPS_RESET (-1) so the location provider never touches pin 29, and stop driving it in initVariant. This matches the Meshtastic M6 variant, which leaves the same pin as a floating input.
|
Likely the same bug on the ThinkNode M3 (#1864). For a maintainer with M3 hardware:
If that reproduces on an M3, the same one-line fix should apply: stop driving pin 25 / set |
| #define PIN_GPS_RESET (29) // REINIT - must FLOAT; driving it (esp. HIGH) silences the L76K | ||
| // The M6's L76K streams NMEA on its own and must not have its REINIT pin driven. | ||
| // Tell the location provider there is no reset pin so it never touches pin 29 | ||
| // (driving it HIGH holds the module silent). Matches Meshtastic, which leaves |
There was a problem hiding this comment.
I suggest to remove the comment "Matches Meshtastic, which leaves
// this pin as an input. See variant.cpp (pin 29 is intentionally not configured)." to make the code "neutral".
Let me test the PR.
Seems good.
|
Yeah, this PR is confirmed working. |
|
I'm quite sure gps was working when I did the port Unfortunately I don't have my unit here to do the test (stayed in France with my brother, I didn't want to carry items with batteries in my luggage) So everyone confirm gps was not working and now works ... would be ok for me I think |
|
@fdlamotte Likely due to variants with NO PULL vs. PULLUP resistor. |
|
ThinkNode M6 / repeater 1.17.0 The #2863 REINIT fix is present and GPS has successfully obtained However, the GPS can later enter a persistent state: gps Observed for hours. The following did NOT recover it:
The GPS antenna and hardware configuration were unchanged from the This suggests an intermittent GPS/UART/module state remains possible |
Problem
On the ThinkNode M6, the L76K GPS was never detected — the companion app reported "no GPS / not supported", and on-device the GPS stayed at
sat 0. The same sealed unit's GPS works fine under Meshtastic, so the hardware is good.Root cause
Pin 29 (
PIN_GPS_RESET, which is the module's REINIT line on this board) was being driven HIGH, which holds the L76K silent — it never emits any NMEA, so detection (Serial1.available()) sees zero bytes and the GPS setting is hidden.It was driven HIGH in two places:
variants/thinknode_m6/variant.cppinitVariant()drove it HIGH at boot.PIN_GPS_RESETwas defined,MicroNMEALocationProvider::begin()also drove it HIGH (GPS_RESET= 29,GPS_RESET_FORCE= LOW, sobegin()writes!LOW= HIGH).The Meshtastic M6 variant leaves this exact pin as a floating input and never drives it — which is why GPS works there.
Verification (no logic analyzer; M6 is a sealed unit)
A standalone sketch powered the GPS and passively captured NMEA at 9600 baud while changing one variable at a time:
$GNGGA/$GNRMC/$GNGSA/$GNGSV)An EN power-cycle was tried as well and made no difference — floating pin 29 alone is sufficient.
The GPS streams standard NMEA at 9600 by default and needs no
$PCAS/config commands.Fix
variant.h: defineGPS_RESET (-1)so the location provider never touches pin 29.variant.cpp: stop driving pin 29; leave it floating.This matches the Meshtastic M6 variant. Confirmed on hardware: GPS is now detected and the app shows live coordinates, altitude, and map position.
Fixes #2862.
Note for maintainers
The same pattern may affect other Elecrow ThinkNode boards whose reset pin is labeled "REINIT" — notably the M3 (
variant.hhasPIN_GPS_RESET (25) // REINIT), which has a matching open report (#1864). I don't have M3 hardware to verify, so it's intentionally left out of this PR.