mosquitto_sub:tldr:7d3eb
The command you provided is used to subscribe to MQTT topics using the mosquitto_sub
command-line utility. Here's a breakdown of each part of the command:
-
mosquitto_sub
: This is the command to run themosquitto_sub
utility, which is a MQTT subscriber provided by the Mosquitto MQTT broker. -
-v
: This flag enables verbose output, which means it will display more information in the terminal while subscribing to topics. -
-h "iot.eclipse.org"
: This option specifies the MQTT broker hostname or IP address to connect to. In this case, it connects to the broker hosted atiot.eclipse.org
. -
-p 1885
: This option specifies the port number to connect to on the MQTT broker. In this case, it connects to port1885
. -
-t ${\$SYS-#}
: This option specifies the topic to subscribe to.${\$SYS-#}
is a placeholder that represents a topic filter. It is likely an example topic filter, and you should replace it with an actual topic filter of your interest.
When you run this command, it connects to the MQTT broker at iot.eclipse.org
on port 1885
, subscribes to the specified topic (\$SYS-#
), and displays any received messages in a verbose manner (topic and payload) on the terminal.