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

Whitefield Framework in my application #91

Closed neeraj-badhani closed 4 years ago

neeraj-badhani commented 4 years ago

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

nyrahul commented 4 years ago

You cannot run the application from the command line .. You need to edit the config/wf.cfg file ... image

This configuration file is used by ./invoke_whitefield.sh script.

image

You can also check the sample demo video to understand invocation. https://vimeo.com/291555732

neeraj-badhani commented 4 years ago

what about running whitefield in raspberry pi loaded with wheezy rasbian?

nyrahul commented 4 years ago

what about running whitefield in raspberry pi loaded with wheezy rasbian?

Is there a reason you use raspberry for simulation framework execution? I have never tested whitefield on raspberry and am not sure why anyone would want to use rpi for simulation purposes.

neeraj-badhani commented 4 years ago

ok can you tell me that in ipv6/rpl-udp/udp-server.c there is code for button sensor activation how we can add real hardware setup like sensors and nodes to this program and make it run.

nyrahul commented 4 years ago

ok can you tell me that in ipv6/rpl-udp/udp-server.c there is code for button sensor activation how we can add real hardware setup like sensors and nodes to this program and make it run.

To trigger any action on the node (button press or anything else), you can use the wfshell script to send the command to the node process. Currently I use this to query node's statistics such as ipv6/rpl/icmp send/rcv/drop packet status and for all other oam cmds.

Now if you need to trigger your own action then you can add your own cmd_action_handler in the commands.c. Add the ref in PLAY_CMD(mbuf, cmd_action_handler) in cl_stackline_helpers.c.

After this you should be able to call the cmd_action_handler from wfshell using scripts/wfshell.sh cmd_action_handler

nyrahul commented 4 years ago

Closing as these were only queries.