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

MQTT_SIMPLE project

Dear Sir,

I designed a new pcb based on nrf9160,

The boards are populated with cipsim.

When running the MQTT_SIMPLE project i get  the following error for the 2 boards.

The MQTT simple sample started..
LTE Link Connecting .....
LTE Link Connected!
After Modem configure
ERROR: getaddrinfo failed 22
After client_init
ERROR: mqtt_connect -106

Can u explain the  error number ?

Please Advise.

Parents
  • Hi Ephraim,

     Error 22 means that your network has DNS issues.
    I assume that you are using the NB-IoT network since you see this?

    Anyway, please add the following configuration in prj.conf file of the application:

    CONFIG_LTE_LEGACY_PCO_MODE=y

    So that the modem selects to use regular PCO instead of ePCO.

    If you enable the configurations:

    CONFIG_NET_LOG=y
    CONFIG_MQTT_LOG_LEVEL_DBG=y

    You should get more information out from the application that could give a better explanation of why it fails as well.

    However, the first config should do the trick.

  • Hi.

    I still get the following error,

    LTE Link Connected!

    After Modem configure

    ERROR: getaddrinfo failed 51

    After client_init

    ERROR: mqtt_connect -106

    Please Advise

  • Hi! 

    If you have enabled the config CONFIG_NEWLIB_LIBC=y in your project, the error codes can be found here.

    If you have not enabled this config, you can find the error codes here

    I'm just a little confused because the MQTT Simple sample in NCS does not have the NEWLIB library enabled by default, as we can see from the prj.conf file.  Yet the error codes you're seeing (106) indicate that it is enabled.

    Have you added it yourself?

    Also could you please provide the complete log file from the application? It might tell us more about what's going on. 

Reply
  • Hi! 

    If you have enabled the config CONFIG_NEWLIB_LIBC=y in your project, the error codes can be found here.

    If you have not enabled this config, you can find the error codes here

    I'm just a little confused because the MQTT Simple sample in NCS does not have the NEWLIB library enabled by default, as we can see from the prj.conf file.  Yet the error codes you're seeing (106) indicate that it is enabled.

    Have you added it yourself?

    Also could you please provide the complete log file from the application? It might tell us more about what's going on. 

Children
Related