MQTT CONNECT - bit stream sample

Asked by cogitoergosum

Would you have a file with the correct MQTT CONNECT message that I can read in a Hex viewer ? I am trying to understand the specification better.

I am trying to build a MQTT CONNECT message stream 'by hand'. I want to pass it to the socket program (see example, below) on my Linux laptop that would direct it to mosquitto that is running on my laptop. I have read the protocol specification and I think, I follow it well. But, the connection does not happen.

socket -v localhost 1883 0< file_with_connect_string

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Light
Solved:
Last query:
Last reply:
Revision history for this message
Best Roger Light (roger.light) said :
#1

I've created a packet and put a description of it at http://mosquitto.org/files/packets/ I hope it helps!

For reference, I used a program using the mosquitto code to do this so I was less likely to get it wrong. The code is at test/packet-gen.c in the repository (or see http://bitbucket.org/oojah/mosquitto/src/tip/test/packet-gen.c )

Revision history for this message
cogitoergosum (nags) said :
#2

Thanks Roger Light, that solved my question.

Revision history for this message
cogitoergosum (nags) said :
#3

Hi Roger,
Thanks a lot !

It helps. I will be now running a few experiments of my own to co-relate with the output you have shown.