nRF9161 with MQTT Client in SLM

Hello

We are using a slave processor with AT command to communicate with the nRF9161 . This is working without problem

But we are initially using the Quick Start 0.2.7 (9161) to evaluate and understand the AT Commands

We are having a problem connecting to our normal MQTT Brokers . 

Ready
> at

OK
> AT+CGDCONT?

OK
>
> AT+CFUN=1

OK
> AT%XCONNSTAT=1

OK
> AT+CGDCONT?

+CGDCONT: 0,"IP","iot.1nce.net","10.XX.129.2",0,0

OK
> AT+CGMR

mfw_nrf91x1_2.0.1

OK
> AT%XSYSTEMMODE?

%XSYSTEMMODE: 1,1,1,3

OK

--------------------

The 

AT#XCLAC command returns

AT#XMQTTCFG

AT#XMQTTCON

AT#XMQTTPUB

AT#XMQTTSUB

AT#XMQTTUNSUB

So we are assuming that the MQTT Client is available within the nRF9161 firmware we are running

Configure the MQTT Client ID

> AT#XMQTTCFG="Wiska_Air",300,1

OK
> AT#XMQTTCFG?

#XMQTTCFG: "Wiska_Air",300,1

OK

The MQTT Connect Command does not give any reply and the nRF9161dk has to be reset

> AT#XMQTTCON=1,"mqttgateway”,”42Gears@123",”mqttbrokerstage.42gears.com",1890
> at
> at

Thank you for your help

Paul H

Parents Reply Children
  • Hello Michal

    I am using Nordic Quickstart for the nRF9161 and selecting nRF9161 and Serial LTE Modem.

    The nRF9161dk is then programmed over the USB

    > AT#XSLMVER

    #XSLMVER: "2.7.0-rc3","2.7.0-cellular-28f48961a8dc"

    OK

    OK
    > AT+CGMR

    mfw_nrf91x1_2.0.1

    The nRF9161 connects OK and an IP address is returned

    OK
    > AT+CGDCONT?

    +CGDCONT: 0,"IP","iot.1nce.net","10.XX.129.2",0,0

    All Good - Now connect to a pulblic MQTT Server (with no username or password)

    > AT#XMQTTCFG="MyMQTT-Client-ID",300,1

    OK
    > AT#XMQTTCON=1,"","","broker.emqx.io",1883

    OK

    #XMQTTEVT: 0,0

    All Good - Now disconnect

    > AT#XMQTTCON=0

    #XMQTTEVT: 1,0

    OK

    All Good - Now try our MQTT Server which is OFFLINE

    > AT#XMQTTCFG="Wiska_Air",300,1

    OK
    > AT#XMQTTCFG?

    #XMQTTCFG: "Wiska_Air",300,1

    OK

    All Good - Configuration is OK - Now try to connect to offline MQTT Broker

    > AT#XMQTTCON=1,"mqttgateway”,”xxxxxxxxxxxxxxxx",”mqttbrokerstage.42gears.com",1890

    nRF9161 issues no serial response - will accept no other AT serial command - Reset Button has to be pressed

    Starting again with a MQTT broker that is ONLINE (tested 5 minutes ago with Quectel)

    > AT#XMQTTCFG="89882280666127879587",300,1

    OK
    > AT#XMQTTCFG?

    #XMQTTCFG: "89882280666127879587",300,1

    OK

    All Good - Configuration is OK - Now try to connect to ONLINE MQTT Broker

    > AT#XMQTTCON=1,"89882280666127879587”,”xxxxxxxxxxxxxx",”iris-mqtt.trackpac.io",1883
    >

    nRF9161 issues no serial response  - will accept no other AT serial command - Reset Button has to be pressed

    Thank You for your assistance

    Paul H

  • Hello Paul,

    We'll look into it internally and I will get back to you before the end of the week.

    Best regards,

    Michal

  • Do you have any public brokers you could reproduce this issue against?

    Or a test account for us to try?

  • Hello

    You can use the following commands on your nRF9161dk board with our MQTT Broker and see if you have the same problem on the second command

    AT#XMQTTCFG="89882280666127879587",300,1

    AT#XMQTTCON=1,"89882280666127879587”,”REtYPtiOnStI",”iris-mqtt.trackpac.io",1883

    Thank You

    Paul H

  • Hello Paul,

    I think we have found the issue.

    Looks like the reason is that in failure commands curly double quote is used instead of straight double quote ".

    AT#XMQTTCON=1,"mqttgateway,xxxxxxxxxxxxxxxx",mqttbrokerstage.42gears.com",1890

    Best regards,

    Michal

Related