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

MQTTNet sends incorrect protocol version (83) #2122

Closed
victornor opened this issue Dec 7, 2024 · 0 comments · Fixed by #2125
Closed

MQTTNet sends incorrect protocol version (83) #2122

victornor opened this issue Dec 7, 2024 · 0 comments · Fixed by #2125
Labels
bug Something isn't working

Comments

@victornor
Copy link
Contributor

victornor commented Dec 7, 2024

Describe the bug

Even though I'm specifying version V310, the client sends
10 df 04 00 06 4d 51 49 73 64 70 (83) 82 00 0f 00
instead of the expected
10 df 04 00 06 4d 51 49 73 64 70 (03) 82 00 0f 00

Which component is your bug related to?

Client (Both RC 5 and 4.3.7)

To Reproduce

Connect using websocket or mqtt with protocol V310, observe the connect packet.

Expected behavior

I expect a connect packet with the following data
10 df 04 00 06 4d 51 49 73 64 70 (03) 82 00 0f 00

Code example

// Websocket
var mqttOptions = new MqttClientOptionsBuilder()
        .WithWebSocketServer(x =>
            x.WithUri(uri).Build()
        )
        .WithProtocolVersion(MqttProtocolVersion.V310)
        .WithCleanSession()
        .Build();

await mqttClient.ConnectAsync(mqttOptions);

// MQTT
var mqttOptions = new MqttClientOptionsBuilder()
        .WithTcpServer(uri)
        .WithProtocolVersion(MqttProtocolVersion.V310)
        .WithCleanSession()
        .Build();

await mqttClient.ConnectAsync(mqttOptions);
@victornor victornor added the bug Something isn't working label Dec 7, 2024
@victornor victornor changed the title MQTTNet sends incorrect protocol version (83) when using websocket MQTTNet sends incorrect protocol version (83) Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant