Hi everyone, I’m using bg95-m3. I want to use bg95-m3 get GPS signal then send it via MQTT. I am told that MQTT and GPS cannot work together. So I try using them alternately, turn on GPS, get GPS signal, turn off GPS. Then connect MQTT, send data via MQTT then disconnect MQT and turn on GPS again. Everything seems to be working fine, however in some cases I can’t connect to mqtt even though GPS is off. Can anyone tell me how to solve this problem?
Thanks for your attention.
before you make data call , pls check the loaded tech with below ATcmd
AT+QGPSCFG=“priority”
pls confrim that your deive is on state 3
attached one doc for your reference
Can you explain in detail? Here is my AT command.
AT+QMTOPEN=0,“35.224.217.3”,1883
OK
+QMTOPEN: 0,0
AT+QMTCONN=0,“bg95”,“user1”,“1234”
OK
+QMTCONN: 0,0,0
AT+QGPSCFG=“priority”,0,1
OK
AT+QGPS=1
OK
AT+QGPSGNMEA=“GGA”
+QGPSGNMEA: $GPGGA,054224.00,1050.949347,N,10647.656666,E,1,08,0.8,18.0,M,-1.1,M,*4A
OK
AT+QGPSEND
OK
AT+QGPSCFG=“priority”,1,1
OK
AT+QMTPUB=0,0,0,0,“topic”
msg
OK
+QMTPUB: 0,0,0
AT+QGPSCFG=“priority”,0,1
OK
AT+QGPS=1
OK
…
The program runs fine for about 5-10 minutes, then I don’t receive GPS signals anymore, only the mqtt connection works. What’s wrong with my commands?