Flush: A Reliable Bulk Transport Protocol for Multihop Wireless Networks

Last updated 1 Dec 2006

 

Flush is a receiver-initiated transport protocol for moving bulk data across a multihop, wireless sensor network.

 

Usage

Command to JAVA code is

int read(int dest, short portId, long start, long size, byte[] bffr)

Buffer space needs be provided by JAVA application using Straw. And Straw interface of TinyOS code

event result_t read(uint32_t start, uint32_t size, uint8_t* bffr)

needs be implemented. TinyOS Application will fill up buffer, and call readDone(). Size of reading will be smaller than packet size. And that’s it. Data can reside either in RAM or FLASH. As long as address space is properly defined so that start and size can be interpreted, Straw works.

Straw is tested on tinyos-1.1.11 with nesc-1.2alpha11.

 

Location

You can download the package from:

http://www.cs.berkeley.edu/~binetude/flush/code/Flush.tgz

Put Flush directory under /opt/tinyos-1.x/contrib

TinyOS code

/opt/tinyos-1.x/contrib/Flush/tos/lib

JAVA code

/opt/tinyos-1.x/contrib/Flush/tools/java/net/tinyos/flush

 

Examples

Two nodes are needed. Program them with application at:

/opt/tinyos-1.x/contrib/Flush/apps/TestFlush

Then, java program

/opt/tinyos-1.x/contrib/Flush/tools/java/net/tinyos/flush/TestFlush.java

shows possible commands.

binetude@pilsner /opt/tinyos-1.x/contrib/Flush/tools/java
$ java net/tinyos/flush/TestFlush
Usage: java net.tinyos.flush.TestFlush <command> <arguments> [options] where
        <command> <arguments> [options] can be one of the following:
 
ledOn [-dest dest] [-verbose]
ledOff [-dest dest] [-verbose]
pingNode <dest> [-toUART] [-verbose]
readData <dest> <chnlNo> <nSamples> [-toUART] [-verbose]
networkInfo <dest> [-toUART] [-verbose]
fixRoute [-dest dest] [-verbose]
releaseRoute [-dest dest] [-verbose]
eraseLog [-dest dest] [-verbose]
startLog [-dest dest] [-verbose]
stopLog [-dest dest] [-verbose]
setMode <chnlNo> <intrv> <nSamples> <sampleNo> [-dest dest] [-verbose]
resetPktCnt [-dest dest] [-verbose]
flushState <dest> [-toUART] [-verbose]
forDebug [-dest dest] [-toUART] [-verbose]
help [-verbose]

Here are details.

ledOn [-dest dest] [-verbose]
ledOff [-dest dest] [-verbose]

ledOn/ledOff turn on and off red LED. Destination node can be specified as an option. If not specified, the command will be broadcasted. verbose option shows more detailed information.

pingNode <dest> [-toUART] [-verbose]

pingNode pings a node. With toUART option, communication can be done through serial cable to a node directly connected.

setMode <chnlNo> <intrv> <nSamples> <sampleNo> [-dest dest] [-verbose]

setMode sets operation mode. <chnlNo> indicates the operation mode. For <chnlNo>, 1 means ‘Fixed Rate’ and <intrv> should be specified. 2 means ‘Flush Source Only’. 3 means ‘Flush Hop by Hop’. For 2 and 3, <intrv> will not be used, however it needs be specified with some arbitrary number. When 3 is added to <chnlNo>, which means 4, 5, 6, 50% packet loss will be simulated. Packets with sequence number from <nSamples> to <sampleNo>, will suffer 50% packet loss. However, this will be applied only once, then it will turned off. And this drop will not be applied at NACK-phase.

readData <dest> <chnlNo> <nSamples> [-toUART] [-verbose]

readData reads data either from RAM (chnlNo = 12) or Flash (chnlNo = 11)

At first there is a sequence of “R” and “S”. “S” means one packet is sent, and “R” means one packet is received. At the end, statistics are printed, like Bandwidth, Latency, and successRate. “msgSent” is the total number of messages sent, “msgRcvd” is the total number of messages received, and “successRate” is the raw success rate provided by the low layer. “Ni” is the time taken to gather network information, which is used to tune parameters. “Td” is the time taken to transfer the entire data once. “Rd” is the time taken to fill holes (to retransmit missing packets). “Ec” is the time taken to check whether there is an error in the data. Finally “total” is the total time taken (sum of the previous four). There are additional statistics for a debugging purpose.

eraseLog [-dest dest] [-verbose]
startLog [-dest dest] [-verbose]
stopLog [-dest dest] [-verbose]

eraseLog/startLog/stopLog The log records every packet the node injects (excluding LLR). Log is recorded in Flash. Therefore, Flash should be erased before logging.

fixRoute [-dest dest] [-verbose]
releaseRoute [-dest dest] [-verbose]

fixRoute/releaseRoute fix and release routing table of the routing layer. Actually fixRoute copies the content of routing table at the moment and this copied version is used. Therefore, the routing table of the routing layer gets continuously updated even after fixRoute call.

networkInfo <dest> [-toUART] [-verbose]

networkInfo returns routing layer information. ‘parent’ and ‘depth’ are values used in routing. In case of fixRoute, they are copied values. ‘treeParent’ and ‘treeDepth’ are values in the routing table. Therefore, even after fixRoute, those values are continuously updated. ‘occupancy’ indicates queue length, ‘quality’ is the link quality to ‘treeParent’, and ‘fixedRoute’ indicates whether fixRoute is used or not (1 means used). ‘receiveCount’ indicates packets it received. ‘sendSuccessCount’ indicates successfully transmitted packet to its parent. ‘sendFailCount’ indicates packets which is reported as failure from the lower layer. However, there can be a case where only acknowledgement is lost. ‘queueFullCount’ indicates packets dropped because the queue is full.

Unless the nodes is a source, ‘receiveCount’ = ‘sendSuccessCount’ + ‘sendFailCount’ + ‘queueFullCount

flushState <dest> [-toUART] [-verbose]

flushState shows diverse miscellaneous information. ‘globalTime’ shows its synchronized time. ‘noPktSent’ shows total number of packets sent to its parent including duplicates. ‘noBPktSent’ shows total number of packets broadcasted downward. ‘mode’ indicates its transmission mode set by setMode command. Other fields reveal internal state of the node for a debugging purpose.

resetPktCnt [-dest dest] [-verbose]

resetPktCnt resets packet count. networkInfo, flushState shows statistics of packet counts.

forDebug [-dest dest] [-toUART] [-verbose]

forDebug is used for a debugging purpose.

help [-verbose]

help shows usage of commands.

 

Known Problems

With MintRoute, after sending large number of packets at high speed, some link blacks out. But link revives after some time.

 

People

Sukun Kim, Rodrigo Fonseca, Prabal Dutta, Arsalan Tavakoli, David Culler, Philip Levis, Scott Shenker, Ion Stoica

 

Acknowledgements

This material is based upon work supported by the National Science Foundation under grants #0435454 and #0454432, and the NSF Graduate Research Fellowship Program. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. This work was supported by generous gifts from Intel Research, DoCoMo Capital, Foundation Capital, the National Science Foundation under grant #0615308 (“CSR-EHS”) and a Stanford Terman Fellowship.