Connect to any mqtt broker using mqtt.py with values for username, clientId, password and/or will-message so that the "remaining length" of the connect message exceeds 128, i.e.:
The broker will reset the connection after receiving the CONNECT packet.
What were you expecting to happen?
The broker should not reset the connection.
Any logs, error output, etc?
Unfortunately no. After reading the code and the mqtt specification, I found out, that mqtt.py does not implement the "remaining length" field correctly for values above 128. See mqtt 3.1.1 specification
Any other comments?
The publish packet seems to implement this field correctly.
What are the steps to reproduce this issue?
What happens?
The broker will reset the connection after receiving the CONNECT packet.
What were you expecting to happen?
The broker should not reset the connection.
Any logs, error output, etc?
Unfortunately no. After reading the code and the mqtt specification, I found out, that mqtt.py does not implement the "remaining length" field correctly for values above 128. See mqtt 3.1.1 specification
Any other comments?
The publish packet seems to implement this field correctly.