Skip to content

RAK4631 on Pocket V3: GPS power broken #3830

Open

Description

@marineam

As of 87c76a8 RAK4631 builds work on the new Pocket V3 but battery life is shorter than expected. It appears the GPS remains powered when MeshCore indicates that it is off. To complicate things further, on the latest dev version ( bb87031 ) the situation is flipped: based on power draw it looks like GPS is always off, even when MeshCore indicates it is on. I bisected the flip in behavior to:

5533c24: last commit where GPS is apparently always powered and gets a fix when turned "on"
df5a768: starting here GPS is apparently never powered and never gets a fix

On a traditional RAK4631 (Pocket V2) the GPS works normally through all of these commits.

Activity

  1. marineam commented on Nov 12, 2026

    @marineam
    Author

    For reference PR #3753 is where the change in behavior was introduced.

    Also worth noting, the Pocket V3 uses a single integrated PCB rather than attaching a RAK4631 module to a base board like the Pocket V2 did. For all I know continuing to consider the V3 a 4631 is inappropriate.

  2. fdlamotte commented on Nov 13, 2026

    @fdlamotte
    Collaborator

    Thanks for reporting, will try to dig into this

    Note that without having the unit it's not easy to work on this kind of problems ... the commit you pointed to is big and the first of the PR, so the issue might come from a lot of factor

    The best I could do is get one of these devices, but they don't come cheap (maybe that's why until now nobody came with the issue as I was asking for help ;) )

    edit: and thanks for confirming that the gps works in pocket v2 ;)

    I see pocket v3 in rokland store, but not in rakwireless (was quickly seeking for documentation on the board, will try harder)

  3. marcelverdult commented on Nov 13, 2026

    @marcelverdult
    Contributor

    I looked at the code path for the serial GPS on RAK4631 builds, and both observations fit one change in how the power pins are left after detection.

    Before df5a768 (EnvironmentSensorManager::gpsIsAwake): WB_IO2 is driven LOW, then HIGH. The RAK12500 I2C probe fails, Serial1.available() is true, and the function returns without touching the pin again. WB_IO2 stays HIGH. For the serial GPS, gpsResetPin is set to PIN_GPS_EN, which is -1 in variants/rak4631/platformio.ini, so stop_gps() never switches anything. Result: the GPS is powered all the time, whatever MeshCore shows.

    From df5a768 on (RakLocationProvider::detect): the serial driver is opened first, then RakI2cGpsDriver::detect() probes WB_IO2, WB_IO4 and WB_IO5. Each failed probe ends with pinMode(powerPin, INPUT). The serial module is then detected from the bytes that arrived while a pin was HIGH, but nothing drives WB_IO2 again. In the default build serialPower is nullptr. With GPS_RAIL_POWER_CONTROL the rail was claimed before the probe, and _nmea.begin() returns early afterwards because the driver is already started, so the pin also stays an input there.

    The comment in RefCountedDigitalPin.h says that on a RAK19007 with a RAK12501, WB_IO2 left as an input keeps 3V3_S in its last state. That would explain why the Pocket V2 keeps working. My guess (I have no V3 to check) is that the V3 board pulls this enable line low, so the GPS loses power right after detection.

    @marineam, two things would help to confirm this and to make "gps off" actually save power on the V3:

    1. A build with -D MESH_DEBUG=1 and the boot log around GPS detection.
    2. If you know or can measure which pin switches the GPS supply on the V3 (WB_IO2 or something else), that decides how a proper fix looks.

    A fix would put the supply back to the requested state after the I2C probe, and on the V3 switch it with the pin that actually controls the GPS. I'm happy to put up a PR once the pin is known.

  4. fdlamotte commented on Nov 13, 2026

    @fdlamotte
    Collaborator

    thanks @marcelverdult this would be good help !

  5. fdlamotte commented on Nov 13, 2026

    @fdlamotte
    Collaborator

    I came across the doc for meshpocket_v3 on rakwireless site.

    https://docs.rakwireless.com/product-categories/meshtastic/wismesh-pocket-v3/overview/

    Contrary to what they do for their boards, there is not much here that helps us

    At least they say in their quickstart guide not to use the generic RAK4631 firmware for meshtastic ... which would go in favor of making a specific firmware for this device ...

    edit: I'll ask rak contacts for some documentation, it would be needed for proper support of this board (maybe rak sent some devices to liam so I'll check that too)

  6. marcelverdult commented on Nov 13, 2026

    @marcelverdult
    Contributor

    I opened #3834 for the "GPS never powered" part.

    After a failed RAK12500 probe, WB_IO2 now stays driven HIGH, as it did before df5a768. WB_IO4 and WB_IO5 still go back to inputs. I could only build it, I have no Pocket V3.

    @marineam, could you flash a build from that branch on your V3 and check whether the GPS gets a fix again?

    This does not fix the battery drain yet. In the default build gps off still does not cut the GPS power. The RAK_4631_repeater_gps_power env (-D GPS_RAIL_POWER_CONTROL) does switch WB_IO2 on gps off. If you test that env as well, we would know whether WB_IO2 really controls the GPS supply on the V3.

  7. marineam commented on Nov 14, 2026

    @marineam
    Author

    @marcelverdult Thanks for getting us back to the previous always-on behavior. Testing that PR is all I have time for today. I'll try builds with -D MESH_DEBUG=1 and -D GPS_RAIL_POWER_CONTROL soon (hopefully tomorrow) and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions