Dear all,
I am trying to use a local Mosquitto with my Arduino Yun. My project will be installed on a site without internet connection, so I need develop a system that runs only in the LAN.
I had installed Mosquitto with this:
opkg update
opkg install mosquitto mosquitto-client libmosquitto
My first goal is use the broker without authentication and no-SSL (port 1883). I am using default config file (/etc/mosquitto/mosquitto.conf).
Using the utilities mosquitto_sub and mosquitto_pub al works fine!!!
I open one SSH terminal and write:
mosquitto_sub -v -t 'test/test'
And open other SSH terminal and write:
mosquitto_pub -h 192.168.1.3 -t 'test/test' -m 'helloWord'
And works great!!! (192.168.1.3 is my Arduino LAN IP, but this command also works with 'localhost' and 'arduino.local' alias. When I run this command from outside Arduino (like my desktop PC) it works perfectly too (the PC are in the same LAN).
The big trouble is when I try to connect using the MQTT Dashboard app from my smartphone or PubSubClient library from my Arduino sketch. With public brokers like cloudmqtt or iot.eclipse.org works fine, but when I change the broker access/port to my local Mosquitto neither the Dashboard app and PubSubClient works!!!!! I had tried many many things and not!!!! I remember I had already got a successfully connection with app on my preliminary tests, but now I can not anymore. I don't know what else to do.
Can someone help me?
Thanks a lot!!!