From a1cef4f3b8a702956f6c36f2eeb647927390bff4 Mon Sep 17 00:00:00 2001 From: Marcel Verdult Date: Fri, 13 Nov 2026 12:48:39 +0100 Subject: [PATCH] rak: keep WB_IO2 driven HIGH after a failed RAK12500 probe 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 ac76e069297..74327c6a2fe 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; }