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

NRF91DK MQTT SIMPLE example not able to connect to mqtt server

Dear Sir,

I am trying to run example with NRF91 DK MQTT simple and I am able to connect with LTE network. as shown in below screenshot. 

But as shown in the screen shot i am not able to connect to server and it keeps retrying. Please do let me know where i can go wrong. 

THnak you.

  • Please find full log as below -

    * Booting Zephyr OS build v2.4.99-ncs1  **Flash regionsDomainPermissions00 00 0x00000 0x08000 Securerwxl01 31 0x08000 0x100000 Non-SecurerwxlNon-secure callable region 0 placed in flash region 0 with size 32.SRAM regionDomainPermissions00 07 0x00000 0x10000 Securerwxl08 31 0x10000 0x40000 Non-SecurerwxlPeripheralDomainStatus00 NRF_P0               Non-SecureOK01 NRF_CLOCK            Non-SecureOK02 NRF_RTC0             Non-SecureOK03 NRF_RTC1             Non-SecureOK04 NRF_NVMC             Non-SecureOK05 NRF_UARTE1           Non-SecureOK06 NRF_UARTE2           SecureSKIP07 NRF_TWIM2            Non-SecureOK08 NRF_SPIM3            Non-SecureOK09 NRF_TIMER0           Non-SecureOK10 NRF_TIMER1           Non-SecureOK11 NRF_TIMER2           Non-SecureOK12 NRF_SAADC            Non-SecureOK13 NRF_PWM0             Non-SecureOK14 NRF_PWM1             Non-SecureOK15 NRF_PWM2             Non-SecureOK16 NRF_PWM3             Non-SecureOK17 NRF_WDT              Non-SecureOK18 NRF_IPC              Non-SecureOK19 NRF_VMC              Non-SecureOK20 NRF_FPU              Non-SecureOK21 NRF_EGU1             Non-SecureOK22 NRF_EGU2             Non-SecureOK23 NRF_DPPIC            Non-SecureOK24 NRF_REGULATORS       Non-SecureOK25 NRF_GPIOTE1          Non-SecureOKSPM: NS image at 0xc000SPM: NS MSP at 0x200197f8SPM: NS reset vector at 0xffb5SPM: prepare to jump to Non-Secure image.* Booting Zephyr OS build v2.4.99-ncs1  **[00:00:00.227,325] [0m<inf> lte_lc: Using legacy LTE PCO mode...[0m[00:00:00.227,996] [0m<inf> lte_lc: PDP Context: AT+CGDCONT=0,"IPv4v6","internet.apn"[0m[00:00:00.228,698] [0m<inf> lte_lc: PDN Auth: AT+CGAUTH=0,1,"username","password"[0m+CEREG: 2,"C090","003F0318",9,0,0,"11100000","11100000"+CSCON: 1+CEREG: 5,"C090","003F0318",9,,,"11100000","11100000"AT+COPS=3,2OKAT+COPS?+COPS: 0,2,"405864",9OKAT%XCBAND%XCBAND: 5OKAT+CGDCONT?+CGDCONT: 0,"IPV6","internet.apn","0000:0000:0000:0000:0000:0000:0E88:5C00",0,0OKAT+CGACT?+CGACT: 0,1OK[00:00:09.716,186] [0m<inf> mqtt_simple: The MQTT simple sample started[0m[00:00:09.716,186] [0m<inf> mqtt_simple: Disabling PSM and eDRX[0m[00:00:31.421,203] [0m<inf> mqtt_simple: IPv4 Address found 148.66.129.148[0m[00:00:54.924,133] [1;31m<err> mqtt_simple: mqtt_connect -60[0m[00:00:54.924,133] [0m<inf> mqtt_simple: Reconnecting in 10 seconds...[0m

  • Thank you for providing this information. 

    Have a look at a similar case here. Please verify that you network supports TCP over NB-IoT. Have you tried to connect another MQTT broker, e.g. https://www.hivemq.com/public-mqtt-broker/

    Broker: broker.hivemq.com
    TCP Port: 1883

    Kind regards,
    Øyvind

  • Wohh!!! You are awesome!!! by following above similar case link, we are able to move ahead in our journey. Thank you so much for this. we are able to connect to test.mqtt.org and able to publish and subscriber data to and from mqttFX.  

    Now the case is i am getting error while connecting to other brokers as provide by you https://www.hivemq.com/public-mqtt-broker/   so to confirm i have checked it with DNS loopkup and got below results

    By this results i am assuming that this broker is also not IPV6. Just to verify can you provide any other broker which supports IPV6 and we can get the testing done on it for now. 

    Thank you.

  • Good to here. 

    The https://test.mosquitto.org/ broker should support IPv6. Let me know how that works for you.  

    Kind regards,
    Øyvind

  • Yes as mentioned above test.mosquitto.org works very well no problem at all, we just need one more alternative broker other than test.mosquitto.org to verify after changing broker the code works or not. 

    Please let us know if any other alternative you can suggest just for testing other wise it is working with test.mosquitto.org. 

    also let me know if you have any link by following i can create IPV6 broker. 

    Thank you.

Related