odelot / aws-mqtt-websockets

Implementation of a middleware to use AWS MQTT service through websockets, aiming the ESP8266 plataform
GNU Lesser General Public License v3.0
231 stars 67 forks source link

Failed to connect with aws iot #41

Open ravikarthi opened 6 years ago

ravikarthi commented 6 years ago

wss://xxxxxxx.xxxxxx.amazonaws.com/mqtt

Here I have used above end point for the mqtt web socket server as per the amazon's document. but the problem is I can't connect to the aws. my program is trying to connect more than 20 times .. it prints as below

client id function has executedclient Id:⸮a2.⸮⸮⸮K⸮⸮⸮:EP⸮  failed, rc=-21229389 - conn: 24 - (39096) client id function has executedclient Id:⸮⸮Z⸮d⸮6⸮⸮GG z⸮⸮⸮.⸮ ⸮⸮l failed, rc=-21280398 - conn: 25 - (39064) client id function has executedclient Id:⸮U⸮XZ⸮⸮⸮1⸮⸮⸮⸮w⸮⸮Tm failed, rc=-21331409 - conn: 26 - (39032) client id function has executedclient Id:r⸮⸮⸮\B⸮⸮⸮⸮4⸮q⸮5ʫ⸮ failed, rc=-21382421 - conn: 27 - (39000) client id function has executedclient Id:⸮⸮,⸮⸮⸮⸮⸮YIW⸮v⸮⸮8⸮⸮m⸮ failed, rc=-21433928 - conn: 28 - (38928) client id function has executedclient Id:⸮⸮⸮⸮
S⸮⸮D⸮G⸮⸮Ll⸮⸮⸮ failed, rc=-21484938 - conn: 29 - (38936) client id function has executedclient Id:⸮⸮**⸮QB,>⸮⸮⸮⸮⸮⸮⸮ T43t

Kindly do the needful.

davidOSUL commented 4 years ago

I know this is old but to anyone else reading this... make sure you have the versions of the sdk, etc. as specified in the README. ("1.2.0 - tested with arduinoWebSockets v.2.1.0, arduino/esp sdk 2.4.1 and pubsubclient version v2.6.0"). This fixed this problem for me. (also did this: https://github.com/odelot/aws-mqtt-websockets/issues/44#issuecomment-452436665)