Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for v3.1 sub protocol (Paho Library) #2

Open
francois-normandin opened this issue Jun 18, 2022 · 1 comment
Open

Support for v3.1 sub protocol (Paho Library) #2

francois-normandin opened this issue Jun 18, 2022 · 1 comment

Comments

@francois-normandin
Copy link
Member

The Paho library for Websockets uses a subprotocol version for distinction between 3.1 and 5.0 of MQTT.
As such, the CONNECT packet's variable header can have a different protocol name (0x00, 0x06 instead of 0x00-0x04).

Verify requirement change to support subprotocol. MQTT spec mentions that server MAY support subprotocols if desired. To be able to use the Paho WS library for javascript, this would be a nice-to-have in the control packets parsing algorithm.

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718083

@francois-normandin
Copy link
Member Author

Turns out the Paho library still supports 3.1 where CONNECT packet was 2 byte longer with protocol name MQIsdp.

Since the CONNECT Packet assumes a fixed length variable header of 10 bytes, the 12 byte packet is rejected as a protocol violation.

Solution to support different header in CONNECT packet is simple but need to go through the previous protocol to see if there are any incompatibilities.
ref: http://stanford-clark.com/MQTT/#connect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant