Announcements and Reminders Changes of TA’s office hours 

advertisement

Announcements and Reminders

Changes of TA’s office hours

 Old office hours: TTR 10:00-11:00am

 New office hours:

• Monday 4:00-5:00pm

• Tuesday 10:00-11:00am

 Go to the TA next Monday if you have any question on

TinyOS Installation

Reminder

 Project team forming deadline next Monday (8/31) by

12pm

• 4 groups are formed so far

 I will randomly assign you to a team after the deadline

• Teams will be announced on next Monday’s class

ECE 455/555 Embedded System Design 1

Classes on TinyOS & Android

Programming

A series of classes on TinyOS & Android programming

 Intertwined with regular lectures

8/28 & 8/31: TinyOS Installation & Introduction

 Announcement of Lab 1

9/2: Android Installation & Introduction

Running an Android simulator

9/21: Programming with nesC, sensor reading

 Announcement of Lab 2

9/23: Message sending/receiving

10/2: Android programming

10/5: Display data on PC

 Announcement of Lab 3

ECE 455/555 Embedded System Design 2

ECE 455/555

Embedded System Design

TinyOS Installation

Wei Gao

Fall 2015 3

Installing TinyOS via VirtualBox

Installing TinyOS over different OS environments

 Windows XP, Vista, 7, 8, mobile …

 Mac OS X

 Linux Ubuntu, RedHat, Debian …

 Complicated environmental setup which is OS-dependent

Unified solution

 Installation over a virtual environment

 VirtualBox: Oracle Virtual Machine (VM) solution

• OS-independent run-time environment

• Works on any x86 architecture

 Enable automatic, hassle-free TinyOS installation

ECE 455/555 Embedded System Design 4

Installing TinyOS via VirtualBox

 Virtual Machine

 Run an OS instance residing in another OS

 TinyOS installation solution: run Linux Ubuntu over different types of host OS

ECE 455/555 Embedded System Design 5

Installing TinyOS via VirtualBox

Download and install VirtualBox: https://www.virtualbox.org/wiki/Downloads

Open VirtualBox. Click “ New ”

“ Name ”: up to you…

“ Type ”: linux

“ Version ”: Ubuntu

“ Memory size ” 1024Mb

Create a virtual hard drive. Please allocate at least 16GB space for the hard drive

Download Ubuntu from http://www.ubuntu.com/download/desktop

ECE 455/555 Embedded System Design 6

Installing TinyOS via VirtualBox

 Install Linux in VirtualBox with virtual hard disk referring to the downloaded Ubuntu.version.iso.

ECE 455/555 Embedded System Design 7

Installing TinyOS via VirtualBox

Repower Linux

Install Ubuntu on VirtualBox.

Open terminal in Ubuntu

Before installing TinyOS, you must include the TinyOS repository addresses into the repository source file.

 This can be done by editing the file:

/etc/apt/sources.list

as follows:

Run $ sudo gedit /etc/apt/sources.list

ECE 455/555 Embedded System Design 8

Installing TinyOS via VirtualBox

Include the following 4 lines at the end of the script:

#tinyOS deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main deb http://tinyos.stanford.edu/tinyos/dists/ubuntu maverick main deb http://tinyos.stanford.edu/tinyos/dists/ubuntu natty main

Save and close the “gedit” application.

Open the terminal console and execute the following command:

 $ sudo apt-get update

 $ sudo apt-get install tinyos

ECE 455/555 Embedded System Design 9

Installing TinyOS via VirtualBox

 Then you’re going to a list of the TinyOS version available as presented below:

ECE 455/555 Embedded System Design 10

Installing TinyOS via VirtualBox

Run the following command to install TinyOS 2.1.2.

 $ sudo apt-get install tinyos-2.1.2

 You’ll be asked to enter the administration password and to confirm one or two steps along the way.

Change the root…using : sudo passwd root

Type in your password. Then the terminal works in root.

ECE 455/555 Embedded System Design 11

Some Additional Steps

Copy the file tinyos.sh

to /opt/tinyos-2.1.2 folder

 http://web.eecs.utk.edu/~weigao/ece455/fall2015/tinyos.

sh

Edit .bashrc: $ sudo gedit ~/.bashrc

 Add “source /opt/tinyos-2.1.2/tinyos.sh” to the end of

.bashrc file

Reboot terminal

ECE 455/555 Embedded System Design 12

Some Additional Steps

 Enable telosb device on the right corner of the screen

 Attention : Every time when you enter the Ubuntu, input su and the password

ECE 455/555 Embedded System Design 13

Running a TinyOS Demo

Instruction: http://docs.tinyos.net/tinywiki/index.php/Getting_St arted_with_TinyOS#Compiling_and_Installing

(Installing on telos-family mote) motelist to make sure your mote is successfully connected and installed

ECE 455/555 Embedded System Design 14

Run the Blink Demo

 Run $ make telosb install bsl,/dev/ttyUSB0

ECE 455/555 Embedded System Design 15

Running a Demo

Try to pair up with the person next to you

 One of you installs the BaseStation app

• /opt/tinyos-2.x/apps/BaseStation

 Another of you installs the Oscilloscope app

• /opt/tinyos-2.x/apps/Oscilloscope

 Your two motes should be linking as synchronized

Look into the /opt/tinyos-2.x/apps for more programs

ECE 455/555 Embedded System Design 16

Useful Links

TinyOS site: http://www.tinyos.net

TinyOS documentation:

 http://www.tinyos.net/tinyos-2.x/doc/

TinyOS installation: http://docs.tinyos.net/tinywiki/index.php/Installing_TinyOS_2

.1.1

TinyOS online tutorials:

 http://docs.tinyos.net/tinywiki/index.php/TinyOS_Tutorials

 http://www.tinyos.net/dist-2.0.0/doc/html/tutorial/

 http://csl.stanford.edu/~pal/pubs/tinyos-programming-1-0.pdf

TinyOS mailinglist:

 http://mail.millennium.berkeley.edu/pipermail/tinyoshelp/

ECE 455/555 Embedded System Design 17

Lab 1 Announcement

Lab 1 is due 9/16 (5:30pm Wednesday)

 Everyone checks out one TelosB sensor mote from the TA

 4% in final grade

 Lab is open

• Starting next Wednesday

 You will work on it on your own

• No collaboration is allowed!

 Need to let the TA check you off

• Turn in printed program codes after check-off

Modify the Blink application to

 Realize a counter and display the lower three bits of the count on the

LEDs

How to display a number > 7 (0-63)?

• Show twice, first show the upper three bits and then show the lower three bits http://web.eecs.utk.edu/~weigao/ece455/fall2015/lab1.htm

ECE 455/555 Embedded System Design 18

Download