UbunTOS – Ubuntu 9.10 + TinyOS 2.x VirtualBox Image

This is my admittedly minor but I hope useful contribution to the TinyOS development community. TinyOS is an Operating System and development framework for Wireless Sensor Networks and other platforms which has a small footprint and is very energy conscious.

The TinyOS source code is available for free online for many operating systems, however it takes a long time to get the environment set up and it is not portable at all. I came across XubunTOS but it did not seem to be in active development anymore, so I endeavored to install TinyOS 2.1 and 2.x from source into a regular Ubuntu image. The most help came from Matt Keally’s Blog. While doing this, I thought it might be useful to many others who wish to develop in the TinyOS framework but might not have the skills necessary to install it. Therefore, I developed this VirtualBox image so that you can install it on any system for which VirtualBox is available and supports USB passthrough for the programming of the motes. I’ve tested on Windows 7, Windows XP and it should work on any other host OS, but I would love to hear your feedback. All funny business aside, I present to the world UbunTOS:

Features

  • Ubuntu 9.10 OS (patched through 2/5/2010)
  • Complete TinyOS development environment
  • TinyOS 2.1 Installed
  • TinyOS 2.x CVS Installed (default environment)
  • Portable for development in a variety of host environments
  • Patched motelist for MIB520 programming board

Directions

  1. Unzip the file and import into VirtualBox. I recommend at least 768M RAM
  2. Boot system
  3. Enable USB passthrough for the programming board. Check off the USB device in the menu as shown:
    VirtualBox USB Passthrough
  4. Check ‘motelist’ to see which port it has been assigned to (motelist has been patched to see MIB520 programming board)
  5. Program away! TinyOS resides in /opt/

Download

MD5 sum:    9a27ba7902337139c2eae0121ec6ca4e

Download UbuntuTOS_Ubuntu-9.10_TinyOS-2.x.zip [2/8/2010]:    [ torrent | http ]

If you happen to have spare bandwidth, please send me a note and I will link to the file via http or ftp.

Notes

  • The default username is wcu and password is nosecurity
  • The hostname is wcu-desktop, in honor of West Chester University which is sponsoring my research into Wireless Sensor Networks.
  • To switch between the TinyOS 2.x and 2.1 environment, run the shell script /opt/tinyos-2.1.0/tinyos.sh or /opt/tinyos-2.x/tinyos-2.x.sh. By default the 2.x environment is loaded via ~/.bashrc/.
  • To update TinyOS 2.x with latest CVS Code:
    cd /opt; cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co -P tinyos-2.x
  • I’ve testing this using Mica2 and Micaz. Let me know if you have success with other combinations as I just do not have the hardware to test.
  • Usually the programming port and the data port are on consecutive ports. In the example above, the programming device is /dev/ttyUSB0 and the data port, for serialforwarder, is /dev/ttyUSB1

Known Bugs?

If you have issues while enabling USB Passthrough, such as an error like:

Version:1.0 StartHTML:0000000105 EndHTML:0000001970 StartFragment:0000000127 EndFragment:0000001952

Result Code: E_INVALIDARG (0×80070057)
Component: HostUSBDevice
Interface: IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a}
Callee: IConsole {6375231a-c17c-464b-92cb-ae9e128d71c3}

Reboot your host system. I believe this happens while reinstalling the passthrough driver for the USB device for the first time. Rebooting seems to fix this problem, and after the initial setup this problem seems to disappear.

If you have any other problems (or compliments!) please leave a message via the form below.

Share and Enjoy:
  • Twitter
  • del.icio.us
  • Digg
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Print
  • StumbleUpon

1 Tweet

1 Trackbacks

You can leave a trackback using this URL: http://systembash.com/content/ubuntos-ubuntu-9-10-tinyos-2-x-virtualbox-image/trackback/

  1. By Dave Drager on February 9, 2010 at 1:06 am

    New Post: UbunTOS – Ubuntu 9.10 + TinyOS 2.x VirtualBox Image http://bit.ly/aGDmJq

8 Comments

  1. Thanks so much for making this available; I was about to roll my own VM, but was not looking forward to setting up the TinyOS dev environment all over again.

    Posted March 3, 2010 at 5:34 pm | Permalink
  2. @Jason Gao: Glad you find it useful – let me know if you have any suggestions for enhancements. I was surprised no one else had created a VM for easy development, since TinyOS isn’t exactly easy to set up, especially in a Windows environment. Hope that having a VirtualBox image ready to go will lower the barrier of entry for budding TinyOS developers.

    Posted March 3, 2010 at 5:54 pm | Permalink
  3. cgha

    Can it be used in vmware6.5 workstation?
    I can’t get it go,First,it complains the file is too large when booting,then i add to vmx file,
    but another error occur:
    “Bios disk write error,Failed to boot default entries”.
    My pc:P4 3.0 Dual, 2G RAM, about 30G unused HDD.
    May be i should try the VirtualBox instead.
    Can you help me out?

    Posted March 11, 2010 at 10:39 pm | Permalink
  4. @cgha: This was built in VirtualBox, so I would assume that it requires VirtualBox to boot off of. I haven’t tried it in VMware. Let me know if you have any problems booting in VirtualBox.

    Posted March 11, 2010 at 10:41 pm | Permalink
  5. cgha

    yeath,i tried in virtualbox,and it can run without error.Cheers!
    But when i open eclipse and firefox,the virtualbox crashed saied no more ram available. I arranged 800M RAM to virtualbox,and the cpu is always high than 80%,maybe the virtualbox takes up more resources.So maybe i should try myself with a fresh ubuntu and tinyos without virtual software.Thanks for you excellent work again.

    Posted March 12, 2010 at 4:32 am | Permalink
  6. cgha

    Hello,Dave,could you be kindly to offer an iso file that contains ubuntu9.10 and TinyOS2.X?
    I installed TinyOS2.1.0 and Ubuntu9.10 in my laptop sucessfully,but when want to update from 2.1.0 to Tinyos-2.x from cvs,i can not compile the examples in TinyOS-2.x anymore.I’ve update the environment for tinyos-2.x.Maybe i missed something.

    Posted March 13, 2010 at 2:40 am | Permalink
  7. Pedro Nunes

    Thanks a lot for this contribution. I was thinking myself on creating an image of the last Ubuntu’s distribution with TinyOS 2.1 installed until I “bounced” on your website! :) I’m new to this whole world of WSN and I found it too hard to do a fresh install.
    The only suggestion I can remember right now is for you to create a VM image, so that those who already have VMWare installed (and work often with it) could be able to use your image with minimal effort. Nonetheless, this was a great initiative and I’m sure it will be very useful to me. Thank you once again.

    Posted March 13, 2010 at 9:59 am | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*