cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

JeCr_2235141
New Contributor

Hello,

I have completed the WICED WiFI Tutorial.  https://www.cypress.com/training/wiced-wi-fi-101-video-tutorial-series

I am working on AWS application using the development kit CYW954907AEVAL1F.  in Chapter 8 of the AWS tutorials, there are three versions for establishing connection with AWS Cloud. When I run the code MQTT, I am catching some error with initialization of MQTT.

pastedImage_2.png

I have checked my policies are consistent with following this post (AWS MQTT TCP receive error )

pastedImage_4.png

I am not sure what is error code 4, and I am also not sure how to debug this as the code was written for the dev kit, and I have only changed wifi access SSID/PC, and the endpoints, and Topic related information in AWS.  My certificates and Thing are working as desired with other scripts, but the MQTT code provided on GitHub is providing this error.

Thanks for any guidance on this issue.

Jerome

0 Likes
1 Solution
MuraliR_36
Moderator
Moderator

Hi

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" 

to

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.

Thanks

View solution in original post

0 Likes
3 Replies
MuraliR_36
Moderator
Moderator

Hi Jerome

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_WW... and check if it works?

Thanks

Murali

JeCr_2235141
New Contributor

Hello,

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".

Thanks,

0 Likes
MuraliR_36
Moderator
Moderator

Hi

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" 

to

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.

Thanks

View solution in original post

0 Likes