Skip to main content

Mosquitto

Using mosquitto on a mac

  1. install mqtt server

    brew install mosquitto
  2. start the mqtt server

    brew services restart mosquitto
  3. 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)

    mosquitto_sub -t test/hello
  4. In another window, publish a message to that topic:

    mosquitto_pub -h localhost -q 0 -t test/hello -m 'yo!'
  5. For Meshtastic to be able to access that server, two settings need to be changed in the /usr/local/etc/mosquitto/mosquitto.conf file:

    listener 1883 0.0.0.0
    allow_anonymous true
  6. Restart the service:

    brew services restart mosquitto
  7. If you are using the mac firewall, you will need to go into: System Preferences > Security & Privacy > Firewall > Firewall Options and add it.