Tag Archives: University of California Berkeley

Getting Started with TinyOS-The Basics

The first thing an outsider needs to get familiar with is the structure of the program while coding in TinyOS. The official TinyOS tutorial does a great job of making all these basics clear, but I just thought we’d include this post as a token post in order to maintain some sort of order 😛 Feel free to check out the official post and all of their tutorials:

http://www.tinyos.net/nest/doc/tutorial/lesson1.html

Every-time you start a new project “xyz”, you’ll need at least 4 files.

  1. Makefile
  2. xyzC.nc file
  3. xyzAppC.nc file
  4. xyz.h file

Laksh has hosted all of our projects on github and I’ll keep referring to the relevant folders so that you could try out the codes as well. For instance we’ve called these skeletal files “null files” and you could have a look at them to understand the basic structure for any TOS project.

https://github.com/shady33/tinyos-bits/tree/master/null/src

A Makefile tells the compiler which flags to set and tells it where your main configuration file is present (xyzAppC.nc). We mainly use the Makefile to also declare the buffer size for the printf commands we use in our projects. One can also set the power level for communication for static range scenarios here.

xyzC.nc file contains your main code where you also declare all the interfaces of the mote (in our case, UC-Berkeley or TelosB or MicaZ) that you’ll be using. xyzAppC.nc is your main configuration file and interfaces your main code with the hardware modules like LEDs, timers, radio module, sensors etc. 

The header file is used to declare which channel you’ll be using for communication and also in most of our applications the structure of the message packet that each mote shall be sending. By default, the maximum packet size that one can send is 28 bytes but it can be modified to upto 127 bytes by changing the header file.

That’s it for this post, we’ll keep updating this space with more posts which’ll sort of act as a timeline of the experiments/projects we did till now in this field in the hope that it might be of use to anybody trying to work on similar projects using TinyOS.

Cheers!

WSN Intro

This is the area where I’ll be primarily posting about the things I’m learning about in the domain of Wireless Sensor Networks using TinyOS. I’m working alongside two close friends Laksh Bhatia and Sachin from college on development of a protocol stack for condition based maintenance in pipelines. As of now, we’re learning things step by step, primarily on UC Berkeley’s TelosB motes.

We started of with setting up TinyOS, then moved on to communicating between two motes, then small grids, getting console prints through serial communication etc. As of now, the latest thing we’re working on is implementing sleep wake TDM on a square 16 mote static grid. We’ll soon start posting detailed “walk-through”s, of sorts, of the entire journey and hope we can help people who’re just venturing into this field save themselves some time and frustration 🙂

Blink!

SONY DSC

Greetings.

So, I finally managed to motivate myself enough to get on with this blog. Stuff you can expect to see here regularly-

  • Arduino, Raspberry Pi related hacks
  • Regular posts related to an academic Wireless Sensor Networks project on UC-Berkeley’s TelosB motes using TinyOS
  • Photographs to show new techniques of photography that I’m trying or some of my old work
  • Drum Covers of some songs or hopefully some original compositions in the future

I seriously hope I get better at this along the way. It’ll be cool if the work I put up here helps some lost soul scouring the internet for a solution to some weird technical roadblock. It might just also be a source of some amusement to some shutterbug or wannabe-drummer.

I really don’t know how regular or how interesting I’ll be able to make this blog (I feel I’m really rusty in terms of writing) . If you’re reading this, do leave constructive criticism or stuff you would want me to talk about related to these fields.

Until the next post… 🙂

May the force be with you.