SiliconLabs / wiseconnect

Next-generation Silicon Labs Wi-Fi API for SiWx91x chipset family.
Other
15 stars 9 forks source link

MQTT client can not connect to broker with credentials. #2

Closed EmbeddedOS closed 1 year ago

EmbeddedOS commented 1 year ago

Hi there, I am using the SDK version 3.0.10. I found a bug when connecting to MQTT broker with credentials. Particularly, The user username and password length are not updated to object si91x_init_request before sending the request. You can see the file sl_mqtt_client.c:253 when si91x_init_request.username_len and si91x_init_request.password_len are not updated even though we set user name and password.

So I have a simply solution for it by adding some codes before we send the command:

    si91x_init_request.username_len = credentials->username_length;
    si91x_init_request.password_len = credentials->password_length;

Thank you

Silabs-Tarun commented 1 year ago

Thanks for sharing the concern as well as solution. This is now incorporated in latest release.