Giter VIP home page Giter VIP logo

whitefield-framework / whitefield Goto Github PK

View Code? Open in Web Editor NEW
79.0 13.0 22.0 11.77 MB

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.

License: GNU General Public License v2.0

C++ 48.33% Makefile 1.08% Shell 23.16% C 25.45% Python 1.98%
iot iot-framework os contiki riot-os contiki-os ns3 wsn 6lowpan openthread

whitefield's People

Contributors

anmolsarma avatar nyrahul avatar rabinsahoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whitefield's Issues

Supporting contiki based stackline

  1. Contiki using TAP interface
  2. Contiki using SHIM interface
  3. Basic statistics supported for e.g.
{ //sent/recv/failed/dropped... whatever is supported by contiki currently
   6lo stats;
   ipv6 stats;
   icmpv6 stats;
   udp stats; 
}
  1. Add a new app which allows dynamically creating sockets and send/recv of user-defined payload.
  2. Define a mechanism maintaining log

Running multiple Whitefield instances on the same machine

Describe the bug
It should be possible to run multiple instances of Whitefield on the same machine as different users. Currently it fails because the Unix domain socket path is same.

To Reproduce

  1. Create multiple users
  2. Install Whitefield in each of these users
  3. invoke_whitefield.sh

Only the first instance works.

Expected behavior
All instances should work independent of each other.

Additional context
Airline log shows usock bind failure.

Injecting new nodes in the network at runtime

Is your feature request related to a problem? Please describe.
Currently, the nodes are added using Whitefield config. Once the nodes are added, the node's attributes/interfaces/interface-attributes could be changed at runtime. However, injecting new nodes at runtime is currently not possible.

Describe the solution you'd like
It should be possible to inject a new node using a node configuration file at runtime using an OAM command (for e.g., wfshell cmd_add_node config-file)

Atomic_sync.c file compilation error when activating RIOT

Describe the bug
OS : Ubuntu 20.04
GCC version : 9.3.0 or 7.5.0
After installation of the Whitefield and when activating the the RIOT OS using ./scripts/setup --riot 1, the installation is aborted with an error related to the compilation of the file : atomic_sync.c file

To Reproduce
Steps to reproduce the behavior:

  1. Under Ubuntu 20.04
  2. Download the Whitefield sources
  3. Set up the Whitefield with default options
  4. Activate the RIOT OS using in the Whitefield directory the command : ./scripts/setup --riot 1
  5. See error

Expected behavior
No error should be raised and the activation of the RIOT should terminate successfully.

Screenshots
image

Additional context
May be the GCC version cause this problem.

Colorize the graph nodes based on nodeExec type

Is your feature request related to a problem? Please describe.
When I run plot_network_graph command to show me the graph, it would be good if the nodes are colored based on the type on binary. See the example below.

Describe the solution you'd like
For example, in Cooja you have topology graph like below
testRoot

The root (udp-server) is colored green, the udp-clients are colored yellow and other type of nodes are colored orange. This is good for the user to distinguish the nodes based on the binary and their number. In whitefield, it would be good to have the same logic so when you run the plot_network_graph, it would take the config file and for each node (nodeExec) defined, a color is assigned in the graph. At the end, a udp-client will have different color from udp-server node.

Supporting NS3 based Airlink with basic stats

Following stats to be supported on NS3-Airlink

{
   mac_sent; //requested mac_send() from upper layer
   mac_failed_to; //failed with timeout
   mac_sent_retry[X attempts]; //sent successfully in 1st, 2nd, 3rd ... attempts
}

Support for randomized IIDs in AirLine/Stackline

Currently the design is that every node has its own node_id. The IID used at the link layer corresponds to this node_id .. Thus in Airline when a packet is received we derive the node_id from the MAC address's dest_addr.

Reasons for supporting any IIDs in Airline/stackline?

  1. In case of OpenThread, the nodes might use combinations of short/long address modes and randomized IIDs.
  2. There are possibilities of implementations using randomized IIDs even in contiki/riot.
  3. Anyways the design decision to tie node_id and IID was not a good one and hence should be changed.

How to implement?

  1. Stackline can register there extended and short address to the Airline. Openthread already has a mechanism to register these addresses. In context of contiki/riot, the shim layer can take care of this.
  2. Airline on receiving packets can match against these addresses. Note addresses can be more than one.
  3. Also in some cases (for e.g. openthread), the MAC header framing is done in Openthread internally. So Airline will receive an mbuf with 802154 header. Thus Airline needs to support only LLC layer and below in such case.

Multiple BR/udp-servers in parallel

A deployment may have multiple BRs, thus the tooling needs to consider this. monitor.sh is already changed to handle an argument which takes as an input br-nodeid and shows connectivity in context to it.

Canvas does not work with more than 10 nodes

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
  1. compile contiki example
thirdparty/contiki$ make -C examples/ipv6/rpl-udp TARGET=whitefield
  1. edit src/wf.cfg and change
numOfNodes=20
fieldX=400
fieldY=400
topologyType=grid
gridWidth=4
  1. Start Whitefield
whitefield$ ./invoke_whitefield.sh src/wf.cfg
  1. Start canvas
whitefield$ ./canvas/canvas.py

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

Support multiple PLC leaf nodes

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

NODEID renumbering issue

By default, whitefield uses NODEID=0 and incrementally assigns node ids to all the other nodes. However, NODEIDs can be renumbered in Whitefield i.e., Whitefield can start with any nodeids as configured in config/wf.cfg & helpers.sh. @philok93 identified that certain commands/scripts (wfshell plot_network) does not work when renumbering is done.

