mosquitto
Using mosquitto on a mac
- install mqtt server
sh
brew install mosquitto
- start the mqtt server
sh
brew services restart mosquitto
- Do a quick test of server, start a subscriber on a topic:
Note: this will wait until you press control-c (publish a message, see below)
sh
mosquitto_sub -t test/hello
- In another window, publish a message to that topic:
sh
mosquitto_pub -h localhost -q 0 -t test/hello -m 'yo!'
- For Meshtastic to be able to access that server, two settings need to be changed in the
/usr/local/etc/mosquitto/mosquitto.conffile:
shell
listener 1883 0.0.0.0
allow_anonymous true
- Restart the service:
shell
brew services restart mosquitto
- If you are using the mac firewall, you will need to go into: System Preferences > Security & Privacy > Firewall > Firewall Options and add it.
Using mosquitto on raspberry pi bookworm
- install mqtt server
sh
sudo apt-get install mosquitto mosquitto-clients
- start the mqtt server
sh
sudo systemctl start mosquitto
- Do a quick test of server, start a subscriber on a topic:
Note: this will wait until you press control-c (publish a message, see below)
sh
mosquitto_sub -t test/hello
- In another console, publish a message to that topic:
sh
mosquitto_pub -h localhost -q 0 -t test/hello -m 'yo!'
- For Meshtastic to be able to access that server, two settings need to be changed in the
/etc/mosquitto/mosquitto.conffile:
shell
sudo sh -c "echo 'listener 1883 0.0.0.0\nallow_anonymous true' >> /etc/mosquitto/mosquitto.conf"
- Restart the service:
shell
sudo systemctl restart mosquitto