MQTT connection error

Hi, as I am beginner, will be please anybody kindly help me with my first project?

I'd like to connect to an MQTT broker available at 89.24.xxx.xxx:2223 (mosquitto 2.0.18) and send tome topics to it. Initially, without TLS. I am able to connect to the mqtt broker with another client (Android app MyMQTT) successfully and subscribe/publish messages.

I have combined some code samples (below), I am successfull in connecting to LTE-M, getting IP address and getting http get response, but MQTT connect ends in -106 error.

Thank you very much in advance!

Martin

Here is what I get:



My code:

#include <zephyr/kernel.h>
#include <modem/lte_lc.h>
#include <modem/modem_info.h>
#include <modem/nrf_modem_lib.h>
#include <date_time.h>
...
Edit:
Based on the answer below, the code was removed from the ticket as not relevant.
m
Related