Comments (10)
@philok93
The problem with plot-network seems to be contiki-ng specific.
Plot-network works by using cmd_def_route
from contiki-ng.
Currently, the default route returned by contiki-ng seems to be incorrect.
I use this API in contiki and contiki-ng to query the default route. For contiki-ng this doesn't seem to work!
Do you know which is the right API for contiki-ng?
from whitefield.
I found that you can use uip_ds6_defrt_lookup(uip_ds6_defrt_choose())
to return the default route ip address. Check this shell commands:
https://github.com/contiki-ng/contiki-ng/blob/develop/os/services/shell/shell-commands.c#L632
Here the change:
int cmd_def_route(uint16_t id, char *buf, int buflen)
{
const uip_ds6_defrt_t *route = uip_ds6_defrt_lookup(uip_ds6_defrt_choose());
return uiplib_ipaddr_snprint(buf, buflen, &route->ipaddr);
}
I tried it and I notice that at start when network is not formed, the routes all show to node 1:
wfsh# cmd_def_route
sl_cmd "0:cmd_def_route"
fd00::1
sl_cmd "1:cmd_def_route"
fd00::1
sl_cmd "2:cmd_def_route"
fd00::1
sl_cmd "3:cmd_def_route"
fd00::1
sl_cmd "4:cmd_def_route"
fd00::1
sl_cmd "5:cmd_def_route"
fd00::1
sl_cmd "6:cmd_def_route"
fd00::1
sl_cmd "7:cmd_def_route"
fd00::1
Then, it is correct:
wfsh# cmd_def_route
sl_cmd "0:cmd_def_route"
fd00::1
sl_cmd "1:cmd_def_route"
fd00::1
sl_cmd "2:cmd_def_route"
fe80::302:304:506:1
sl_cmd "3:cmd_def_route"
fe80::302:304:506:0
sl_cmd "4:cmd_def_route"
fe80::302:304:506:0
sl_cmd "5:cmd_def_route"
fe80::302:304:506:0
sl_cmd "6:cmd_def_route"
fe80::302:304:506:0
sl_cmd "7:cmd_def_route"
fe80::302:304:506:0
But plotting network still showing mess graph. It should recognise that a valid IPv6 starts with fe80 and not with fd00. So that's why servers have always fd00 default route.
from whitefield.
It was never expected that a stackline will report a global IP prefix in default route. Contiki-ng should fix this.
Whitefield did not take into account network prefix while plotting graphs.
Now it does.
Also, nodes who are not connected will show up in the plots.
@philok93, this should work for you.
from whitefield.
Yeah thanks a lot! Now works perfectly! :) If you can guide me how to make the graph (position based network graph ) a bit better tell me. I try to plot it but nodes overlap and need some space between them.
from whitefield.
Added a way to scale the position based graph.
Usage:
./scripts/wfshell plot_network_graph tree.png pos.png scale=20
Note the scale=20
parameter scaling the pos.png
by 20x.
scale=
parameter is applicable only for position based graph.
Appreciate your offer for help but it was a small change in external scripts and hence decided to do it myself. Looking forward to any contribs while you do your experiments.
Hope it helps and thanks for constant feedback.
from whitefield.
Thanks a lot for your improvement! I will try it and give you my feedback. It should work now.
I needed plotting the topology it to check how far each node is deployed from server because in random topology sometimes nodes don't connect and I believe that are far away.
I really appreciate your help and in my future works I will reference you.
from whitefield.
I tried and this is the output with 22 nodes and scale=500:
Is the x,y location of the nodes the real one coming from NS3? After executing the whitefield with random topology and scale=200 I got:
So does this mean the position of nodes is fixed? I notice that if I deploy 20 nodes for example with 2 servers, the 1 server is not in RX range of the nodes and no network if formed. That's why in the above figures you see no arrows in some nodes.
from whitefield.
This looks like grid topology, certainly does not look random.
Can you share your config wf.cfg
?
x,y location is the real location coming from ns3.
from whitefield.
This looks like grid topology, certainly does not look random.
Can you share your configwf.cfg
?
x,y location is the real location coming from ns3.
Yes you are right, sorry my mistake I didn't change to randrect. I think plotting now works fine!
from whitefield.
Handled.
from whitefield.
Related Issues (20)
- Power Line Communication support in Whitefield HOT 12
- Integration with https://renode.io/ HOT 6
- Injecting new nodes in the network at runtime HOT 2
- Whitefield can't run 2 instances from different users HOT 3
- Running multiple Whitefield instances on the same machine HOT 1
- Support multiple PLC leaf nodes HOT 6
- Support for different RPL objective functions HOT 2
- Count packets for specific nodes HOT 1
- Pcap doesn't include all packets captured
- Atomic_sync.c file compilation error when activating RIOT HOT 2
- WhiteField is not getting configured on Ubuntu 20.04. HOT 1
- Support for randomized IIDs in AirLine/Stackline
- Add JQ dependency in setp script HOT 1
- setup.sh issues HOT 1
- Whitefield Framework in my application HOT 6
- Whitefield with contiki-ng HOT 44
- NODEID renumbering issue HOT 11
- cmake support HOT 1
- Colorize the graph nodes based on nodeExec type HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whitefield.