Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: uBlox M10 GPS doesn't sleep if device is switched off #4061

Closed
craft4tnt opened this issue Jun 9, 2024 · 4 comments · Fixed by #4062
Closed

[Bug]: uBlox M10 GPS doesn't sleep if device is switched off #4061

craft4tnt opened this issue Jun 9, 2024 · 4 comments · Fixed by #4062
Labels
bug Something isn't working

Comments

@craft4tnt
Copy link
Contributor

Category

Other

Hardware

Not Applicable

Firmware Version

2.3.12

Description

UBlox M10x GPS module stays in aquisition mode (~12mA) and does not enter sleep mode (~50uA) if meshtastic device is switched off.
The receivers power states are controlled by UBX-RXM-PMREQ commands. UART_RX activity is defined as a wakeup source. During normal operation, M10 GPS power control works fine. As soon as the meshtastic device is switched off / to deep sleep, the GPS receiver will stay in aquisition mode and drains the battery.

Power consumtion was measured with Current Ranger

Will provide PR with fix immediately

Relevant log output

No response

@craft4tnt craft4tnt added the bug Something isn't working label Jun 9, 2024
@GPSFan
Copy link
Contributor

GPSFan commented Jun 9, 2024

The prepareDeepSleep method in GPS.cpp probably could be used to send a PMREQ to the GPS with the duration set to max (12 days). When Meshtastic (esp32) wakes up from DeepSleep it reboots so the GPS will be re-configured to normal operation then, as long as the PMREQ wakeup sources can wake it up. Not sure how the other platforms handle DeepSleep.

@craft4tnt
Copy link
Contributor Author

The wierd thing is that a UBX-RXM-PMREQ with duration=0 and wakeupSources->uartrx=1 never set the module to sleep even if there are no level changes on the UART line. I tried keeping it pulled high and low, both didn't work. It might be a bug which is specific to the M10, since the PMREQ messages seem deprecated but still supported for the newer models.
I didn't try the maximum duration value of 12 days but it also doesn't really fix the issue.
Thats why I decided to go with the external control since the PIN_GPS_EN signal is already implemented.

@GPSFan
Copy link
Contributor

GPSFan commented Jun 9, 2024

What firmware version is your M10? PMREQ is not deprecated (as yet) according to the SPG 5.10 and 6.00 firmware release notes.
I'll see if I can set up a Neo-7, M8N and M10 with my esp32 test bench and try out the duration=0 as you described.

@craft4tnt
Copy link
Contributor Author

You are right, PMREQ is not deprecated but I get the impression it's not the favoured way of doing power management for the M10 anymore because it is only briefly mentioned in the Integration manual among all the new features from the CFG-PM group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants