Hello,
We have a project which is a low power GPS tracker and we’d like to send the location over NB-IoT. This is what I want to achieve:
- 1: Initialization: power on modem, connect to NB-IoT network, go to PSM mode
- 2: Wake up from PSM mode
- 3: Get GPS data
- 4: Send GPS data over NB-IoT (through UDP socket)
- 5: Enter PSM mode
- 6: Sleep for X time, then go to step #2
I’ve read several Quectel documentations, however I cannot find a proper example of AT commands. The BG95&BG77&BG600L Series GNSS Application Note says something about the GPS & network coexistence (time multiplexed) with PSM mode:
I’ve followed the instructions, but either the modem does not go to PSM mode sometimes, or when it tries to get GPS fix, it cannot (CME ERROR 516). Sometimes it gets GPS fix, but then cannot send the message over the UDP socket. Sometimes the modem does not wake up with the pulse on PWR_KEY, and I need to powercycle the modem. So as you can see there are multiple issues.
The AT commands that are used (in order):
– Initialization
ATE0
AT+CPIN?
AT+QCFG=“iotopmode”,1,1
AT+COPS=1,2,“21670”,9
AT+QICSGP=1,1,“APN”,“USER”,“PASSWORD”,1
AT+QIACT=1
AT+CPSMS=1,“01100000”,“00000000”
– Loop:
** Wakeup modem by pulling up PON_TRIG for 20 msec **
AT+CPSMS=0 // disable PSM so the modem does not go to sleep while trying to get GPS fix
AT+QGPSCFG=“priority”,0 // switch to GNSS priority
AT+QGPS=1
AT+QGPSLOC=2 // repeat this command until we get fix
AT+QGPSEND
AT+QGPSCFG=“priority”,1 // switch to WWAN priority
AT+CPSMS=1,“01100000”,“00000000”
** open UDP socket with AT+QIOPEN **
** send data with AT+QISEND **
** close socket with AT+QICLOSE **
** MCU sleeps for X time, so the modem can enter PSM mode **
If I don’t enable the PSM mode, everything works fine. (Both GPS & NB-IoT)
Can you please help with these issues? A proper example with AT commands would be also helpful.
Best regards,
Bence