contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.72k stars 2.58k forks source link

Add Multiple Interface Support #530

Open g-oikonomou opened 10 years ago

g-oikonomou commented 10 years ago

This is something that has been discussed a few times in the past. The discussion in #422 reveals that some members of the community think it's a good idea, for instance for devices combining an ethernet and a .15.4 interface.

michaelkirsche commented 10 years ago

I also think that support for multiple (radio) interfaces is a great thing. Not only for the typical "IoT Gateway" with a 802.15.4 radio and a Ethernet interface, but also for certain sensor node platforms that support different and/or multiple radios.

We've been porting Contiki for the Libelium Waspmote platform at our University group. The Waspmote node has support for two radio modules: e.g. 2x 802.15.4, 802.15.4 + 802.11 / Bluetooth / GPRS or any other combination. Surely, this is only a special application field but the overall support of multiple interfaces in Contiki would be a great enhancement in my book.

darconeous commented 10 years ago

This is something I've been thinking about as well, but this will require some significant rearchitecting, since the way the netstack code is written is very much based on the assumption of one single interface.

We could end up doing something like the trick I do in SMCP, where some preprocessor magic removes the instance pointer from all functions when compiled with settings indicating that there is only one global instance.

Also, with multiple interfaces comes routing. Would using @adamdunkels's LWIP start to make sense in such a case?

If you have multiple interfaces, it may make sense to use something like FreeRTOS, and simply run Contiki in a thread as a "Virtual NCP" and just use whatever ethernet capability is built into FreeRTOS.

michaelkirsche commented 10 years ago

We've built an example solution for the Waspmote platform, by providing buffers per interface, extending the required function calls with an interface parameter and several other smaller changes.

Using @adamdunkels LWIP might make sense for "larger" hardware platforms, but for our resource constrained sensor nodes, uIP is still the best thing. We didn't yet build a bridge functionality, re-routing a packet from (e.g.) Bluetooth over IEEE 802.15.4 networks might require it. Simply forwarding packets on the same interface can be handled (probably not a generic solution) with flags or an interface table. As I said, we were looking for a solution of multiple radio interfaces, larger platforms with Ethernet interface might require other solutions...

aguirrem commented 9 years ago

Hast there been any more progress on this front?

michaelkirsche commented 9 years ago

Not from our side. We stopped working with the Waspmote platform and Contiki for the moment. I don't know the status of multiple interfaces in Contiki 3.x though...

jdamme commented 8 years ago

Checking this thread if any progess has been made on this in over a year.