By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS IoT Core

Sort by most recent
  • 1
  • 12 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

FreeRtos sample for STM32_L475E_IOT01A cannot establish connection

I'm using STM32 L475E_IOT01A2 and I tried to run the sample "Connect to AWS IoT - STM32-B-L475E-IOT01A", however, it always failed to establish the connection. Actually, it always returned secureSocketStatus=-1. Actual message observed on the screen is attached below. 1 535 [Tmr Svc] Waiting for 180 seconds before generating key-pair 2 180541 [Tmr Svc] WiFi firmware version is: C3.5.2.7.STM 3 180546 [Tmr Svc] WiFi firmware is up-to-date. 4 180552 [iot_thread] [INFO ][DEMO][180552] ---------STARTING DEMO--------- 5 180560 [iot_thread] [INFO ][INIT][180559] SDK successfully initialized. 6 185637 [iot_thread] [INFO ][DEMO][185637] Successfully initialized the demo. Network type for the demo: 1 7 185647 [iot_thread] [INFO] Creating a TLS connection to a26800ryr2bs98-ats.iot.ap-northeast-1.amazonaws.com:8883. 8 185739 [iot_thread] [ERROR] Failed to establish new connection. secureSocketStatus=-1. 9 185753 [iot_thread] [WARN] Connection to the broker failed. Attempting connection retry after backoff delay. 10 186056 [iot_thread] [INFO] Retry attempt 2 out of maximum retry attempts 5. (I omit following message just indicating repetitions.) I think configuration for aws_clienetcredential_keys.h and aws_clientcredential.h is ok. In aws_clienetcredential_keys.h, keyCLIENT_CERTIFICATE_PEM and keyCLIENT_PRIVATE_KEY_PEM are provided as created by CertificateConfigurator. In aws_clientcredential.h, BROKER_ENDPOINT, IOT_THING_NAME, wifi address and password are set properly. In aws_demo_config, CONFIG_CORE_MQTT_MUTUAL_AUTH_DEMO_ENABLED is defined. Further, I checked and found the problem may exist the handshake of ES_WIFI_StartClientConnection. (Observed handshake sequence is below.) Cmd:P0=0 -> ret=0, Cmd:P1=3 -> ret=0, Cmd:P2=0 -> ret=0, Cmd:P3=(remote IP address) -> ret=0, Now, ES_WIFI_STATUS & TCP_SSL_CONNECTION are ok. Cmd:P9=2 -> ret=0, Cmd:P6=1 -> ret=5, which I think means UNEXPECTED_CLOSED_SOCKET I think it leads to ecureSocketStatus=-1. I repeated many times, however, the result was always the same. Please let me know how to solve this. As I'm really a beginner, your instruction would be highly appreciated. regards, CK Additonal Information: I downloaded latest sample module from AWS site. Also, I updated wifi firmware module(SPI_C3.5.2.7) through Inventek website.
1
answers
0
votes
53
views
asked 7 days ago
  • 1
  • 12 / page