DevAcademy MQTT example not working

Hello,

I'm currently testing the MQTT example from the DevAcademy. I'm using the solution from GitHub and get the follwing errors in the console:

I'm using a SIM card from Telekom with a 1GB data plan. Can someone explain me what these errors are?

Thanks!

  • Hi, 

    Seems that the broker of you´re trying to use is offline. See the return of addrinfo funtion: - 11 = Resource temporarily unavailable (See wiki ERRNO table codes).

    My sugest: Try to made a ping test for broker that you´re using and see that it can solve IP of broker address and try use another broker if possible.

  • Hi,

    I've tried it with "mqtt.nordicsemi.academy" and "test.mosquitto.org" and both I can ping and connect to with my MQTT software on the computer. I have the feeling that I can't get an Internet connection even though I have an LTE connection. How can I test this quickly?

    When I search the web for “getaddrinfo failed”, I get information about a DNS error. Could this also be the reason?

  • Please, verify if your sim card really have data credits and if your mobile operator contract have support to NB-IOT/LTE-M access. Otherwise, let´me know if you´ve beem made some change on code of Devacademy example or if you´re using a custom board or a dk.

    Sim cards for standard phone plans normally don´t work propertly with LPWA networks like as required for nrf9160.

    The most quickly way to verify if you´re connected to internet is just see getaddrinfo() return. If you can´t solve a address like "www.google.com" to "8.8.8.8" it´s means that you don´t have internet connection. 


Related