Blast is a routing stack for general sensing application. Sensor readings are collected and encapsulated to packets by the applications. Blast will then create an adaptive, self organizing network, route these packets to a (or a few) basestation.
Let's begin with installing and compiling the code before we moved on to configuration. Download the stack code and some sample multihop applications. Unzip it and move it to anywhere you want. For simplicity, let's extract both zip files to the apps directory. You will then see two directories, Blast which contains the stack code and Blast-app which contains a sample multihop application. In apps/Blast-app/Makefile, make sure the cflags is pointing to the right path of blast. It will be something like this.
This will make sure the compiler will find the right files to compile. For those mica 2 people out there, please check this out, before you compile the code. To compile the sample application, go to Blast-app directory and type make mica, (or mica2, mica2dot) and type make mica reinstall.1 to install a basestation. Node 1 is by default the base station. Node x (for any x bigger than 1) are those "normal" nodes that sense data and in terms of the running code, there are no difference between these nodes and the base station.
After you downloaded the code to the basestation, listen to the uart. You should be able to see
The first five bytes are am header. The last four bytes are Blast header. You can see 01 0c are the data from the CollectData application. If you use GenericBase to listen to the air, you should be able to see
These packets with types 2 are the route messages. They are broadcast periodically to tell its neighbors about its parent, hop, cost, receive estimates. Next, download node number 2. Plug in node 1 to your serial port. This may take a while for node 2 to join the network. For the default setting, this should take 30 packets, (that is 90 seconds for collect data). You should be able to see data like this
Congrutulation! You did it! (and I did it too!)
I hacked up something real quick for network visualization. The gui files are here. I also wrote a shell script so that installation can be easier. Please notice that this is a fast hack. All I did is to make Surge GUI to display some lines. The advance features in SurgeGUI, like focus and sleep does not work. I don't plan to support those features. Here are the installation steps. 1) Set your TOSDIR to tos directory.
2) Untar my compressed file, run
3) I am lazy, especially typing those long long tinyos path. I put the following lines in ~/.bash_profile for convenience
After you put that in yoru .bash_profile, remember to do
1) Instead of running collectdata, use Surge as your app. All you need to do is to edit the Makefile and change COMPONENT to
2) Download and run the code as collect data. 3) Start your Serial Forwarder by typing startsf as you defined earlier 4) Start your surge gui by typing startsurge as you defined earlier. 5) Wait and See 6) Email me if you get that to work! :)
Blast allow you to use 8 bit or 16 bit addressing. The reason is that 8 bit addressing is simplay smaller! This means that application can put more data in their packets; more neighbors can be feedback in a route message; smaller route table size, etc. We provide 16 bit addressing because some applications do need more than 256 nodes! To change this, go to RoutingStack/RoutingStack.h,
Base Station by default is node 1. You can also change this in RoutingStack.h. Just want you to know that zero for node id is a bad number for LFSR random generator.
Blast periodically broadcast route messages. You can specify how often you send this updates. A general rule is about 2 times your data rate. If it is too frequent, it wastes energy and congests the network. If it is infrequent, it is not adaptive.
This section was written for the mica2 radio stack dated on June 2003. The following inconsistencies may have been fixed. I am not sure what is the status for today. If Blast works without any modification, then goes with it. If not, you need to change two settings in order for Blast to work. In Blast/VirtualComm/VirtualCommM.nc, search for
and comment it out. This is because Mica2 radio stack does not set the CRC flag. If we set that to true, AMPromicious will filter out all the packets. Hopefully, this inconsistency in the radio stack will be corrected soon. If the motes doesn't receive any packets using AMPromicicious, this may be a sign. In Blast/RoutingStack/RoutingStack.h, search for
change this to 0. Since mica2 radio stack does not set the ack flag of the packet to true, (even though it does not have the ack mechanism), Blast will automatically retransmit 3 times. That is why we need to disable retransmission for mica2.
Can multiple application use Blast at the same time to send packets to
Base Station?
What is the difference between GenericComm and VirtualComm? Why do you
want me to use VirtualComm?
How do we debug?
Why does it takes so long for the nodes to join the network?
Why do I see some more gabbage at the end of a Collect Data packet when I use ForwarderListen?
How good is Blast?
What platform did we test Blast on?
Who are using Blast?
Hey dude, your thing is not low power?
Did you guys have any publication on this?
Is this FAQ frequently asked?
Why does it take so long to boot up? How often do they change parent? How do I control adaptivity?
Since the default minimum transmission algorithm for Blast depends on estimations, so whenever estimations changed, parents change. Although nodes evaluate its neighbors every "route freq" as defined in RoutingStack.h, their best parents stay the same because estimations of neighbors don't change, so technically for big changes (such as node die or node moves away) to propagate, it will takes "route freq" times "estimate to route freq" seconds. (it takes "estimate to route freq" route update to compute a new estimation of neighbor). Therefore, you will notice a phenomenon that most parent changes occur when a new estimation is evaluated, then it continues to be not so stable for another few route updates because routing cost takes a few rounds to propagate down the tree. Then they remain to be stable for quite a long time until a new estimations is calculated. This will also answer the question of "why does it take so long to boot up". It takes roughly "route freq" times "estimate to route freq" seconds for nodes to get parents initially. For 8 bit addressing, both VirtualComm and MHSender uses 2 bytes header (so totally 4 for the whole thing), If you are sending a message to VirtualComm with length bigger than TOSH_DATA_LENGTH - 2 or to MHSender with length bigger than TOSH_DATA_LENGTH - 4, packet will be rejected, so make sure you are packets with the right length. VirtualComm can only allow VC_QUEUESIZE of applications using it simultaneously. If the Routing Stack is used, there will be VC_QUEUESIZE - 1 (1 for Route Beacon) application available. Make this bigger if you have too many applications sending to the comm.
Things are not going to work if you are sending too fast because the
network will be congested around basestation. Use the following
formula to calculate the highest frequency. We can roughly have 20
packets per seconds
Check to see if your application data type conflict with the predefined type in RoutingStack.h Make sure all your applications are using virtualcomm, instead of GenericComm. Increase your task queue in tos/system/sched.c (We use 128) The default task queue size is not going to work when it is run in a large scale. You don't want things to fail apart after running of serveral hours. We are going to make our stack will be taskless in future version Make sure you wired up the InFowardReceive of ParentSelection
If you get low realiability on mica one
|