- 最新
- 投票最多
- 评论最多
Hi misterb.
The fleet provisioning demo uses mbedTLS: https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/fleet_provisioning/fleet_provisioning_with_csr/mqtt_operations.c#L673lL692
Implementation of the transport layer here: https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/platform/posix/transport/src/mbedtls_pkcs11_posix.c
You can find more examples in the FreeRTOS and amazon-freertos repos.
Please see here: https://www.freertos.org/network-interface.html
The transport interface implementations included in the FreeRTOS download are split into two files - a wrapper C file specific to the TCP stack, and a supplemental C file specific to using a TLS stack with the selected TCP stack. For example, to use FreeRTOS+TCP with mbedTLS, build sockets_wrapper.c from the network_transport/freertos_plus_tcp directory in the source code distribution, then build using_mbedtls.c from the using_mbedtls subdirectory.
Available transports: https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS-Plus/Source/Application-Protocols/network_transport
mbedtls in particular: https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS-Plus/Source/Application-Protocols/network_transport/using_mbedtls/using_mbedtls.c
And part of the demos that use it: https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS-Plus/Demo/AWS/Mqtt_Demo_Helpers/mqtt_demo_helpers.c#L614-L624
The amazon-freertos repo contains embedded reference implementations for many boards. You can find a coreMQTT demo there: https://github.com/aws/amazon-freertos/blob/main/demos/coreMQTT/mqtt_demo_mutual_auth.c
An mbedtls transport implementation here: https://github.com/aws/amazon-freertos/blob/main/libraries/freertos_plus/standard/tls/src/iot_tls.c
The demo calls this through one of the secure sockets implementations:
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 9 个月前
- AWS 官方已更新 3 年前
Thank you Greg_B for the details guideline. However I struggle to port this over to my embedded linux platform. What I did was using the demo https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/fleet_provisioning/fleet_provisioning_with_csr/mqtt_operations.c#L673lL692 as a reference. I include the necessary header file one by one, then try to resolve the compile/linking errors one by one but to no success, it seems quite a hassle. I wonder if there is a more straight forward approach? Any pointer would be appreciated.