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

modem.enableGPS() might get stuck due to misinterpreting the OK response #148

Open
NeariX67 opened this issue Oct 1, 2024 · 3 comments
Open
Labels

Comments

@NeariX67
Copy link

NeariX67 commented Oct 1, 2024

After starting up the A7670 and enabling the GPS functionality, the library sometimes fails to interpret the "OK" response. It does not happen on every boot but happens fairly often.

I'm using a SoftwareSerial connection with 38400 baud rate on the Waveshare board.
A corresponding failure timeout is missing too.

[...]
[5341] ### Modem: A7670E-FASE
[5341] ### Modem: A7670E-FASE
AT+CTZR=0

OK
AT+CTZU=1

OK
AT+CPIN?

+CPIN: READY

OK
Modem initialized
Enabling GPS...
AT+CGNSSPWR=1

OK
[15472] ### Unhandled: OK
AT+CGNSSPWR=1

OK
[26977] ### Unhandled: OK
AT+CGNSSPWR=1

OK
[38482] ### Unhandled: OK
AT+CGNSSPWR=1

OK
[49987] ### Unhandled: OK
AT+CGNSSPWR=1

OK
[61492] ### Unhandled: OK
AT+CGNSSPWR=1

OK
[...]

Sometimes it works, but the response is different:

+CPIN: READY

OK
Modem initialized
Enabling GPS...
AT+CGNSSPWR=1

OK

SMS DONE

+CGEV: EPS PDN ACT 1

+CGNSSPWR: READY!
GPS enabled
Setup finished
@lewisxhe
Copy link
Contributor

lewisxhe commented Oct 4, 2024

After using AT+CGNSSPWR=1, you must wait for +CGNSSPWR: READY!, otherwise GPS is not turned on.
image

@NeariX67
Copy link
Author

NeariX67 commented Oct 8, 2024

I think the problem has to do with a restart of the esp32. The Modem is still turned on (as well as GNSS) and thus responds differently when turning it on again.

Copy link

github-actions bot commented Nov 8, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants