It’s all your fault, Mark.

A short funny take on the Whatsoff Incident

Surfing Tangents

23rd February, 2014:

3:39 AM: Confirming the death of Whatsapp.

3:39 AM: You there?

3:39 AM: Wow.

3:40 AM: This is probably the end of an era, isn’t it?

3:40 AM: I wonder if someday, these messages will get delivered.

3:52 AM: Maybe 40 years from now. Some of us will be married, some of us successful. Some of us alive, some dead. Some wanting to be dead. Who knows? Maybe someday when you’re about to put your neck through the noose, in a damp dingy apartment somewhere in a crumbling city, your phone will buzz, with a Whatsapp notification. You’ll read this message, and be visited by ghosts from a bygone era. You’ll remember what it was like to be young. To be, at the same time, naive, excited, in love, and terrified of the world in the most queer way. That heady cocktail of emotions that only plague…

View original post 169 more words

Setting up Cooja: A simulator for TinyOS

It might not be possible to test out all the work you do in TinyOS on a physical test bench at all times. Or maybe sometimes you want to save yourself the trouble of flashing a large number of motes only to realize that you’d made trivial errors in your code. Enter: Cooja.

Contiki is another widely used platform in the field of Wireless Sensor Networks. We’ll now be describing how to setup Cooja: the simulator tool offered by Contiki.

The normal installation is by following the instructions on this site:

However, for somebody who just wants to use Cooja as a simulation platform in conjunction with TinyOS, the normal setup is bulky at a little over 2 GB to download and the instructions are something that even we struggled with.

In order to save you the trouble of this procedure, we’ve uploaded the relevant part of Contiki to make Cooja.


1. Download the .zip file from
2. Extract the files to any convenient location.
3. Make sure you have java development kit (7 or greater) and ant installed on your system. If not, then :

                    sudo apt-get install ant (on Linux)  or (for Windows) (for Windows)
or sudo apt-get install openjdk-7-jdk (for Linux)

4.Set the path variables for java and ant (only required if not automatically set or in windows)
5.Go to the location where you’ve extracted the folder.
6.Navigate to contiki/tools/cooja
7.Write ant run (in terminal or cmd)

This should launch the simulator and you can now explore Cooja.

The example we’re going to show here is simple radio communication between two motes and from our basic Send Receive code hosted at:

General Steps for simulating code based on TelosB motes:
1. File->New Simulation. Create.

2.Motes->Add Motes->Create a new mote type->Sky Mote

3.In the Contiki Process/Firmware field browse to the location on disk where you’ve compiled your code using make telosb

4.Go to build/telosb/ and choose main.exe

5.Add motes

6.Press Start in the simulation control panel

That’s about it. Some of the other common features we use are:

1. The on board LEDs which you can add from View->LEDs in the Network Window.
2. Radio Messages from Tools->Radio Messages
3.Speed Limit control in the Simulation Control window
4.The output of Printf statements that show up in the Mote Output Window
(Something to watch out for while using Printf statements, its better to use the SerialPrintfC component in the configuration file file while simulating in Cooja. On the other hand, PrintfC works better in real-world simulations using the tool for tinyos or something else like Cutecom.)

Mayank Joneja, Laksh Bhatia, Sachin