I am using the Mosquitto command mosquitto_sub
to display data from an MQTT server:
mosquitto_sub -t "#" -v
The messages I want to display contains binary data, which Mosquitto tries to display as text.
Is there any way to display the MQTT messages in a better way for binary data? For example as the hex-values of the bytes?
The mosquitto_sub
man page has a section called "Output format" which covers this.
You can use the -F
option to specify a formatting string.
eg
mosquitto_sub -v -t '#' -F %X
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.