Shreya
Shreya

Reputation: 1

I m trying to replicate a digital twin model in IOT using contiki OS and cooja simulator , how to create a network topology with intermediate nodes?

We want to know how exactly to replicate a model from a research paper in contiki. The problem while creating 3 source nodes, intermediate nodes and a sink node is packets are sent directly also to the sink whereas i want all the packets to go through intermediate nodes before reaching sink node. Help me which code to select while creating intermediate nodes , if i m writing my own code i m getting errors while compiling.

The problem while creating 3 source nodes, intermediate nodes and a sink node is packets are sent directly also to the sink whereas i want all the packets to go through intermediate nodes before reaching sink node. Help me which code to select while creating intermediate nodes , if i m writing my own code i m getting errors while compiling.

Upvotes: 0

Views: 64

Answers (1)

AleMarquis
AleMarquis

Reputation: 1

Since you don't specify the protocols you are using in your simulation, I'm assuming standard IETF IoT protocols (IEEE802.15.4, 6LoWPAN, with RPL-Lite routing).

One quick "fix" is just lowering the transmission range of all devices so the only possible route is through the intermediary node. This lowers the "truthfulness" of your application to the real-world counterpart. Since you said it was a digital twin implementation, I'd be careful with this approach.

Part of using a routing protocol is to facilitate creating and maintaining working routes to connect your nodes. You should be able to control preferred downward routes using RPL storing mode, as Path Control is described in RFC6550 Section 9.9

If you are using default RPL-Lite (non-storing mode), it creates a Routing Tree at the beginning of the simulation. In this mode, all packets that need routing must go upward to the tree root to be forwarded downward, unless it reaches its destination on the route up.

If the sink node is in the source node's transmission range and is the network's root, it will ignore any unnecessary steps toward its end goal when creating the Routing Tree (DODAG), hence skipping intermediate nodes. Instead of sending it directly to the sink you can send it to the intermediate node and make a callback function after the intermediate reception that reroutes the packet to the sink. This should work even if you use some form of encryption, but may increase the end-to-end latency a bit.

Even not following this "solution" you should browse the RPL function docs to see if there is a function that helps you achieve your goal if you want to use RPL.

Upvotes: 0

Related Questions