This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MQTT Sample code is not connecting

The sample code at ncs/nrf/samples/nrf9160/mqtt_simple is not connecting. I dod not make any changes to the ode. I am using NB-IoT. LTE is connected. The link monitor, LTE is in green. The error code is ERROR: mqtt_connect -60

Kindly advice to resolve this

Parents Reply
  • Hi,

     

    vkadal said:
    The hex file, asset tracker, (NRF 9160 DK) recommend to use to connect to Nordic Cloud is not working, in India, through Jio NB-IoT network. At the same time I got a working code from one of  your dealer SM Electronics which connects.  I can upload the hex file if  you can change this ticket to private

    Your initial issue is that the sample mqtt_simple doesn't connect to the broker. This is because the host (mqtt.eclipse.org) you're connecting to is down.

    I see now that it actually changed host to this one:

    https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/mqtt_simple/prj.conf#L34

     

    Alternatively, you can connect to test.mosquitto.org to test the mqtt_simple example.

     

    Could you try to change the hostname in the prj.conf file, and recompile the project, and see if it works then?

     

    Kind regards,

    Håkon

Children
No Data
Related