Hi,
I am Running my Mosquitto broker on android through TERMUX .Previously (old version) is working fine with connection with Node mcu .But after updation i am not able to connect to the broker
It showing like this
1616485604: mosquitto version 2.0.7 starting
1616485604: Using default config.
1616485604: Starting in local only mode. Connections will only be possible from clients running on this machine.
1616485604: Create a configuration file which defines a listener to allow remote access.
1616485604: Opening ipv4 listen socket on port 1883.
1616485604: Opening ipv6 listen socket on port 1883.
1616485604: mosquitto version 2.0.7 running
In fact, it should be pretty simple to set up if you are using a simple, non-secured MQTT network. All you’ll need to do is add 2 lines to the end of your mosquitto.conf file (I don’t know where this is in a Termux install, it’s normally in /etc/mosquitto.
Assuming you want to listen on port 1883, and allow any client to connect:
Hi
Yes , I went for those steps tried it by adding
listener 1883
allow_anonymous true
at the end of the config file but still it showing same thing
1616485604: mosquitto version 2.0.7 starting
1616485604: Using default config.
1616485604: Starting in local only mode. Connections will only be possible from clients running on this machine.
1616485604: Create a configuration file which defines a listener to allow remote access.
1616485604: Opening ipv4 listen socket on port 1883.
1616485604: Opening ipv6 listen socket on port 1883.
1616485604: mosquitto version 2.0.7 running
i am not able achieve the things…
Bad thing is every article give solution for mosquitto which is running on Linux(terminal) not for ANDROID (Termux)
As the default permissions have changed in MQTT 2.0.x. You could also try adding your own username instead of root.
Also, I’m not sure, but your output shows Mosquitto is starting with default config (maybe this refers to the default config file, or maybe it means it didn’t find any config file, which would explain why adding the two lines didn’t work). To be very sure you are starting Mosquitto with the configuration file you intend, stop it, then start it manually with the syntax below, using the actual location of your config file:
mosquitto [-c config file] [ -d | --daemon ]
Maybe try the first time without the -d option, so you can stop it with Ctrl+C while you experiment.
In this case, if you’re confident it’s related to the implementation in Termux, the right thing to do would be to submit a bug report (“New Issue” button) on the Termux-packages github - they may be able to guide you further with this one.