Skip to content

rak: keep WB_IO2 driven HIGH after a failed RAK12500 probe - #3834

Open
marcelverdult wants to merge 1 commit into
meshcore-dev:devfrom
marcelverdult:upstream-candidate/rak-wb-io2-gps-rail
Open

marcelverdult wants to merge 1 commit into
meshcore-dev:devfrom
marcelverdult:upstream-candidate/rak-wb-io2-gps-rail

Conversation

@marcelverdult

Copy link
Copy Markdown
Contributor

Fixes #3830.

When no RAK12500 answers on WB_IO2, RakI2cGpsDriver::probeRak12500() set the pin back to an input. WB_IO2 switches the 3V3_S slot rail, and that rail also powers a serial GPS. A base board that pulls this line low cuts the serial GPS right after detection, so it never gets a fix. This matches what @marineam measured on the Pocket V3 from df5a768 on.

Before df5a768 the pin stayed HIGH after a failed probe (gpsIsAwake() returned on Serial1.available() without touching it). This change keeps WB_IO2 driven HIGH after a failed probe. WB_IO4 and WB_IO5 still go back to inputs. Ethernet builds skip the WB_IO2 probe as before, and RAK3401 builds do not touch the pins.

With GPS_RAIL_POWER_CONTROL the serial driver claims the rail before the probe. The pin now stays HIGH, which matches that claim, so gps off and periodic mode can switch it LOW again.

Not changed: in the default build the serial GPS has no power pin, so gps off does not cut its power. On the V3 the GPS stays powered all the time, as it did before df5a768.

Tested:

  • Builds: RAK_4631_companion_radio_ble, RAK_4631_repeater_gps_power, RAK_4631_repeater_ethernet, RAK_3401_companion_radio_ble, GAT562_30S_Mesh_Kit_repeater
  • Not tested on hardware. I have no Pocket V3, so a test there would be welcome.

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 (meshcore-dev#3830). Before df5a768 the pin stayed
HIGH, so keep it driven HIGH again. WB_IO4 and WB_IO5 still go back to
inputs.
@fdlamotte

Copy link
Copy Markdown
Collaborator

Thanks @marcelverdult

Let's wait for some hw test ... (would be good to have v2 and v3 results on that one if possible)

@marineam

Copy link
Copy Markdown

Thanks! This does indeed restore the previous behavior for me. I've built and tested this on V2 and V3:
V2: still powers off and on and gets a fix
V3: back to always powered on and can get a fix when toggled "on" in MeshCore

@marineam

Copy link
Copy Markdown

I noticed this PR duplicates #3818 though this one includes a handy comment that the other does not.

This branch has not been deployed

No deployments
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.

3 participants