This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MQTT AT-Commands

Good Day. I am wondering if anyone could maybe assist me in where I am going wrong with my software.

I have the intention of using a Nrf9160 as a serial modem through AT commands. As a chosen communication protocol we would like to use MQTT. 

Background info

Hardware : NRF9160

Firmware : mfwnrf9160120  (2020-04-29)

Software Image : Serial LTE Modem

I am attaching my project config file and the current AT-Commands that the modem will accept

My problem is that I cant seem to get the MQTT AT commands for the modem in.

When I started the GPS commands were initially not useable in the modem. So I modified the project config file and then the GPS commands became useable through AT-Commands. 

I am lost as to where I could be going wrong,  If any one would be able to help me out that would be very kind.

Parents Reply Children
  • The nRF52832 is working correctly. I have zero issues when it comes to this.

    My problem is that the AT-Commands for MQTT are not currently in my command set. The MQTT commands are not part of the firmware on the nrf9160. I have added the following to my project config file for MQTT and they are still not in my command set

    CONFIG_SLM_MQTTC=y

    # MQTT
    CONFIG_MQTT_LIB=y
    CONFIG_MQTT_LIB_TLS=n
    CONFIG_MQTT_CLEAN_SESSION=y

  • The Serial LTE Modem is configured to work out of the box when it comes to MQTT. Have you read the MQTT AT Commands documentation

    Can you please elaborate what is failing on your side? From the log output you provided: "AT-commands.txt", the output does not reflect what the Serial LTE Modem prints. 


    PieterK said:
    CONFIG_SLM_MQTTC=y

    This is not a configuration available in the nRF Connect SDK

    PieterK said:
    The nRF52832 is working correctly. I have zero issues when it comes to this.

    How do you know this is working correctly? 

  • The nrf52832 is working correctly as we have a few running the codeset we have made for them. We chose to have the nrf52 as the "Master" of the two as we require BLE in our application.

    I am still developing on a nRF9160DK. I am currently using the device through a UART serial port to get all my AT-Commands ready for getting the device attached to the networks and to read GPS.

    All my other commands are currently useable, But the MQTT commands do not show when I send the command AT+CLAC then I get the reply in the file "AT-Commands.txt"

    When I send the AT command for MQTT connect I only get error.

    AT#XMQTTCON=1,"3001","MyUseName","MyPassword","MyBrokerDetails",1883

  • Good day. I seem to have resolved my problem.

    I removed the following line from my project config and came right.

    CONFIG_SLM_MQTTC=y

    I do see that the command AT+CLAC does not return any of the MQTT commands

  • Happy to hear that your issue is solved!

    PieterK said:
    I do see that the command AT+CLAC does not return any of the MQTT commands

    Yes, this is correct as the SLM AT commands are proprietary AT commands, while the modem-specific AT commands are documented in the nRF91 AT Commands Reference Guide. 

Related