Count packets for specific nodes

Is your feature request related to a problem? Please describe.
I am trying to calculate some parameters for simulations. For example, I want to calculate the total number of packets sent by a node. The log file contains the following:

INFO  00:00:37.080 [send_packet:41] src:18 dst:22 len:79
INFO  00:00:40.987 [radio_read:97] RECV ret:16 src:18 dst:22 len:1 flags:1
INFO  00:00:37.110 [mac_handle_ack:76] ACK status:ACK_OK retries:2

[INFO: ICMPv6    ] Sending ICMPv6 packet to fe80::302:304:506:0, type 155, code 1, len 72
INFO  00:00:32.821 [send_packet:41] src:18 dst:0 len:79
INFO  00:00:36.702 [radio_read:97] RECV ret:16 src:18 dst:0 len:1 flags:1
INFO  00:00:32.826 [mac_handle_ack:76] ACK status:TX_ERR retries:0

In the calculations, I count the number of lines that contain send_packet or Sending ICMPv6 packet because it represents a ICMPv6 packet that was sent. However, when I see status:ACK_OK retries:2 or TX_ERR I don't know if I need to count retransmissions as extra packets sent.
My goal is to calculate the number of RPL control packets sent and the number of Application layer packet sent. Also, I need to calculate the retransmissions rate for the specific node. Is that possible using a cmd to calculate packets after simulation is finished?

Describe the solution you'd like
For example, If I provide log files I should be able to count the total packets sent and distinguish between RPL control packets and App layer packets. Retransmissions should also be good to calculate.

Describe alternatives you've considered
I calculated the total number by summing up the lines that contain Sending ICMPv6 packet + the retries number and deducted the number of lines that contain the status:TX_ERR word.

Thank you!

Whitefield Framework in my application

I am running my application in whitefield framework.I face lot of error in making my application setup as per whitefield i corrected some of them but still i am not sure whether my application will work or not.
while running (./server.whitefield) The error i am facing right now is incomplete argv set what should be the second argument to pass while running the program.
and what change in should do in program setup(like setting /dev directory and making changes in main function) while using sensors.

Capture

Pcap doesn't include all packets captured

Describe the bug
I want to sniff packets (using promiscuous mode in the config) and take the pcap file and process it later.
However, I notice that pcap files don't include all the packets shown in the .log file.
For example, in logfile for node5 you find:

INFO  00:00:03.865 [radio_read:97] RECV ret:95 src:8 dst:0 len:79 flags:0

If you check pcap, no packet is shown with source ip node 8 at the specific time.

To Reproduce
Run the simulation using a config file that has nodePromiscuous[5]=1 so that node 5 sniffs packets.
node_0005.log

pcap file for node 5:
pkt-5-0.zip

Expected behavior
Include all packets from log file to .pcap

Any help would appreciate it.

PS. This case is tested in the latest version downloaded from here. In my local version of whitefield which I checked and resetup the whitefield including all changes but nodePromiscuous is not working as expected.. I also need to check the reason.

Whitefield with contiki-ng

Hello,
Is there support for contiki-ng along with this whitefield framework? I would like to see a combination with the recent development of contiki. Also, do you plan to add any other features like border router in contiki?
Thank you!

Add JQ dependency in setp script

Describe the bug
JQ is required for regression tests

To Reproduce
Steps to reproduce the behavior:

  1. Go to whitefield/regression
  2. execute regress.sh
  3. If jq is not installed the tests will fail

setup.sh issues

Thanks Eduardo Ingles for this feedback.

Describe the bug
Here are some tips that might help you improve setup.sh:

Installing Whitefield in Vagrant - Ubuntu bionic (18.04) from scratch
https://app.vagrantup.com/ubuntu/boxes/bionic64

graphviz not found by default:
sudo apt update

checking [jq] ... Please install [jq] and restart install
sudo apt install jq

/usr/bin/env: ‘python’: No such file or directory
sudo apt install python

/home/vagrant/whitefield/thirdparty/RIOT/tests/whitefield/../../Makefile.include:195: *** Neither unzip nor 7z is installed.. Stop.
sudo apt install unzip

cmake support

Currently, the Makefile is hand-coded and it has all the header/lib dependency issues. It is best to use cmake to handle this automatically.

Example problem:

  1. Change to global headers in src/commline/ does not recompile relevant code.
  2. msgbuf-t change needs to recompile everything including the stackline.

It is best to handle this change with the pnp support.

Support OAM for RIOT

Currently RIOT OAM supports only, cmd_def_route, cmd_rtsize, cmd_route_table,

Other OAM commands for supporting ipv6, rpl, icmp, udp stats needs to be supported.

Whitefield can't run 2 instances from different users

Describe the bug
When I tried to run whitefield from a different user in linux, I got this error:

INFO  00:00:00.000 [usock_init:66] USOCK binding to [/WHITEFIELD_0002ffff]
ERROR 00:00:00.000 [usock_init:70] bind failed errno=98
INFO  00:00:00.000 [usock_cleanup:85] closed commline unix sockets

To Reproduce

  1. Start whitefield
  2. Create a new user in linux
  3. Try to run a new whitefield instance. You get an error and can't run it.

Expected behavior
It should allow a different instance of whitefield to run from different user. This will help to run simulations simultanously from the same linux machine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.