Get GPS without cellular

Good afternoon,

We are currently working on our RAK5010 product and we are facing issues with GPS : We can’t get gps data (with rui_get_gps function) without cellular connection in app task; whereas in AT UART mode we can get it.

What do you advice?

Thank you

hi,The 5010 can also obtain GPS data in the local log without a cellular connection. Did you say that the GPS data can be obtained in the AT UART mode is obtained by sending “at + get_config = device: status”?

Thank you for the answer.

Of course we can get it with at+get_config=device:status, but we can get it with
AT+QGPS=1
AT+QGPSCFG=“nmeasrc”,1
AT+QGPSCFG="gpsnmeatype "
AT+QGPSGNMEA=“GGA”

But in the task after rui_device_sleep(0), it does not work.

We tried :

  • These commands
  • Just the GGA one, because the rui_device_sleep(0) seems to enable the GPS
  • rui_get_gps

But all these commands are blocking and make the watchdog to trig

Any idea?

Yes, after starting a timed task or sending “at + set_config = device: sleep: 1”, the RAK5010 will enter the low power mode and the BG96 sleeps. At this time, any AT command sent about the BG96 will have no response. AT The commands will be blocked and invalid, and then the watchdog will be triggered. This is normal. At this time, GPS data cannot be obtained.
Please send the “at + set_config = device: sleep: 0” command to let the BG96 enter the working mode (the state of the RAK5010 is that the blue light is always on and the red light is slowly flashing), and then you can send a command to actively acquire GPS data.

You’re misunderstanding. Here is the code :

rui_device_sleep(0);
rui_cellular_send("AT+QGPSLOC?");
rui_cellular_response(AtResponseBuffer, 256, 10000);
rui_device_sleep(1);

Here is a samplier version of our code. With rui_cellular_send(“AT+QGPSLOC?”); or your rui_gps_get(), it’s blocking.
When we launched cellular connection it’s working, but we would like to make it work without it

Hi,
The cellular connection is not related with gps. rui_device_sleep(0) will power up bg96 and config gps and cost several seconds. So there is no need config gps again and wait for a moment. If config gps more than once, it will make unpredictable mistakes. Maybe you can try as below:

rui_device_sleep(0);
rui_delay_ms(1000);
//check version , make sure power up ok
rui_cellular_send(“ATI”);
rui_cellular_response(AtResponseBuffer, 256, 10000);
//get gps
rui_cellular_send(“AT+QGPSGNMEA=“GGA””);
rui_cellular_response(AtResponseBuffer, 256, 10000);
rui_device_sleep(1);