NB-IoT post data using AT Commands and MQTT to ThingSpeak

I would like to evaluate the use of NB-IoT in the UK which Wireless Logic SIM included with nrf9151DK provides. Using the following sequence of AT commands I can send data over LTE-M to thingspeak but if I try the same sequence with NB-IoT as the mode and preference (i.e. AT%XSYSTEMMODE=0,1,0,2) i get ERROR response when i try to connect using AT#XMQTTCON instead of OK when using LTE-M. Can you advise where I may be going wrong please? I am using the Serial LTE Modem application in nrfConnect. 

  • AT#XRESET
  • AT%XSYSTEMMODE=1,1,0,1
  • AT+CFUN=1
  • AT+CEREG=5
  • AT+CSCON=1
  • AT+CGDCONT=1,"IP","APN HERE"
  • AT+CESQ=0
  • AT#XMQTTCFG="CLIENT ID HERE",300,1
  • AT#XMQTTCON=1,"USER NAME HERE","PASSWORD HERE","mqtt3.thingspeak.com",1883
  • AT#XMQTTPUB="TOPIC HERE","DATA HERE"
Parents
  • Hi Jonathan,

    Unfortunately I dont get any further information in the response from the AT#XMQTTCON command other than "ERROR" which is frustrating. I dont know if there is a AT command which enables further diagnostic information but at the moment I just get ERROR. Using AT%XSYSTEMMODE=1,1,0,1 it works perfectly and the response is "OK" and can continue to publish data. I cant see it being any sort of syntax error as the only thing I change in the process is to select NB-IoT mode only. I checked with my SIM provider and NB-IoT is definately supported and the APN is correct.

    Thanks,

    Gavin

Reply
  • Hi Jonathan,

    Unfortunately I dont get any further information in the response from the AT#XMQTTCON command other than "ERROR" which is frustrating. I dont know if there is a AT command which enables further diagnostic information but at the moment I just get ERROR. Using AT%XSYSTEMMODE=1,1,0,1 it works perfectly and the response is "OK" and can continue to publish data. I cant see it being any sort of syntax error as the only thing I change in the process is to select NB-IoT mode only. I checked with my SIM provider and NB-IoT is definately supported and the APN is correct.

    Thanks,

    Gavin

Children
Related