This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

openthread and aws_iot library

Hi, 

I am trying to connect the AWS_IOT library to a thread netork but find it really hard to get the TLS sockets working.

I have connectivity for normal TCP and MQTT as well as the NTP protocol.

But when I try to use secure tls sockets I get all kinds of clashes between the openthread MBEDTLS, the nrf_security variant and the normal MBED_TLS variant. 

There are hardcoded filenames for nrf-config.h that clashes with the config-tls-generic.h, and when I fix that then there are multiple definitions of the `struct mbedtls_md_info_t` causing compile errors.

I have tested a lot of combinations of various configuration options but so far it seems like a wet soap, just slipping out of my grasp all the time.


Can you get me started in the right direction? even a sample och echo TCP over thread that uses TLS would be a blast.

Parents
  • Hi Unitware,

    Sorry to hear your struggling, I have limited knowledge of nRF5 SDK, but I have other suggestions that may be useful for your exploration. 

    1. I strongly suggest you move to NCS/Zephyr solution instead of nRF5 SDK for new development, as you may realize that nRF5 SDK is now in the maintenance stage now, there will be no further update in the future. nRF5 SDK for Thread and Zigbee 

    2. The Zephyr Socket Echo Client/Sever examples demo how to use TLS/TCP exactly on different setups including OpenThead devices. You can discuss and report bugs in this active community to get help.

    3. The NCS Thread: CoAP Client example demos how to add CoAP on top of UDP/IP/Thread. nRF9160: Simple MQTT add MQTT on top of  TCP/IP/CellularIoT. These could be good references for you to create a new example like MQTT/TLS/TCP/IP/Thread.

    Best regards,

    Charlie

  • Hi, thanks for your answer!

    I am in deed using the nrf connect sdk 1.5.1 and started out with thr mqtt_pub example, and then tried to add the aws-iot-library from the nrf9160/aws_iot sample.

    Today I have started to test the zephyr/samples/../echo client and server with openthread and reenabled tcp.

    I can get some tcp transmissions through, but there is a lot to do until it works smooth and with out retransmissions and so on. I think this is a dead end due to the cumbersome setup and that thread is not really suited to do lots of tcp communications on anyway so I will park this thread for the moment.

    The solution I will investigate now will be based on coap and a custom gateway that translates coap to aws mqtt in the system, possibly as a single point of failure so it's not ideal either.

Reply
  • Hi, thanks for your answer!

    I am in deed using the nrf connect sdk 1.5.1 and started out with thr mqtt_pub example, and then tried to add the aws-iot-library from the nrf9160/aws_iot sample.

    Today I have started to test the zephyr/samples/../echo client and server with openthread and reenabled tcp.

    I can get some tcp transmissions through, but there is a lot to do until it works smooth and with out retransmissions and so on. I think this is a dead end due to the cumbersome setup and that thread is not really suited to do lots of tcp communications on anyway so I will park this thread for the moment.

    The solution I will investigate now will be based on coap and a custom gateway that translates coap to aws mqtt in the system, possibly as a single point of failure so it's not ideal either.

Children
No Data
Related