openthread / wpantund

Wireless Network Interface Daemon for Low-Power Wireless SoCs
Apache License 2.0
174 stars 111 forks source link

wpantund on NCP? #504

Closed farhangj closed 3 years ago

farhangj commented 3 years ago

Problem Statement: OpenThread network is meant to provide low power mesh networking, however the means to connect the network to the internet (i.e. via Border router) doesn't seem to support low power use cases. I.e. where wall-powered linux router isn't available.

Assume a use-case where OpenThread is not near any local network (Wifi or Ethernet), only a cell LTE-M/NB-IoT modem is available via a UART AT cmd interface to provide internet access to all nodes of the Thread network (FTDs and SEDs). The OT network is low power, LTE-M is low power, the only thing that is not is the OTBR, running a high power linux machine (e.g. Rasberry Pi)

Has anyone heard of or considered making a low power embedded friendly version of wpantund and whatever else is required for the operation of OTBR?

From README file of wpantund "Portability across Unix-like operating systems (currently supports Linux. BSD support should be fairly trivial to add)"

does this mean one could port this to e.g. zephyr OS and run on a Nordic nRF52 fairly easily - potentially the same chip that's working as NCP? Any pointers would be great.

abtink commented 3 years ago

Adding some hints here which hopefully help:

farhangj commented 3 years ago

@abtink thanks for the hints.

4th bullet point is interesting.

Are there any examples that use the SoC model? Or any C drivers that could help make it happen? Zephyr does provide networking, socket and IPV6 drivers, just not fully sure how I can put all of these together. The goal would be to have the OT Thread router of the network act also as the internet router, translating the packets received via LTE-M over UART and distributing within the OT network (to the SEDs or other routers that aren't connected to a modem)

Seems like there's no "out of the box" OTBR with low power in mind.. I'm happy to do some coding, just need some more details on the architecture.

jwhui commented 3 years ago

You can find an example of an RTOS-based border router in the ESP-IDF:

Hope that helps.

farhangj commented 3 years ago

@jwhui Thanks, but that example is connecting to a wifi router. All I have in my network is a LTE-M modem with AT cmd interface. e.g. can connect to end points and send/receive data. but it has no routing capabilities. This LTE-M modem is connected to a Nordic processor e.g. nRF52840 with a AT cmd modem driver - while simultaneously an FTD of the OT network.

I'd like to be able to provide IP connectivity through this processor for all the MTDs/SEDs in the network. Is this possible using networking drivers that Zephyr provides? I do realize the question is a bit out of scope of wpantund...

jwhui commented 3 years ago

I presume the cellular link is just another IP-based network interface. In that case, it is just IP routing between the cellular network and Thread network and should not be much different than routing via a Wi-Fi or Ethernet interface.

As long as Zephyr supports IP forwarding between two network interfaces, it should be possible to have a Zephyr-based devices serve as a Thread border router.

jwhui commented 3 years ago

Closing stale issue.