From 7f7512d94ca975c5c11d2dd3debc45204d0e911b Mon Sep 17 00:00:00 2001 From: Marcel Verdult <37555613+marcelverdult@users.noreply.github.com> Date: Sat, 14 Nov 2026 13:13:08 +0100 Subject: [PATCH] rak: keep WB_IO2 driven HIGH after a failed RAK12500 probe (#3834) The I2C probe left WB_IO2 as an input when no RAK12500 answered. WB_IO2 switches the 3V3_S slot rail, which also powers a serial GPS. On base boards that pull this line low, the serial GPS lost power right after detection and never got a fix (#3830). Before df5a768c the pin stayed HIGH, so keep it driven HIGH again. WB_IO4 and WB_IO5 still go back to inputs. --- src/helpers/sensors/RakI2cGpsDriver.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/helpers/sensors/RakI2cGpsDriver.h b/src/helpers/sensors/RakI2cGpsDriver.h index ac76e0692..74327c6a2 100644 --- a/src/helpers/sensors/RakI2cGpsDriver.h +++ b/src/helpers/sensors/RakI2cGpsDriver.h @@ -41,7 +41,15 @@ class RakI2cGpsDriver : public GpsDriver { } #ifndef RAK_3401 - pinMode(powerPin, INPUT); + if (powerPin == WB_IO2) { + // WB_IO2 switches the 3V3_S slot rail, which also powers a serial GPS and the other + // slot modules. Left as an input, the rail follows whatever the base board pulls it + // to: some keep it on, others switch it off, and the serial GPS loses power (#3830). + // Keep it driven HIGH, as before the probe; a GPS power pin re-claims it later. + digitalWrite(powerPin, HIGH); + } else { + pinMode(powerPin, INPUT); + } #endif return false; }