FKainka / NanoESP

New NanoESP Library
19 stars 9 forks source link

MQTT-Connection with authentification is broken #1

Open bitfreak25 opened 7 years ago

bitfreak25 commented 7 years ago

As I tried to connect the NanoESP with my MQTT-Broker with password-authentication, I get a connection, but publish and subscribe don't work. This problem occurs because of a bug in "NanoESP_MQTT.cpp" on Line 71, where connectFlag wasn't shifted, when boolLastWill is 0. My solution was to add an else in Line 82 that looks like the following: } else { connectFlag = connectFlag << 4; }

Maybe this could be solved for the next release.

FKainka commented 7 years ago

You are right, thanks!