aws / amazon-freertos

DEPRECATED - See README.md
https://aws.amazon.com/freertos/
MIT License
2.54k stars 1.1k forks source link

ERROR: Handshake failed with error code -29312 #1832

Closed KunjalRupala closed 4 years ago

KunjalRupala commented 4 years ago

Describe the bug I am trying to run a demo code of greengrass connectivity but whenever I try to flash it, I get "ERROR: Handshake failed with error code -29312"

I am attaching a screenshot of the same.

Screenshot from 2020-03-13 15-51-47

Link to log: https://gist.github.com/KunjalRupala/ddcd43c88166cd0642c3e330e0018ee8

Thank you!

sameerdasarwad commented 4 years ago

look like something wrong in certificates but cant say exact reason if you on mqtt debug will be useful , turn mqtt debug for additional logs in config-> aws_mqtt_config.h

dachalco commented 4 years ago

@sameerdasarwad Thank you for your suggestions. It's great to see the community working together!

@KunjalRupala The error in red indicates an attempt to retrieve an object from NVS memory that either does not exist, or is at least empty. Excluding keys and confidential data, could you please provide more details on your configurations in amazon-freertos/vendors/espressif/boards/esp32/aws_demos/config_files/iot_pkcs11_config.h, or of a similar pkcs11 configuration file in use?

@lundinc2 Could you also please take a look at this?

KunjalRupala commented 4 years ago

@sameerdasarwad I tried what you suggested but I think it's just the same as it was. I am attaching my logs here. https://gist.github.com/KunjalRupala/a5f728d68b14e581555e3a6c2b67c9d7

@dachalco Here am attaching my pkcs11 configuration file. https://gist.github.com/KunjalRupala/82c0839936496111442b54c7b89ea97d

In addition to that I am also not able to figure out why is the system not able to retrieve Greengrass address and certificate.

sameerdasarwad commented 4 years ago

@dachalco I'm happy to help @KunjalRupala i just see logs found nothing but i deal with similar problem ,
can you enable mbedTLS debugging from menu config -> component config -> mbedTLS

KunjalRupala commented 4 years ago

@dachalco Here it is https://gist.github.com/KunjalRupala/bcc928800338c3355cdf1d2d84b117e8

KunjalRupala commented 4 years ago

The demo code runs as expected when I shift from my router to mobile network. It shows this error only when I am connected to my router.

dachalco commented 4 years ago

@KunjalRupala

If it works on your mobile network but not the router, it may be a firewall issue or other router setting. Do you notice any settings that differ between your mobile and router, such as port restrictions?

Some additional info:

lundinc2 commented 4 years ago

@KunjalRupala I am going to close this issue, as it has become inactive. Please reopen it should you need further assistance.