RAK5010 GPS Troubles

Issue: Unable to read GPS Data.

Setup: Arduino, custom code based off the RAK5010 Samples

Details: I had this project working what I thought perfectly fine. Had a few glitches to work out. Device has been working very well tracking GPS data, I2C Sensor Data, and other values and sending to my server.

Until a couple days ago. Nothing changed in code (so I think). Every device went offline w/ GPS data and actually cellular. I rewrote a bunch of code to make it cleaner, got everything working again as of 9 PM last night and fired up my 8 test devices to do their job over night. They ran well. Outside wall, GPS not perfect but good enough for testing. Devices ran all night and until about 1 or 2 PM today, then ALL GPS when off line again. Cellular continued to work. I just took a device on a walk around the block after resetting. Still no GPS data. I’ve taken a box apart to see if was an antenna issue and moved things around.

I try to read GPS for about 5 minutes with a 15 second delay between each failed read. I just get this until my code times out:

[1445396] Requesting current GPS/GNSS/GLONASS location

+CME ERROR: Not fixed now
[1445401] Couldn’t get GPS/GNSS/GLONASS location, retrying in 15s.

I thought pulling out the debug code that dumps the AT data to the debug serial port caused an issue, so put it back in.

Any idea why all these devices would stop reading GPS at about the same time?

I’m not using Assistanced GPS/GNSS right now but will probably try to put it in to see if that makes a change?

Any one have an idea what to look at?


And… seems like I optimized too much and wasn’t giving enough time for a GPS Fix was part of the issue. The other part was when the antenna was put into the device it wasn’t positioned the correct way and the cable was actually causing some interference. Just enough to make the device not get a good lock. Since all devices were built the same way and were going in for another test run, they all exhibited the same issues. Problem solved for now…

1 Like

Hi Sir,

Can i check during the 5mins, do you put BG96 to sleep? Can you also let me know the time given for GPS Fix? I have also a similar function, which sends data over a long interval, but after 15-20mins the board powers down though it can be restarted again. Not sure if its due to overheat issue.

In the “Loop” function I’m doing this:

Turn on BG96
Turn on GPS
Wait 30 seconds for GPS to warm up.
Start trying to read GPS location in a loop that’ll try 15 times w/ a 5 second delay between tries.
Connect to and send data to my server
Continue to get GPS readings if needed.
Disconnect from my server
modem.poweroff (Turn off BG96)

go into sleep mode for 5 minutes, then return from the loop so it starts over again.

I’m doing other work of reading sensors during this process and it seems to be working fine.

I’d be happy to look at your code if you’d like.

Hi Sir,

Can you send me your email for me to share the code with you? At the same time can you share your code with me as well. ([email protected])

My code was built upon the startup code for RAK5010 on Arduino IDE.

Sure. I sent you a PM w/ source code for you to review. Let me know if that was able to get you going.

Hi Carlton,

I found out that the module that shuts down is the B96 and not the entire board. Not sure why it happens. To patch, I have done a reset pulse to the module before data retrieval. Have started to monitor. The module does shutdown but is revived when data needs to be collected. Still not sure why BG96 shuts down in the first place though.

Take a look at my power on/power off function in the code. The BG96 requires a certain timing to turn on and off and I’ve seen the chip go off when I turn it on if timing isn’t correct.

There is a Quectel_BG96_Hardware_Design document that you can download from here (after you login to their site):

Quectel LTE BG96 Cat.M1/NB1 & EGPRS Module

I also found that the STATUS Pin can be read to determine if the chip is on or not.


Have you encountered the following, when the GPS has a location fix outdoors and when you bring it indoors, no fix and then bring it outdoors again, still hasnt has any fix until you reset the module.

It should be able to recover the GPS coordinates without resetting the module.