Questions tagged with Amazon FreeRTOS
Content language: English
Sort by most recent
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: C220.127.116.11.STM 3 180546 [Tmr Svc] WiFi firmware is up-to-date. 4 180552 [iot_thread] [INFO ][DEMO] ---------STARTING DEMO--------- 5 180560 [iot_thread] [INFO ][INIT] SDK successfully initialized. 6 185637 [iot_thread] [INFO ][DEMO] 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_C18.104.22.168) through Inventek website.
What FreeRTOS Boards are fully supported for OTA updates?
I’m aware of the supported devices for FreeRTOS [here](https://freertos.org/RTOS_ports.html?_ga=2.165111679.1380880367.1658266296-1765742849.1658253566), but I’m wondering if all of these also fully support OTA updates with AWS IoT OTA feature. I am specifically asking if these devices would fully work with OTA updates out of the box if they simply have FreeRTOS installed. I’m asking because I have learned that certain FOTA solutions from other companies claim to support their entire RTOS, yet only works on a select few devices because each device needs an additional “flashing driver” that actually takes the received update and flashes it to the device’s custom memory. These drivers are custom to each specific board within broader families of MCUs. So I am wondering if all FreeRTOS supported MCUs have this capability to flash to the specific device's memory, or if it is only supported on a subset of chips? For example, looking at demos, I only see OTA examples for ESP32 MCU, but are there any other examples, or is OTA only supported on these?
Is this specific board "ESP32-S2-DevKitC-1" compaitble with IoT Core, FreeRTOS Quick Connect and setup, etc?
[this page](https://docs.aws.amazon.com/freertos/archive/202012.00/userguide/getting_started_espressif.html) explains how to easily connect. Does this also work with DevKitC-1 or only DevKitC-4? Does my specific devboard support quick connect and all the benefits listed [here](https://devices.amazonaws.com/detail/a3G0h0000077nRtEAI/ESP32-WROOM-32SE)? I don't have much experience, so any help would be greatly appreciated.
ota esp32 demo code error
cmake -DVENDOR=espressif -DBOARD=esp32_devkitc -DCOMPILER=xtensa-esp32 -G Ninja -S . -B ..\build\ -- Configuring done -- Generating done -- Build files have been written to: C:/gau/AWS/ESP32/freertos-1643010662146/build cmake --build ..\build\ C:\gau\AWS\ESP32\freertos-1643010662146\FreeRTOS>cmake --build ..\build\ In file included from C:/gau/AWS/ESP32/freertos-1643010662146/FreeRTOS/vendors/espressif/esp-idf/components/newlib/platform_include/time.h:22, from C:/gau/AWS/ESP32/freertos-1643010662146/FreeRTOS/libraries/3rdparty/mbedtls/include/mbedtls/platform_time.h:77, from C:/gau/AWS/ESP32/freertos-1643010662146/FreeRTOS/libraries/3rdparty/mbedtls/include/mbedtls/platform.h:68, from C:/gau/AWS/ESP32/freertos-1643010662146/FreeRTOS/libraries/abstractions/pkcs11/corePKCS11/source/portable/mbedtls/core_pkcs11_mbedtls.c:46: c:\users\rhonakam\.espressif\tools\xtensa-esp32-elf\esp-2021r1-8.4.0\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\time.h:303: note: this is the location of the previous definition #define CLOCK_BOOTTIME ((clockid_t) 7) [11/1651] Building C object CMakeFiles/afr_tls.dir/vendors/espressif/esp-idf/components/mbedtls/port/esp_bignum.c.obj ninja: build stopped: subcommand failed.
Building Amazon FreeRTOS example in Eclipse for ESP32
Hello, I downloaded Amazon FreeRTOS from AWS page for ESP32-devkitc board and wanted to test MQTT example. I have ESP IDF and using Eclipse IDE which by default comes with ESP-IDF, but I am not able to build the example as there it is not showing "build" option for any of those examples. So... 1. After downloading Amazon FreeRTOS, How to import example in Eclipse. 2. If required then what are configurations i need to do and how to build the example in Eclipse.
FreeRTOS MQTT not connecting with Mi-Fi router
Hi, I have an IoT device based on the FreeRTOS shadow PIC32 demo. When it's connected to a standard DSL Wi-Fi router it works fine, subscribes to the IoT shadow and everything works OK. However, when I connect to a Mi-Fi 4G router on the sky mobile (O2) network, it fails to connect to MQTT. I have made sure that I can connect on port 8883 to AWS endpoint on the Mi-Fi 4G router using powershell command: ``` test-netconnection -computer am3w08epmsyee-ats.iot.eu-west-2.amazonaws.com -port 8883 ``` A connection is established OK. This is the console out when it fails: ``` 33 14822 [IP-task] Socket sending wakeup to MQTT task. ... 44 24823 [MQTT] About to close socket. 45 25823 [MQTT] Socket closed. 46 25823 [MQTT] Notifying task. 47 25823 [MQTT] Received message 0 from queue. 48 25824 [IoTShadowClient-Init] Command sent to MQTT task failed. 49 25824 [IoTShadowClient-Init] [Shadow 0] MQTT: Connect failed. 50 25824 [IoTShadowClient-Init] AWS shadow client connect unsuccessful, returned 2. 51 25824 [IoTShadowClient-Init] Failed to connect shadow client.` ``` I have debugged the code and found that the ***prvSendCommandToMQTTTask ***function returns '***eMQTTCouldNotBeSent***' in the receive message identifier. I have checked all the router settings, firewall is currently off. I have ensured that port 8883 is open. I am using a TP-Link router MR6400 using Sky Mobile (O2). It's worth noting that I have also tried on a Hauwei router also with the same result. Any ideas welcome. Thanks.
Developer-mode Key Provisioning - Option #2
In this link: https://docs.aws.amazon.com/freertos/latest/userguide/dev-mode-key-provisioning.html In Option #2, what is the purpose of the following? > openssl genrsa -out tempCsrSigner.key 2048 >openssl req -new -key tempCsrSigner.key -out deviceCert.csr Why can't rootCA.pem (which has been registered) be used to sign device public key (DevicePublicKey.pem) directly? I also don't understand the below: >openssl x509 -req -in deviceCert.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out deviceCert.pem -days 500 -sha256 -force_pubkey DevicePublicKey.pem Why use "-force_pubkey"?
Can't include unity.h for unit testing with aws freertos
Hi, I would like to set up unit testing in my project. I had an issue with including unity.h as it was not detected. I recently found that unit test folders for AWS components always have a unity folder in them. Would it be possible to make unity.h as a component that can be included in projects or is the only way to also include a unity folder in my project ? Thank You
How to Suspend and Resume a Thread created using Iot_CreateDetachedThread?
Namaste Forum Member, My development environment comprises of **ESP32 DevKitC** and **Amazon FreeRTOS**. For Thread creation, I'm using the **Iot_CreateDetachedThread** function offered by the **AWS IoT Device SDK C**, which has the below syntax ``` bool Iot_CreateDetachedThread( IotThreadRoutine_t threadRoutine, void * pArgument, int32_t priority, size_t stackSize ) ``` **Questions** relating to the Thread created are: 1) How to get the **Thread Handle** of this Thread for using with FreeRTOS API? 2) How to **Suspend** and **Resume** this Thread, similar to the FreeRTOS APIs **vTaskSuspend()** and **vTaskResume()**? **Reference Links**: 1) **AWS IoT Device SDK C** - https://docs.aws.amazon.com/freertos/latest/lib-ref/c-sdk/main/index.html 2) **Iot_CreateDetachedThread** - https://docs.aws.amazon.com/freertos/latest/lib-ref/c-sdk/platform/platform_threads_function_createdetachedthread.html Thanks | Regards, Dipen