How to use component 3rdParty paho.mqtt.c

did you try to connect in terminal first?
e.g. using nc command (or even try to ping the IP first in terminal)
This can make sure the module can reach that IP and port.

You might also need to shut down firewall by:

iptables -I INPUT -j ACCEPT

hi @anderson, sorry, where did you write in the code

1883 is mosquitto, right?