SOFA is an opportunistic duty cycled protocol for Extreme Wireless Sensor Networks More info at http://cattanimarco.com/2013/11/20/sofa/
Go to SOFA's example application and compile
cd contiki/examples/sofa/ make clean TARGET=sky; make TARGET=sky
This will create an example application (example-sofa.sky) for TmoteSky nodes. The application computes the average among all the connected nodes. The starting value of each node is its ID multiplied by 10. Every time a node exchange a value with a neighbor, it updates it local value and print it on the serial (string).
- Run the application in Cooja or on real node and enjoy SOFA.
INSTALL PATCH FILE
Instructions to install SOFA on InstantContiki 2.6.1
Download and run InstantContiki. Note that this patch is created from Contiki 2.6.1 and was not tested on other versions.
Download SOFA's patch file (sofa.patch)
Go to the contiki folder and apply the patch
cd ~/contiki patch -p1 < ~/sofa.patch
The resulting output should look like this:
patching file core/net/mac/Makefile.mac patching file core/net/mac/sofamac.c patching file core/net/mac/sofamac.h patching file examples/sofa/example-sofa.c patching file examples/sofa/Makefile patching file examples/sofa/project-conf.h
- Follow the "RUN DEMO" instructions