RAK2013 unable to get GPS due to locked serial port

Issue: I’ve been able to get GPS data from the RAK2013 when the device isn’t connected via 4g, but when it is connected the device is lovked and I can’t get the GPS data via AT commands. The documentation for this device is scarce, especially in relation to GPS data and I’m not sure where to look next - any help would be appreciated.

Hello @darren, ca you specify which model exactly you use? Cellular modem EG95 or BG96?

thanks for the quick reply - it’s the BG96 version.

Without PPP0 connected I can run
at+qgpsloc? to get the co-ordinates - I can do this via python script to automate the process.

However, once the 4g is connected then I can’t access the device any more to send the AT commands - running minicom says the “device is locked” or running the python script errors to “Device or resource busy” or running the python script as sudo it just hangs after sending the AT command.

Yes, this is because the PPP0 script uses it. @ZhuQI Can you assist here?

RAK2013 also has a micro usb port, you can try to connect this port with your device via USB.
On my Raspberry Pi, it is recognized as 4 ttyUSB devices. I can connect to it via ttyUSB3 and use the at command to access it.

Once I found a micro-usb data cable (third time lucky!) I was also able to access the device on /dev/ttyUSB3. Thanks for your quick support on this.

Just wondering if I’ve missed any documentation about this anywhere as it wasn’t completely straightforward to think I needed to connected via both GPIO and USB cable?


The USB port would presumably be enough by itself, as it provided multiple virtual serial devices. That’s typically the way such modems are interfaced to more capable host systems.

The GPIO connector UART only provides one so it can only be used for one purpose at a time.