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

MQTT Connection with Username an Password not working #14

Closed
xoseperez opened this issue Dec 23, 2016 · 7 comments
Closed

MQTT Connection with Username an Password not working #14

xoseperez opened this issue Dec 23, 2016 · 7 comments

Comments

@xoseperez
Copy link
Owner

Originally reported by: PfisterD (Bitbucket: PfisterD, GitHub: PfisterD)


Connection with Username an Password not working.
I tested with CloudMqtt.com and dioty.co.

@xoseperez
Copy link
Owner Author

Fixed #14 MQTT Connection with Username an Password not working

@xoseperez
Copy link
Owner Author

Sorry, closed by mistake, still testing

@xoseperez
Copy link
Owner Author

I've been doing some more tests and it works pretty well with mqttClound but I'm running into reliability issues when using my local mosquitto. I run the AsyncMqttClient example code without problems but when I use the same code in my firmware it disconnects very often from the broker. It's the same with or without authentication. And it does not happen when using mqttCloud.
I'm still debugging.

@xoseperez
Copy link
Owner Author

Original comment by PfisterD (Bitbucket: PfisterD, GitHub: PfisterD):


This Code works with Dioty.co fine but with cloudmqtt.com i have many Disconnects

const char usr = strcpy((char)malloc(user.length()+1), user.c_str());
const char pwd = strcpy((char)malloc(pass.length()+1), pass.c_str());

@xoseperez
Copy link
Owner Author

Commit adb290e above does just that. I have not worked on it further but I'm not sure it's related to authentication....

@xoseperez
Copy link
Owner Author

Probably reduced to issue #35 right now.

@xoseperez
Copy link
Owner Author

Username and password connection has been working fine for the last few days. MQTT connection drop are very infrequent after 1.4.3

xoseperez added a commit that referenced this issue Jan 24, 2018
xoseperez pushed a commit that referenced this issue Jan 24, 2018
Fixing use after free bug that leads to corrupted auth credentials

Approved-by: Xose Pérez
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