aws_iot example without network offloading

Hello,

I would like to know how to build the aws_iot example without network offloading to the modem. I need to make AWS connections through both the nRF9160’s LTE-M connection as well as through an Ethernet ENC424J600 controller (PHYTEC link board ETH or equivalent), only one of these two interfaces will be enabled at a time.

As I understand it, if I want to use more than one interface in my app, I have to disable sockets offloading (CONFIG_NET_SOCKETS_OFFLOAD=n), but doing that prevents enabling LTE connectivity (CONFIG_LTE_CONNECTIVITY=y). Hence my issues of having everything somehow use MbedTLS and being transparent to the AWS IoT library.

I have spent weeks trying to make the examples work independently and together (aws_iot, aws_iot_mqtt (which I cannot get to compile for the nRF9160DK because of build errors with TF-M), https_client and others) and cannot get anywhere close to where I need… I can make the dns_resolve work over Ethernet for example, by disabling the sockets offloading so that getaddrinfo() properly calls dns_get_addr_info() and such but putting everything together is a nightmare because of configuration incompatibilities with nRF Modem’s libraries…

I hope someone has any idea to help me here, thanks!

  • Thank you very much GilDev for the prompt response! This is extremely dissapointing to hear... The nRF9151 was marketted to myself and my team as capable of allowing our project to use both Cellular and Ethernet interfaces in a single application. 

    I have been looking around everywhere trying to find a way to avoid doing ugly hacks and modifying the Zephyr code directly - as we do not have a large enough team to justify maintaining our own fork following the necessary modifications you mention. 

    I haven't even begun to dive into the TLS side of things to keep things simple, but now this has me worried and wondering if we will need to use a seperate microcontroller to interface with our ethernet controller, as  this seems simpler than having to hack apart Zephyr code directly. 

    We cannot be the first to come across this issue, and will likely not be the last. I hope sincerely the nordic team can help us find a better solution soon.

  • We have the exact same challenges as you, couldn’t justify to maintain a fork but here we are anyway, scared by any SDK update we do as we have to patch things manually again every time. If we were to do it again, we would probably have put another MCU to handle the Ethernet part indeed. We have had great success with STM32 and Ethernet controllers in the past, but it adds another completely different development environment and other problems along the way (even more for secure communications with AWS, I’m sure).

    If you have some time to try this out with the nRF9160 devkit and some Ethernet controller dev kits like we did, maybe it’s a good way to try things out and see if it’s a good fit for your application. I don’t know if things have changed since my issues…

  • We have just received our first prototype boards as our hardware team has been working in parallel to my -fumbling about in Zephyr (first time using it), as we have shifted away from using an ESP32 and FreeRTOS... This quite frustrating given our original design had a seperate MCU for ethernet interfacing, but we moved away from that following a meeting with the Nordic staff which suggested it is possible (at  least from a hardware stance) to use both interfaces on a single MCU. To be fair, they are correc in that the nRF9151 has sufficient peripherals for all of our usecases, I just did not anticipate an issue such as this.

    I have submitted my own DevZone ticket regarding this issue, as well my colleagues are looking online for expert support so that we may resolve this issue without a Zephyr fork (if that's even possible). 


    You will be among the first to hear from me if I can resolve this issue and/or if things have changed since this post was originally made. 

    In the meantime, best of luck! 

  • Hardware can definitely do it, but network stacks are very complex and the software development required can be huge and complicated… This should really be tried out as much as possible because it’s harder or impossible to change platform later on, and generally the documentation doesn’t truly shows how easy or hard it is to implement.

    Please do keep me updated, that would be very interesting indeed!

    Best of luck!

Related