x-ryl669 / esp-emqtt5 Goto Github PK
View Code? Open in Web Editor NEWA optimized MQTTv5 client for ESP32
License: MIT License
A optimized MQTTv5 client for ESP32
License: MIT License
I don't quite get how to end the AUTH exchange when using the enhaced authentication feature. I'll explain:
First I send a connect using the connectTo method including the authData and authMethod properties.
If the authMethod is supported by the broker, it sends back and AUTH packet with reason code 24, continue authentication, this triggers the authReceived function back in the client to process the data. So far, so good.
Then, I send the response back to the broker with the auth method, this sends an AUTH packet to the broker with reason code 24 continue authentication and the data needed to end the authentication in the broker.
Lastly, my broker sends back a CONNACK packet with reason code 0 success if the data is correct or 135 not authorized if it's not.
At this point, the auth method fails with an error code 130 Protocol error.
Now, if I'm reading your code correctly, after the auth method sends the AUTH packet, it waits for the response, but only considers the case of the response being another AUTH packet and not a CONNACK one, so it dismiss the packet as a Protocol Error.
Shouldn't the auth method consider the case of the response from the broker being a CONNACK packet or there's something else I'm missing?
Thank you in advance.
Arduino code base is really lacking any form of MQTT5.0 client libraries, I think this could extremely useful not just to me but too many other people running this software on a host of the latest boards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.