SOSSIM and Tree Routing Protocol in SOS and its Deployment on the XYZ Testbed

This pages outlines how to use SOSSIM and the tree routing protocols in SOS. It is a summary of the steps we have taken to verify the protocol in SOSSIM and run it on a 16 node XYZ network deployed in the corridors of the Morse Teaching Center.

The final version posted here is running on the current testbed. Each node collects data from the node's photo sensor every 1 sec, and sends it to the base-station with after time-stamping it with the real time clock. The basic functionality is provided by 'surge' and 'tree_routing' modules found in the SOS repository with slight modification for the XYZ platform.

To simulate your own network using SOSSIM, please refer to the SOSSIM page on the SOS website at:

http://nesl.ee.ucla.edu/projects/sos-1.x/tutorial/surge_sim.html

Since the 'surge' program from SOS server uses MicaZ platform, the header file ,'micasb.h', should be commented out for collecting photo data from XYZ. The surge module collects photo data each given time, and send it to the tree routing module. The sensing period can be set from 'INITIAL_TIMER_RATE' in the surge module, whose value must be consistent with the value of 'DATA_FREQ' defined in the tree routing module. However, in order to route the data from all nodes in tree properly, the value of 'DATA_FREQ' should be set to the value of INITIAL_TIMER_RATE divided by the maximum depth of tree. The incomming packets to the base station can be observed by using sossrv.exe in /sos-1.x/tools/bin directory from PC connecting with RS-232 cable. In order to open the tcp/ip port, the following procedure is required


$ cd sos-1.x/tools/sos_server/bin

$ make clean

$ make

$ ./sossrv.exe -s /dev/ttyS0

In addition to those modules provided by SOS server, the timestamp module provide the real time clock synchronization functionality over the tree; This is manually written for the real time clock in XYZ. This new module broadcasts the RTC time beacon every TIMESYNCH_FREQ from base-station, which contains the real time clock information of base-station; The real time clock has time fields, (year, month, date, day, hour, miniute, second). If the child receives the beacon packet from parent node, it updates its own RTC and send a time beacon packet to its child node. The 'writing' and 'reading' RTC function is defined at 'rtc_timer.c' and 'rtc_timer.h' which is defined in '/platform/xyz' and ''/platform/header' directory repectively. Since writing RTC requires considerable time, the TIMESYNCH_FREQ should be at least 10 times longer than 'DATA_FREQ' for avoiding dropping data. For setting RTC time, you needs to open 'rtctimestamp.c' file and set the following variables.

///////////////////////////////
// Absolute time setting
///////////////////////////////
uint8_t sec=12;
uint8_t min=23 ;
uint8_t hour=1 ;
uint8_t day=5 ;
uint8_t date=9 ;
uint8_t month=6 ;
uint8_t year=6 ;

The matlab script file, 'test.m', offers the visualization of data stream and tree structure. By analyzing incomming packet to base-station, it generates time-history plot of photo data for each node with real time stamp and the current tree-structure plot with address name. Since it takes the packet from base-node via TCP-IP, sossrv.exe must be run before run 'test.m' file.

For the fast verification of tree route protocol, SOSSIM can be used. For more detailed explaination can be found at the below website.

http://nesl.ee.ucla.edu/projects/sos/tutorial/surge_sim.html

For the verification of multi-hop tree routing, the simple network topoplogy example is provided at 'topo.def.txt'

Since a parent has to route the data from all child-nodes, data frequency will increase by total number of childes in its own sub-tree. If the 'DATA_FREQ' is not properly configured, you will see the lots of data loss as the number of hops and child increase during simultaion. Therefore, it is necessary to configure the proper value of 'DATA_FREQ' . It is recommended to configure its value to at least "maximim depth of tree' times larger than the original data frequency.

AttachmentSize
Data_Stream.jpg224.42 KB
test.m.txt9.56 KB
sos-1.x.zip18.06 MB
TreeRouting.jpg106.64 KB
topo.def.txt798 bytes