thinknode_m6: don't drive GPS REINIT pin so the L76K is detected#2863
Open
benskigomez wants to merge 1 commit into
Open
thinknode_m6: don't drive GPS REINIT pin so the L76K is detected#2863benskigomez wants to merge 1 commit into
benskigomez wants to merge 1 commit into
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.
Author
|
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 |
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.
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.