I successfully ran the sample example shadow.c in demo.aws.iot.shadow.thing_shadow for CYW954907AEVAL1F platform. I have configured my WICED device via Chrome and I was able to initialize the WICED AWS library successfully. You can find the attached snapshot of the terminal for the same.
Can you provide the changes you did in the code example to get a better understanding of the problem? If possible, you can provide the application as well to resolve the issue.
Also, what server have you selected in AWS IoT? You can change the server to your nearest location in AWS IoT cloud. (for e.g. us-east-1 or ap-east-1). Make sure to do the required changes in the code example as well.
3.PNG 20.7 K
Thank you for your comment.
As I posted above, the application is demo.aws.iot.shadow.thing_shadow. I only changed endpoint on shadow.c and VALID_PLATFORM on thing_shadow.mk. No other changes made at all.
The location of AWS IoT server should not affect this since it is failing before making the connection. wiced_aws_init() is 100% local thing.
And again, the only difference between success case and NG case is the browser, Chrome or Firefox. And I hear from someone else saying Chrome worked fine on Windows10.
So, I am not sure what specific environment is causing this issue, but just wanted to hear if there is known issue.
And at least, for those who are facing the same issue, this post can help to try Firefox.
You have done the correct changes in the code example. You are right that in your case it is failing before the connection gets established, so the location of AWS IoT server won't affect much. The example should ideally work for both the browsers. Their should be no issue if you configure your device via Chrome or Firefox.
Just wanted to make sure, have you copied the private key, client certificate and root certificate in the locations that are provided in the thing_shadow.mk file. You can refer the following snapshot:
You need to provide the private key and the client certificate in the location: resources/certificates/. Similarly, the Root CA certificate at apps/aws/iot. These are the certificates and key that you generated in the AWS IoT cloud. Make sure the names of certificates and private key remains the same as specified in the thing_shadow.mk file. WICED_AWS_INIT verifies these AWS IoT credentials. But, as the code example is working via Firefox, I guess you may have done these changes.