1 of 1 people found this helpful
the MQTT code provided on GitHub is providing this error
--> Could you provide the github link of the code for which you are facing this issue?
Also for chapter 8, could you try out the codes available at CypressAcademy_WW101_Files/Projects/ww101key/08 at master · cypresssemiconductorco/CypressAcademy_WW101_Files · GitHub and check if it works?
The original source was the github repository.
I have re-downloaded the source and make file and have reproduced this error (please check there is some typo in source actually "*_SUBCRIBED".
At any rate, the MQTT is still not working and I continue to get same error.
I should mention I am using out of box CYW954907AEVAL1F with "out of box" github source. I am able to connect to my WIFI but MQTT is not connecting. Any more suggestions or clarification around initializing MQTT or "Error Code 4".
Yes, there is a typo in the source where WICED_MQTT_EVENT_TYPE_SUBSCRIBED is written as WICED_MQTT_EVENT_TYPE_SUBCRIBED.
Regarding "Error code 4", i too faced this issue.
At line 812 I changed
conninfo.peer_cn = (uint8_t*) "*.iot.us-east-1.amazonaws.com"
conninfo.peer_cn = (uint8_t*) "*.iot.ap-south-1.amazonaws.com"
and the MQTT connection went through. Try changing this line based on the region from which you are accessing AWS and the connection should go through.