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

Questions tagged with Internet of Things

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

Connect IOT Core, Kafka Rule to managed Confluent Kafka cluster

I am testing the IOT Core integration to Kafka via the Kafka rule action. The Kafka cluster is a Confluent Managed Kafka in "Confluent Cloud" (which is on AWS, but as a SAS service). The documentation is very sparse on how to connect to external kafka clusters. I used the Destination VPN and setup various combinations of EINs with EIP, NAT gateway , Internet Gateway. I opened all security groups in and out with no blocking. I verified routes are routing external traffic though the IGW I used the Accessability tool in VPC to verify that end to end, the IGW and IOT ENIs were accessable to each other (yes) I verified via a test java program that the kafka cluster is publicly reachable (via laptop) I verifed the same in a EC2 instance in the VPC. I used VPC flow logs and see traffic in and out of VPN on the kafka port to the correct IP addreesses On kafka side, verified java tests succeeded in posting messages I tested default VPC and a new VPC with no other components - same result. No matter what I do I get the same error and no messages in kafka COnfiguration is using SASL_SSL with PLAIN auth. Secrets are using the SASL plain user/passord in secrets. Error: { "ruleName": "KafkaNewDest", "topic": "xxxx/iot-user/george", "cloudwatchTraceId": "c9b00bd9-473a-f106-b70b-c7d1cca1b0b9", "clientId": "iotconsole-dea798d2-833a-4924-97d7-b954e169218c", "base64OriginalPayload": "ewogICJjb3VudCI6IDEKfQ==", "failures": [ { "failedAction": "KafkaAction", "failedResource": "dev.priv.dmm.test", "errorMessage": "KafkaAction failed to send a message to the specified bootstrap servers. Topic dev.priv.dmm.test not present in metadata after 1000 ms.. Message arrived on: xxxx/iot-user/george, Action: kafka, topic: dev.priv.dmm.test, bootstrap.servers: pkc-xxxx.us-east-2.aws.confluent.cloud:9092" } ] } Any suggestions on what to try next ? Odd data point -- using a totally invalid user or password does not change the results. Same error.
1
answers
0
votes
29
views
asked 15 days ago
  • 1
  • 12 / page