BG96_GPS Simple Code Failing

I am using the IMP006M development board with the onboard sim selected on the hardware. My development device is 600a0c2a69e60560 and it is connecting using cellular fine.

Although, the example code is not producing any location data. I’ve given it 30 minutes to perform a poll. Documentation says 12.5 minutes roughly needed.

https://developer.electricimp.com/reference/gnss-on-imp006#load-gnss-location-assist-data

Attempted with and without the assist data. Feel free to make any recommended changes to my existing code to make it work.

Additionally, I have attempted the example code here gnss-session.enable() | Dev Center

The GNSS module fails to enable due to an error 504.

I did get it working, but it is tricky. Everything is very asynchronous, so it’s important to test state before attempting anything. If you have a runtime error, your code would restart but there could still be an active gnss session in the BG_96. You should test for it with gnsssession.getstate() in the hardware.gnss.open() callback before doing any of the other set up

Please share your code if you believe it is working. I’ve added a check after opening a session to make sure the state is 1. Although, the same error has occurred. I am using the example code.

The code is being used in a commercial application and I’m presently unable to share. However, I’m happy to help where I can. If you post the code that isn’t working, I can provide you with some suggestions.

I am using the example code in this post. No changes have been made to it.

Have you looked at this page? [gnss | Dev Center]
If you’re using an imp006 and running impOS 43, the gnss and gnsssession objects should already be in the namespace. If you’re not running 43, you may be able to ask Twilio to upgrade it for you. I’m sorry I didn’t read read your first post more thoroughy, I had assumed you were using the more recent API

This topic was automatically closed after 60 days. New replies are no longer allowed.