Skip to content

thinknode_m6: don't drive GPS REINIT pin so the L76K is detected#2863

Open
benskigomez wants to merge 1 commit into
meshcore-dev:devfrom
benskigomez:fix/m6-gps-reset-pin
Open

thinknode_m6: don't drive GPS REINIT pin so the L76K is detected#2863
benskigomez wants to merge 1 commit into
meshcore-dev:devfrom
benskigomez:fix/m6-gps-reset-pin

Conversation

@benskigomez

Copy link
Copy Markdown

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.cpp initVariant() drove it HIGH at boot.
  • Because PIN_GPS_RESET was defined, MicroNMEALocationProvider::begin() also drove it HIGH (GPS_RESET = 29, GPS_RESET_FORCE = LOW, so begin() 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:

pin 29 state result
driven HIGH (current firmware) 0 bytes
left floating (INPUT) full NMEA stream ($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: define GPS_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.h has PIN_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.

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.
@benskigomez

Copy link
Copy Markdown
Author

Likely the same bug on the ThinkNode M3 (#1864). For a maintainer with M3 hardware:

variants/thinknode_m3/variant.h has #define PIN_GPS_RESET (25) // REINIT (note the same "REINIT" labelling as the M6), and variant.cpp sets it as an OUTPUT. As on the M6, MicroNMEALocationProvider::begin() then drives that pin HIGH, which on the M6 is exactly what held the L76K silent. The open issue #1864 ("thinknode m3 doesnt have gps") matches the M6 symptom.

If that reproduces on an M3, the same one-line fix should apply: stop driving pin 25 / set GPS_RESET (-1) so the provider leaves it floating. I don't have an M3 to verify, so I've left it out of this PR.

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