Hi,
I am tyring to connect to MQTT broker using the qapi APIs (qapi_Net_MQTTc_*()). I am getting respose -20034 "Bad user name or password".
With the same MQTT broker end point and the same credentials I am able to connect via MQTT Explorer client. (http://mqtt-explorer.com/)
Is there any limitation on the password size in "qapi_Net_MQTTc_Set_Username_Password()". For me the password size is around 512 Bytes.
Regards,
Jagan
I have tried using 512 bytes long username/password and no issuse seen locally.
Below are the instructions for QCLI_demo, kindly make sure you are using the exact sequence:
> net mqttc init
> net mqttc new quartz-mqtt-client 1
> net mqttc config 0 -u adminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadminadm
> net mqttc connect 0 192.168.1.30 -n -k 60 -w 5
> net mqttc subscribe 0 -t quartz -q 2
> net mqttc publish 0 -t quartz -q 1 -m "Hello, World!"
Thanks Raja for the response.
There was an issue in my code. The password length was set incorrectly in my code, hence the error. After setting correct password the issue is fixed.
Regards,
Jagan
Yeah, this is the most common problem:)