mbed nanostack mac supports multiple phy layers

27 Jan 2017

Hello,

I am working with an mbed project, which uses the nanostack mac implementation. I'd like to support two interfaces, let's say ethernet and RF. The nanostack mac is responsible to choose one of the phy layer to communicate with other nodes. The communication performances is evaluated following LQI index, and the phy choice is therefore updated at time and one phy at time. My question is how I can support this mechanism. As far as I understand, it seems be a good point to use the function. mac_api_t *ns_sw_mac_create(int8_t rf_driver_id, mac_description_storage_size_t *storage_sizes) to create MAC interfaces. But how to let the nanostack to select one of the phy layer?

Any hint is highly welcomed.

Thanks in advance

Haisheng

07 Aug 2017

Hello, Takalo,

Thank you very much for your response. I come back about this question. In fact, we are developing a router device with 2 network interfaces, I posted my question in the forum with this link: https://developer.mbed.org/forum/mbed/topic/27906/ but with no feedback. Basically, we need run 2 stacks, one for each interface, right? I have much difficulty to make things progress. Could you please tell me if it is possible to realize this work with the current nanostack release? It seems, in most of the case, people are just happy to realize a star network with the border router.

Let’s say interface 0 connected to the border router, and interface 1 to the cable network. I followed and modified the border router implementation. For interface 0, it is always ok. But for interface 1, it doesn’t work.

It is supposed to get two socket id, as for the border router [DBG ][sck ]: Socket id 0 allocated (ethernet)

[DBG ][sck ]: Socket id 1 allocated (6lowpan)

But with our implementation, I have just got one socket id 0

[DBG ][sck ]: Socket id 0 allocated (interface 0)

For interface 1, the socket service can not be created. Somme shared variables for the socket service?

I am wondering if you have any example to implement a router in a mesh network.

Any suggestion is highly appreciated.

Thanks in advance

Haisheng