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 24 forks source link

Canvas does not work with more than 10 nodes #29

Closed nyrahul closed 7 years ago

nyrahul commented 7 years ago

Nodes above 10 nodeid are not shown connected. Steps to produce:

  1. Edit examples/ipv6/rpl-udp/project-conf.h and change
    /* configure number of neighbors and routes */
    #define NBR_TABLE_CONF_MAX_NEIGHBORS     100
    #define UIP_CONF_MAX_ROUTES   100
  2. compile contiki example
    thirdparty/contiki$ make -C examples/ipv6/rpl-udp TARGET=whitefield
  3. edit src/wf.cfg and change
    numOfNodes=20
    fieldX=400
    fieldY=400
    topologyType=grid
    gridWidth=4
  4. Start Whitefield
    whitefield$ ./invoke_whitefield.sh src/wf.cfg
  5. Start canvas
    whitefield$ ./canvas/canvas.py

Output should show up as: screen shot 2017-05-22 at 9 49 08 pm

nyrahul commented 7 years ago

Most likely the issue seems to be with the Canvas assumes nodeid's in decimal format in the default route IP ...

nyrahul commented 7 years ago

Fixed the issue by converting hex to decimal after reading cmd_def_route.