Experiments

While developing a huge framework for the Sun SPOTs we started to become a bit unhappy with the current radio communication library implementation. Sometimes radio transfers, including over the air flashing, worked and sometimes not. After modifying the current multihoplib source code with no satisfying result at all we decided to redo it from scratch. To proof that we were successful we made two experiments.

Multihop Experiment

Experiment setup

We used three Sun SPOTs and mounted them the following way:

We made sure (by setting the radio output power to -30) that "A" cannot send to "C" directly, it has to send data over "B" to "C".

To make sure that the spots were not moved around during or between experiments we used our custom made Sun SPOT experiments board. Here is a photo:

The task was now really simple: "A" sends out 100.000 random bytes using the radiostream protocol, and "C" has to receive 100.000 bytes from "A". Every received and sent byte was added in order to get kind of a checksum to test whether the transfer was successful. If everything went fine, both sums should be the same. After one run, all the SPOTs were reset to start the next run cleanly.

We made this experiment with the original LowPan layer shipped with the purple release, and with our own LowPan emulation protocol. So the source code of the test program was not changed at all, only the library was reflashed.

If you want to do this experiment on your own, check out the download section. There is a link to the source code.

Results with the standard purple library

Usually there were a lot of exceptions (NoRouteException, a few NoAckExceptions and some ChannelBusyExceptions) and multiple lines saying "[AODV] Attempting to freshen non-existant route to 0014.4F01.0000.01FD". The output from "ant echo" looked more or less like this:

There are a lot of errors even before. This probably caused the checksums to differ: For example "A" says the sum of all bytes is -76033 and "C" says it is -77204. This means the data got corrupted during transfer.

We have tried this experiment six times. It finished twice with a wrong checksum and did not even finish four times.

Results with the KSN RadioStack

Once a "NoRouteException" occured, but was only printed out as a debug message. The experiment kept working without any further error.

We also tried the experiment with the same configuration six times. It finished all the time correctly! Only the library code was replaced in order to emulate the LowPan layer.

Conclusion

The new radio stack improves radio reliability significantly. The problem gets even worse if more than one hop have to be taken. In real life applications the errors occur at least while flashing software over the air. The flash file of our KSN project is about 800kb, without the KSN RadioStack it would be completely impossible to transfer the software via radio. We cannot flash the SPOTs manually since our network has more than 30 nodes deployed in various offices.

Self healing Experiment

Experiment setup

The experiment setup is basically the same as in the multihop experiment, but with one major difference: There are now four nodes. The data should be transferred from "A" to "C" again, "A" cannot talk directly to "C" it has to use "B1" or "B2" to communicate with "C". At the beginning "B1" will be between "A" and "C" to forward data, and during the data transfer we will put "B1" away and replace it by "B2". The network has to heal itself during a running transfer.

The task is exactly the same as in the multihop experiment. 100.000 bytes have to be transferred from "A" to "C". After a few thousand bytes are transferred "B1" will be replaced by "B2".

Experiment results

Using the KSN RadioStack everything went fine. Replacing "B1" with "B2" or vice versa several times did not make any problem at all. Using the original LowPan Implementation caused the transfer to stop. The switch to the new route seemed to work, but that is really hard to say, because the transfer failed like in the multihop experiment.

Here is a video demonstrating this experiment: