whitefield-framework / whitefield

Whitefield provides a simulation environment for wireless sensor networks by combining RF simulation provided by NS3 and network stack provided by popular IoT OSes such as Contiki/RIOT/OpenThread.
GNU General Public License v2.0
82 stars 23 forks source link

Support multiple PLC leaf nodes #111

Closed Amrican10 closed 4 years ago

Amrican10 commented 4 years ago

Is there anyway to enable multiple PLC leaf nodes. This will extremely affect the hops from each node to sink. Please, check the following config lines, I need node 4 to be a leaf node (beside node 6):

plc_link[0]=1 #server1 plc_link[1]=2 plc_link[2]=3,NAYY150SE plc_link[3]=4 plc_link[4]=5 #why this connection is needed; start failed when I comment this line plc_link[5]=6 #server2

nodeExec[0]=thirdparty/contiki/examples/ipv6/rpl-udp/udp-server.whitefield $NODEID nodeExec[5]=thirdparty/contiki/examples/ipv6/rpl-udp/udp-server.whitefield $NODEID

nyrahul commented 4 years ago

Turns out that the NS3-PLC logic uses a graph for all the nodes/edges and it does not allow disjoint sets within the same graph. I need to debug more and check if there is any way to handle this. Any suggestions, welcome.

Amrican10 commented 4 years ago

The plc-test example showed that multiple leaf nodes as well as multiple interfaces and/or sinks are supported:

https://github.com/SabaFar/plc/blob/9e79ff4b04718463e3d9ed896e66e0dbf5f1a768/examples/plc-test.cc

It seems that PLCOutlet enables multiple connections for all nodes and PLC Tx/RxInterface enables bidirectional communication.

On Wed, Jul 15, 2020 at 9:09 PM Rahul Jadhav notifications@github.com wrote:

Turns out that the NS3-PLC logic uses a graph for all the nodes/edges and it does not allow disjoint sets within the same graph. I need to debug more and check if there is any way to handle this. Any suggestions, welcome.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/whitefield-framework/whitefield/issues/111#issuecomment-658951894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL6YDSXK7KZK4PVJ4SLWRVDR3X5GDANCNFSM4O2TX2YA .

nyrahul commented 4 years ago

I tried this setup, i.e, if I dont add RX/TX interface. If I dont add the interfaces then the sendframe asserts. send needs an interface to be used.

I just added code for creating outlet for every node and then selectively adding TX/RX interfaces. Everything works fine but when the node tries to send a packet, it asserts for nodes who do not have an interface.

nyrahul commented 4 years ago

image

This topology works for me. Can you try this in your env?

I use PLC_NetDeviceHelper helper class which seems to be internally adding the TX/RX interfaces mandatorily.

Amrican10 commented 4 years ago

@nyrahul It works fine with me. You can merge the latest PLC updates to the Master for more flexible configuration. Thanks a lot.

nyrahul commented 4 years ago

Closing as the fix worked.