CSCON and GPS timer

Hi,

I try to use CPSMS command to reduce the power consumption. The idea is to send a MQTT message every 10min and have the GPS coordinate every 5 min.

The NRF9160 is flashed with serial LTE modem and I communicate with him through AT command.

This is the list of command I send to NRF9160 :in bold the master command in none bold the response from the NRF9160

Ready
AT+CEREG=5
OK
AT+CSCON=1
OK
AT%XSYSTEMMODE=1,0,1,0
OK
AT+CPSMS=1,"","","10101010","00100001"
OK
AT+CFUN=1
OK
AT+CPSMS?
+CPSMS: 1,,,"10101010","00100001"
OK
+CEREG: 2,"E488","09343C10",7
+CSCON: 1
+CEREG: 5,"E488","09343C10",7,,,"00011110","11100000"
AT+CPSMS?
+CPSMS: 1,,,"10101010","00100001"
AT#XMQTTCFG="befc_gateway",600,1
OK
AT#XMQTTCON=1,"","","test.mosquitto.org",1883
OK
#XMQTTEVT: 0,0
AT#XGPS=1,0,300,290
OK
#XGPS: 1,1
+CSCON: 0

after 580s
#XGPS: 1,3
#XGPS: 1,2
+CSCON: 1
+CSCON: 0
+CSCON: 1
#XMQTTEVT: 1,-113
+CEREG: 0
+CSCON: 0

I don't understand why but the GPS timeout after 580s instead of 290s

I don't understand in the second CEREG response the Active-Time and the Periodic-TAU is not the same than the one I set with the CPSMS command. Did I configure something wrong ?

Also I'm not sure how the CPSMS command work. I don't understand how the MQTT can wake up the modem part and ask for a synchronization.

My ultimate goal is to reduce the power consumption and the consumption of data.

This the salae record of the At command exchange to check the timing : cereg and gps timer.sal

I hope my problem is clear,

Best regards,

Alban

Parents
  • Thank for the answer, but I would to it in AT command using serial LTE modem firmware. In the future the master will receive some bluethoot message and push it also in MQTT.

    What sequence of AT command I need to sent  to be able to use the LTE-M and the GPS in parallel?

    Best regards,

    Alban

  • Hi Alban,

    Alban THIERRY said:
    What sequence of AT command I need to sent  to be able to use the LTE-M and the GPS in parallel?

    The sequence is quite clear, you get GPS fix when LTE modem either be completely deactivated or in RRC idle mode or Power Saving Mode (PSM) when using the GNSS receiver, then send messages though MQTT.

    If you choose to deactivate LTE modem, the sequence can be the following.

    AT+CEREG=5
    AT%XSYSTEMMODE=1,0,1,0
    AT+CFUN=31
    AT#XGPS=1,0,0,290
    Until GPS fixed received or timeout
    AT#XGPS=0
    AT+CFUN=21
    AT#XMQTTCFG="MyMQTT-Client-ID",300,1
    AT#XMQTTCON=1,"","","test.mosquitto.org",1883
    AT#XMQTTPUB="nrf91/slm/mqtt/topic0","Test message with QoS 0",0,0
    AT#XMQTTCON=0
    Loop:
        AT+CFUN=0
        AT+CEREG=5
        AT+CFUN=31
        AT#XGPS=1,0,0,290
        Until GPS fixed received or timeout
        AT#XGPS=0
        AT+CFUN=21
        AT#XMQTTCFG="MyMQTT-Client-ID",300,1
        AT#XMQTTCON=1,"","","test.mosquitto.org",1883
        AT#XMQTTPUB="nrf91/slm/mqtt/topic0","Test message with QoS 0",0,0
        AT#XMQTTCON=0

    If you choose to run GNSS during PSM state, you need to make sure your network operator support PSM feature as I explained, it is not just set by CPSMS command, the sequence can be the following.

    AT+CEREG=5
    AT%XSYSTEMMODE=1,0,1,0
    AT+CPSMS=1,"","","10101010","00100001"
    AT%XMODEMSLEEP=1,60000,60000
    AT+CFUN=1
    Rec:+CEREG: 1,"xxxxxxxxx","xxxxxxxxxxx",7,0,2,"00100001","10101010"
    AT#XMQTTCFG="MyMQTT-Client-ID",300,1
    AT#XMQTTCON=1,"","","test.mosquitto.org",1883
    LOOP(should less than MQTT KEEP-Alive period):
        If Rec:%XMODEMSLEEP: 1,539975
            AT#XGPS=1,0,0,290
            AT#XMQTTPUB="nrf91/slm/mqtt/topic0","Test message with QoS 0",0,0

    The application logic/sequence is of course decided by you, above is just a demonstration to show how to use the commands.

    Best regards,

    Charlie

  • Hi Charlie,

    Thanks for the answer Slight smile

    Just to be sure when I do :

    AT#XGPS=0
    AT+CFUN=21

    do this reset  delete the navigation data and need to do the cold start cold again or it will be some hot start ?

    Best regards,

    Alban

  • Hi Alban,

    It is a hot start. The downloaded GPS satellites data still valid for a period of time.

    Best regards,

    Charlie

Reply Children
Related