MQTT with MKR NB 1500

Small update. I switched to the ArduinoMqttClient library and I call the .poll method only if the MQTT connection was successful, Arduino now no longer crashes. :melting_face:
From the new logs, the Arduino cannot open a TCP socket. I tried to open a socket with a python script and it works without any problems.

The MQTT broker uses self signed certificates, could this be the problem?

The logs now are:

AT+USOCR=6

+USOCR: 0

OK
AT+USOSEC=0,1,0

OK
AT+USECPRF=0,0,1

OK
AT+USOCO=0,"mqtt.eu.urbanasolutions.io",8883

ERROR

+UUSOCL: 0
AT+USOCL=0

ERROR
--- MQTT Broker connection error: -2
Connecting to MQTT Broker
AT+USOER

+USOER: 9

OK
AT+USOCR=6

+USOCR: 0

OK
AT+USOSEC=0,1,0

OK
AT+USECPRF=0,0,1

OK
AT+USOCO=0,"mqtt.eu.urbanasolutions.io",8883

ERROR

+UUSOCL: 0
AT+USOCL=0

ERROR
--- MQTT Broker connection error: -2