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!

Parents Reply
  • 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?

Children
  • 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. 


  • Hi,

    I called the provider's customer support and asked if my SIM card supports LTE-M / NB-IoT, but they don't even know the protocol. I think this is because private customers are not normally interested in such topics.

    I will receive a sim card from Things Mobile in the next few days, so hopefully it should work.
    I haven't changed anything in the source code except for the broker address and the topic.
    As soon as the new card arrives, I will post an update here.

    It's hard to find a provider as a private individual without having a business or working for a company.

Related