SlideShare a Scribd company logo
1 of 8
Download to read offline
TinyOS Manual For Beginners in Linux
(Ubuntu)
Ankit Singh
FH Frankfurt am Main
February 10, 2011
Contents
1 TinyOS Installation Guide for Beginners 2
1.1 Procedure for Installation and configuring TinyOS . . . . . . 2
1.1.1 Installation of TinyOS (Source tinyos.net) . . . . . . . 2
1.1.2 Configuration of TinyOS . . . . . . . . . . . . . . . . . 3
1.1.3 Confirming the correct configuration of the Tinyos . . 4
1.1.4 Connecting Motes & pushing modules to Motes . . . . 4
1.1.5 Setting Up Environment for Mote Listener . . . . . . 6
1.2 Compiling and Pushing Sensor board specific Application . . 7
1.2.1 Compile Module . . . . . . . . . . . . . . . . . . . . . 7
1.2.2 To Push it to the Motes . . . . . . . . . . . . . . . . . 7
1.2.3 Running GUI in For Base Station . . . . . . . . . . . 7
1
Chapter 1
TinyOS Installation Guide
for Beginners
1.1 Procedure for Installation and configuring TinyOS
1.1.1 Installation of TinyOS (Source tinyos.net)
In Ubuntu operating system open following file:
System → Administration → Synaptic Package Manager
After Synaptic Package Manager get open goto:
Settings → Repositories → Other software → (Press) Add
After pressing Add button, Please enter the following line to add the tinyOS
repositories:
deb http://tinyos.stanford.edu/tinyos/dists/ubuntu <distribution> main
Distribution is the distribution name of the Ubuntu. If you do not know
the distribution name then please follow the steps to know your Ubuntu
Distribution:
Type the the folllowing command on your linux command line:
ankit@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1
LTS Release: 10.04
Codename: lucid
You will get some output like the above. The Codename: lucid is my dis-
tribution name. So, Just use the name which shows to you.
2
After you inserted the above line in the add pop-up then press close. The
linux will ask your permission to update the repositories. Just close it and
it will automatically do it.
Now, there is a option called Quick Search: Please enter tinyos as search
key. You can see some result on it. Choose tinyos-2.1.1.
Then press Apply button in Synaptic Package Manager.
It will install tinyos for you.
1.1.2 Configuration of TinyOS
Open Terminal in Ubuntu
You need to source the tinyos.sh (shell script) in bashrc. Type the following
command:
ankit@ubuntu:~$ sudo gedit .bashrc
The .bashrc file will be open after hitting enter
Then copy & paste the following lines after the first syntax lines:
#Sourcing the tinyos environment variable setup script
source /opt/tinyos-2.1.1/tinyos.sh
After that, save & exit.
Change the owner ship of the tinyos directory
Change directory to: (use the following command)
ankit@ubuntu:~$cd /opt/
ankit@ubuntu:~$sudo Chown -R ankit:ankit tinyos-2.1.1/
Note: use your home folder name given before ’@’ sign - Add path to
tinyos.jar file in tinyos.sh
ankit@ubuntu:~$cd /opt/tinyos-2.1.1
ankit@ubuntu:/opt/tinyos-2.1.1$sudo gedit tinyos.sh
Add the following line just after the end of the CLASSPATH:
:$TOSROOT/support/sdk/java/tinyos.jar:.
The line should look like:
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java:
$TOSROOT/support/sdk/java/tinyos.jar:.
3
1.1.3 Confirming the correct configuration of the Tinyos
Change directory to:
ankit@ubuntu:~$cd /opt/tinyos-2.1.1/apps/Blink
Type the make command for the module Blink
ankit@ubuntu:/opt/tinyos-2.1.1/apps/Blink$ make micaz
You should see the output like this:
mkdir -p build/micaz
compiling BlinkAppC to a micaz binary
ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all
-target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=
0x22 --param max-inline-insns-single=100000 -DIDENT_APPNAME="BlinkAppC" -
DIDENT_USERNAME="ankit" -DIDENT_HOSTNAME="ubuntu" -
DIDENT_USERHASH=0x1bba31edL
-DIDENT_TIMESTAMP=0x4cec121eL -DIDENT_UIDHASH=0x92b330deL -fnesc- dump=wiring -
fnesc-dump=’interfaces(!abstract())’ -fnesc- dump=’referenced(interfacedefs,
components)’ -fnesc- dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm
compiled BlinkAppC to build/micaz/main.exe
2052 bytes in ROM
51 bytes in RAM
avr-objcopy --output-target=srec build/micaz/main.exe
build/micaz/main.srec avr-objcopy --output-target=ihex
build/micaz/main.exe build/micaz/main.ihex
writing TOS image
If you are able to see ’writing TOS’ image at end then you have successfully
configured the Tinyos.
1.1.4 Connecting Motes & pushing modules to Motes
Every time you connect a new mote to the serial-based programming board
, you have to again setup & configure the network address of the program-
ming board and system. So, to make life easy, I wrote a shell script.
All SHELL SCRIPTS tools can be found in MicazXpl project repositories.
Following are the shell script for configuring network
ankit@ubuntu:~$sudo gedit /bin/runMoteSetup.sh
#!/bin/sh
sudo ifconfig eth0 10.5.5.1
4
sudo arp -s 10.5.5.5 00204A13E829
netcat 10.5.5.5 1
netcat 10.5.5.5 9999
NOTE: 00204A13E829 is the MAC address of my serial-based programming
board. You need to put your own MAC address finding on the board.
This will save the shell script in /bin folder which will make this shell script
accessible from any folder or path. Don’t forget to make the shell script to
executable file by using the following command.
ankit@ubuntu:~$sudo chmod +x /bin/runMoteSetup.sh
ankit@ubuntu:~$ runMoteSetup.sh
??#??#
*** Lantronix Universal Device Server ***
Serial Number 1359433 MAC address 00204A13E829
Software version V5.8.0.1 (041112) LTX
Press Enter for Setup Mode
Now, The shell script to push the modules to the Motes:
ankit@ubuntu:~$sudo gedit /bin/pushToMotes.sh
#!/bin/sh
## For comiling Data And pushing it in the Mote
make micaz install eprb,10.5.5.5
For making the above shell script executable.
ankit@ubuntu:~$sudo chmod +x /bin/pushToMotes.sh
ankit@ubuntu:/opt/tinyos-2.1.1/apps/Blink$ pushToMotes.sh mkdir -p build/micaz
compiling BlinkAppC to a micaz binary ncc -o build/micaz/main.exe -Os
-fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=
build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22
--param max-inline-insns-single=100000 -DIDENT_APPNAME="BlinkAppC" -
DIDENT_USERNAME="ankit" -DIDENT_HOSTNAME="ubuntu" -
DIDENT_USERHASH=0x1bba31edL -DIDENT_TIMESTAMP=0x4ceef6c4L -
DIDENT_UIDHASH=0x44161342L -fnesc- dump=wiring -fnesc-dump=’interfaces(!abstract())’
fnesc- dump=’referenced(interfacedefs, components)’ -fnesc- dumpfile=build/
micaz/wiring-check.xml BlinkAppC.nc -lm
compiled BlinkAppC to build/micaz/main.exe
2052 bytes in ROM
51 bytes in RAM
5
avr-objcopy --output-target=srec build/micaz/main.exe
build/micaz/main.srec avr-objcopy --output-target=ihex build/micaz/main.exe
build/micaz/main.ihex
writing TOS image
cp build/micaz/main.srec build/micaz/main.srec.out
installing micaz binary using eprb uisp -dprog=stk500 -dhost=10.5.5.5
--wr_fuse_h=0xd9 -
dpart=ATmega128 --wr_fuse_e=ff --erase --upload if=build/micaz/main.srec.out
--verify Firmware Version: 1.7 Atmel AVR ATmega128 is found.
Uploading: flash
Verifying: flash
Fuse High Byte set to 0xd9
Fuse Extended Byte set to 0xff 
rm -f build/micaz/main.exe.out build/micaz/main.srec.out
1.1.5 Setting Up Environment for Mote Listener
Mote Listner is used to read the data broadcasted by motes in the network
and saves to the output file. Following are the commands for listening:
java net.tinyos.tools.Listen -comm network@10.5.5.5:10002
It is supposed to be serial communication but in our case, we are us-
ing TCP/IP connection. That is why we are using ”network@IP:PORT” in
above command.
You can also go through the java source for getting more details on number
of options available for your type of connection to your PC:
ankit@ubuntu:/opt/tinyos-2.1.1/support/sdk/java/net/tinyos$
vim packet/BuildSource.java
You can export the MOTECOM for not always passing option -comm
export MOTECOM=network@10.5.5.5:10002
Then run java listner without -comm parameter
ankit@ubuntu:/opt/tinyos-2.1.1/apps/tests/TestSerial$
java net.tinyos.tools.Listen
6
1.2 Compiling and Pushing Sensor board specific
Application
We are going to take example of Oscilloscope application given with TinyOS
package.
Application Path is :
/opt/tinyos-2.1.1/apps/Oscilloscope/
1.2.1 Compile Module
To Compile this Module, You need to provide Sensor board type. In our
Case its: mts300.
Type the following command on your linux console.
SENSORBOARD=mts300 make micaz
1.2.2 To Push it to the Motes
Type the following command on your linux console using your variables into
the syntax bracket.
make micaz reinstall eprb,<Node-ID> <IP-Adr>
Node-ID: Mote ID you want to set like Mode ID 1 or 2 or anything
IP-Adr: IP address of the Motes
1.2.3 Running GUI in For Base Station
Goto to Java folder of Oscilloscope:
/opt/tinyos-2.1.1/apps/Oscilloscope/java/
Setting Environment variable for motes communication:
export MOTECOM=network@10.5.5.5:10002
Then RUN the Java Application:
ankit@ubuntu:/opt/tinyos-2.1.1/apps/Oscilloscope-Mic/java$./run
Hope it will be helpful for you to get started!!! Thank You!!
7

More Related Content

What's hot

Intro to parallel computing
Intro to parallel computingIntro to parallel computing
Intro to parallel computingPiyush Mittal
 
VTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION) SOLVED PAPERS
VTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION)  SOLVED PAPERSVTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION)  SOLVED PAPERS
VTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION) SOLVED PAPERSvtunotesbysree
 
Map reduce - simplified data processing on large clusters
Map reduce - simplified data processing on large clustersMap reduce - simplified data processing on large clusters
Map reduce - simplified data processing on large clustersCleverence Kombe
 
Chapter 16 - Distributed System Structures
Chapter 16 - Distributed System StructuresChapter 16 - Distributed System Structures
Chapter 16 - Distributed System StructuresWayne Jones Jnr
 
Types of line coding
Types of line codingTypes of line coding
Types of line codingramalakshmi54
 
L3 instruction-execution-steps
L3 instruction-execution-stepsL3 instruction-execution-steps
L3 instruction-execution-stepsrsamurti
 
Multicasting and multicast routing protocols
Multicasting and multicast routing protocolsMulticasting and multicast routing protocols
Multicasting and multicast routing protocolsAbhishek Kesharwani
 
C10 support for-mobility
C10 support for-mobilityC10 support for-mobility
C10 support for-mobilityRio Nguyen
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processingPage Maker
 
Mobile ad hoc networks (MANET) for KTU
Mobile ad hoc networks (MANET) for KTUMobile ad hoc networks (MANET) for KTU
Mobile ad hoc networks (MANET) for KTUVinish Alikkal
 
Power management
Power managementPower management
Power managementScott Shu
 
CDMA Transmitter and Receiver Implementation Using FPGA
CDMA Transmitter and Receiver Implementation Using FPGACDMA Transmitter and Receiver Implementation Using FPGA
CDMA Transmitter and Receiver Implementation Using FPGAIOSR Journals
 
Logical channels
Logical channelsLogical channels
Logical channelsUthsoNandy
 
6. 2 ray propagation model part 2
6. 2 ray propagation model   part 26. 2 ray propagation model   part 2
6. 2 ray propagation model part 2JAIGANESH SEKAR
 
C05 satellite systems
C05 satellite systemsC05 satellite systems
C05 satellite systemsRio Nguyen
 

What's hot (20)

Intro to parallel computing
Intro to parallel computingIntro to parallel computing
Intro to parallel computing
 
Atom and rss
Atom and rssAtom and rss
Atom and rss
 
VTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION) SOLVED PAPERS
VTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION)  SOLVED PAPERSVTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION)  SOLVED PAPERS
VTU 5TH SEM CSE COMPUTER NETWORKS-1 (DATA COMMUNICATION) SOLVED PAPERS
 
Autosar Basics hand book_v1
Autosar Basics  hand book_v1Autosar Basics  hand book_v1
Autosar Basics hand book_v1
 
Map reduce - simplified data processing on large clusters
Map reduce - simplified data processing on large clustersMap reduce - simplified data processing on large clusters
Map reduce - simplified data processing on large clusters
 
Chapter 16 - Distributed System Structures
Chapter 16 - Distributed System StructuresChapter 16 - Distributed System Structures
Chapter 16 - Distributed System Structures
 
Types of line coding
Types of line codingTypes of line coding
Types of line coding
 
L3 instruction-execution-steps
L3 instruction-execution-stepsL3 instruction-execution-steps
L3 instruction-execution-steps
 
Multicasting and multicast routing protocols
Multicasting and multicast routing protocolsMulticasting and multicast routing protocols
Multicasting and multicast routing protocols
 
C10 support for-mobility
C10 support for-mobilityC10 support for-mobility
C10 support for-mobility
 
Introduction to parallel processing
Introduction to parallel processingIntroduction to parallel processing
Introduction to parallel processing
 
Mobile ad hoc networks (MANET) for KTU
Mobile ad hoc networks (MANET) for KTUMobile ad hoc networks (MANET) for KTU
Mobile ad hoc networks (MANET) for KTU
 
Power management
Power managementPower management
Power management
 
Mac layer
Mac  layerMac  layer
Mac layer
 
Fault tolerance techniques
Fault tolerance techniquesFault tolerance techniques
Fault tolerance techniques
 
CDMA Transmitter and Receiver Implementation Using FPGA
CDMA Transmitter and Receiver Implementation Using FPGACDMA Transmitter and Receiver Implementation Using FPGA
CDMA Transmitter and Receiver Implementation Using FPGA
 
Logical channels
Logical channelsLogical channels
Logical channels
 
6. 2 ray propagation model part 2
6. 2 ray propagation model   part 26. 2 ray propagation model   part 2
6. 2 ray propagation model part 2
 
C05 satellite systems
C05 satellite systemsC05 satellite systems
C05 satellite systems
 
Introduction to embedded system
Introduction to embedded systemIntroduction to embedded system
Introduction to embedded system
 

Viewers also liked

Security Vision for Software on Wheels (Autonomous Vehicles)
Security Vision for Software on Wheels (Autonomous Vehicles)Security Vision for Software on Wheels (Autonomous Vehicles)
Security Vision for Software on Wheels (Autonomous Vehicles)Ankit Singh
 
2009 04 москва, совазс
2009 04 москва, совазс2009 04 москва, совазс
2009 04 москва, совазсTelemark
 
Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...
Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...
Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...Jackson Bond
 
How new technologies affect the art of contesting
How new technologies affect the art of contestingHow new technologies affect the art of contesting
How new technologies affect the art of contestingTobias Wellnitz
 
Eurowerks 2009 Slideshow
Eurowerks 2009 SlideshowEurowerks 2009 Slideshow
Eurowerks 2009 Slideshoweurowerks
 
Week11 Presentation Group-C
Week11 Presentation Group-CWeek11 Presentation Group-C
Week11 Presentation Group-Cs1160114
 
Eprotect Complan Ver 4
Eprotect Complan Ver 4Eprotect Complan Ver 4
Eprotect Complan Ver 4etalcomendras
 
A73A CQWW 2012 Contest operation from the Desert of Qatar
A73A CQWW 2012 Contest operation from the Desert of QatarA73A CQWW 2012 Contest operation from the Desert of Qatar
A73A CQWW 2012 Contest operation from the Desert of QatarTobias Wellnitz
 
LiveOffice Email Archiving & Compliance 201
LiveOffice Email Archiving & Compliance 201LiveOffice Email Archiving & Compliance 201
LiveOffice Email Archiving & Compliance 201Veritas Technologies LLC
 
Angeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumesAngeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumessfa_angeiologie
 
Object Flow Analysis
Object Flow AnalysisObject Flow Analysis
Object Flow Analysislienhard
 

Viewers also liked (20)

Security Vision for Software on Wheels (Autonomous Vehicles)
Security Vision for Software on Wheels (Autonomous Vehicles)Security Vision for Software on Wheels (Autonomous Vehicles)
Security Vision for Software on Wheels (Autonomous Vehicles)
 
201004 - brain computer interaction
201004 - brain computer interaction201004 - brain computer interaction
201004 - brain computer interaction
 
2009 04 москва, совазс
2009 04 москва, совазс2009 04 москва, совазс
2009 04 москва, совазс
 
Séptimo Básico.Pp
Séptimo Básico.PpSéptimo Básico.Pp
Séptimo Básico.Pp
 
Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...
Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...
Mobile Social Media, Sept. 2010, Do You Want To Be Visible?, Marketing Club K...
 
201505 CSE340 Lecture 06
201505 CSE340 Lecture 06201505 CSE340 Lecture 06
201505 CSE340 Lecture 06
 
201505 CSE340 Lecture 03
201505 CSE340 Lecture 03201505 CSE340 Lecture 03
201505 CSE340 Lecture 03
 
Wiseman Jack
Wiseman JackWiseman Jack
Wiseman Jack
 
Diego Ernesto Leal
Diego Ernesto LealDiego Ernesto Leal
Diego Ernesto Leal
 
201506 CSE340 Lecture 21
201506 CSE340 Lecture 21201506 CSE340 Lecture 21
201506 CSE340 Lecture 21
 
How new technologies affect the art of contesting
How new technologies affect the art of contestingHow new technologies affect the art of contesting
How new technologies affect the art of contesting
 
Week10
Week10Week10
Week10
 
Week7
Week7Week7
Week7
 
Eurowerks 2009 Slideshow
Eurowerks 2009 SlideshowEurowerks 2009 Slideshow
Eurowerks 2009 Slideshow
 
Week11 Presentation Group-C
Week11 Presentation Group-CWeek11 Presentation Group-C
Week11 Presentation Group-C
 
Eprotect Complan Ver 4
Eprotect Complan Ver 4Eprotect Complan Ver 4
Eprotect Complan Ver 4
 
A73A CQWW 2012 Contest operation from the Desert of Qatar
A73A CQWW 2012 Contest operation from the Desert of QatarA73A CQWW 2012 Contest operation from the Desert of Qatar
A73A CQWW 2012 Contest operation from the Desert of Qatar
 
LiveOffice Email Archiving & Compliance 201
LiveOffice Email Archiving & Compliance 201LiveOffice Email Archiving & Compliance 201
LiveOffice Email Archiving & Compliance 201
 
Angeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumesAngeiologie 4 2013 - 1-2014 livre des resumes
Angeiologie 4 2013 - 1-2014 livre des resumes
 
Object Flow Analysis
Object Flow AnalysisObject Flow Analysis
Object Flow Analysis
 

Similar to TinyOS installation Guide And Manual

BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsGlobalLogic Ukraine
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSPratik Tambekar
 
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014EneaSoftware
 
IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with PythonLelio Campanile
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxkarlhennesey
 
MicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionMicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionsdoro58
 
Nccp Presentation Ubuntu
Nccp Presentation UbuntuNccp Presentation Ubuntu
Nccp Presentation Ubuntuinternscpu
 
Ubuntu Practice and Configuration
Ubuntu Practice and ConfigurationUbuntu Practice and Configuration
Ubuntu Practice and ConfigurationManoj Sahu
 
2 how to-build_document_management_system
2 how to-build_document_management_system2 how to-build_document_management_system
2 how to-build_document_management_systemKichiemon Adachi
 
Adding System Call to Kernel
Adding System Call to KernelAdding System Call to Kernel
Adding System Call to KernelMuhammad Bilal
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 

Similar to TinyOS installation Guide And Manual (20)

BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
 
How To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OSHow To Add System Call In Ubuntu OS
How To Add System Call In Ubuntu OS
 
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
Open Enea Linux workshop at the Embedded Conference Scandinavia 2014
 
IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with Python
 
Linux
LinuxLinux
Linux
 
snortinstallguide
snortinstallguidesnortinstallguide
snortinstallguide
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
 
LIGGGHTS installation-guide
LIGGGHTS installation-guideLIGGGHTS installation-guide
LIGGGHTS installation-guide
 
MicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionMicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introduction
 
Install guide
Install guideInstall guide
Install guide
 
Install guide
Install guideInstall guide
Install guide
 
Nccp Presentation Ubuntu
Nccp Presentation UbuntuNccp Presentation Ubuntu
Nccp Presentation Ubuntu
 
Ubuntu Practice and Configuration
Ubuntu Practice and ConfigurationUbuntu Practice and Configuration
Ubuntu Practice and Configuration
 
Linux
LinuxLinux
Linux
 
2 how to-build_document_management_system
2 how to-build_document_management_system2 how to-build_document_management_system
2 how to-build_document_management_system
 
Adding System Call to Kernel
Adding System Call to KernelAdding System Call to Kernel
Adding System Call to Kernel
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
linux
linuxlinux
linux
 

More from Ankit Singh

IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...
IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...
IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...Ankit Singh
 
Parallex - The Supercomputer
Parallex - The SupercomputerParallex - The Supercomputer
Parallex - The SupercomputerAnkit Singh
 
Cooperative Linux
Cooperative LinuxCooperative Linux
Cooperative LinuxAnkit Singh
 
Design Alternative for Parallel Systems
Design Alternative for Parallel SystemsDesign Alternative for Parallel Systems
Design Alternative for Parallel SystemsAnkit Singh
 
Restricted Usage of Anonymous Credentials in VANET for Misbehaviour Detection
Restricted Usage of Anonymous Credentials in VANET for Misbehaviour DetectionRestricted Usage of Anonymous Credentials in VANET for Misbehaviour Detection
Restricted Usage of Anonymous Credentials in VANET for Misbehaviour DetectionAnkit Singh
 
The Security and Privacy Threats to Cloud Computing
The Security and Privacy Threats to Cloud ComputingThe Security and Privacy Threats to Cloud Computing
The Security and Privacy Threats to Cloud ComputingAnkit Singh
 
The Security and Privacy Requirements in VANET
The Security and Privacy Requirements in VANETThe Security and Privacy Requirements in VANET
The Security and Privacy Requirements in VANETAnkit Singh
 
Master Teset Specification SRCP
Master Teset Specification SRCPMaster Teset Specification SRCP
Master Teset Specification SRCPAnkit Singh
 
MicazXpl Intelligent Sensors Network Project Presentation
MicazXpl Intelligent Sensors Network Project PresentationMicazXpl Intelligent Sensors Network Project Presentation
MicazXpl Intelligent Sensors Network Project PresentationAnkit Singh
 
Micazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project reportMicazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project reportAnkit Singh
 
DO-178B/ED-12B Presentation
DO-178B/ED-12B PresentationDO-178B/ED-12B Presentation
DO-178B/ED-12B PresentationAnkit Singh
 
Toilet etiquettes
Toilet etiquettesToilet etiquettes
Toilet etiquettesAnkit Singh
 
Indian German Unity
Indian German UnityIndian German Unity
Indian German UnityAnkit Singh
 
TINYOS Oscilloscope Application
TINYOS Oscilloscope ApplicationTINYOS Oscilloscope Application
TINYOS Oscilloscope ApplicationAnkit Singh
 
Mote Mote Radio Communication
Mote Mote Radio CommunicationMote Mote Radio Communication
Mote Mote Radio CommunicationAnkit Singh
 
Simple Railroad Command Protocol
Simple Railroad Command ProtocolSimple Railroad Command Protocol
Simple Railroad Command ProtocolAnkit Singh
 
Dane presentation
Dane presentationDane presentation
Dane presentationAnkit Singh
 
Anti Collision Railways System
Anti Collision Railways SystemAnti Collision Railways System
Anti Collision Railways SystemAnkit Singh
 
Software Fault Tolerance
Software Fault ToleranceSoftware Fault Tolerance
Software Fault ToleranceAnkit Singh
 

More from Ankit Singh (19)

IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...
IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...
IoT in Mining for Sensing, Monitoring and Prediction of Underground Mines Roo...
 
Parallex - The Supercomputer
Parallex - The SupercomputerParallex - The Supercomputer
Parallex - The Supercomputer
 
Cooperative Linux
Cooperative LinuxCooperative Linux
Cooperative Linux
 
Design Alternative for Parallel Systems
Design Alternative for Parallel SystemsDesign Alternative for Parallel Systems
Design Alternative for Parallel Systems
 
Restricted Usage of Anonymous Credentials in VANET for Misbehaviour Detection
Restricted Usage of Anonymous Credentials in VANET for Misbehaviour DetectionRestricted Usage of Anonymous Credentials in VANET for Misbehaviour Detection
Restricted Usage of Anonymous Credentials in VANET for Misbehaviour Detection
 
The Security and Privacy Threats to Cloud Computing
The Security and Privacy Threats to Cloud ComputingThe Security and Privacy Threats to Cloud Computing
The Security and Privacy Threats to Cloud Computing
 
The Security and Privacy Requirements in VANET
The Security and Privacy Requirements in VANETThe Security and Privacy Requirements in VANET
The Security and Privacy Requirements in VANET
 
Master Teset Specification SRCP
Master Teset Specification SRCPMaster Teset Specification SRCP
Master Teset Specification SRCP
 
MicazXpl Intelligent Sensors Network Project Presentation
MicazXpl Intelligent Sensors Network Project PresentationMicazXpl Intelligent Sensors Network Project Presentation
MicazXpl Intelligent Sensors Network Project Presentation
 
Micazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project reportMicazxpl - Intelligent Sensors Network project report
Micazxpl - Intelligent Sensors Network project report
 
DO-178B/ED-12B Presentation
DO-178B/ED-12B PresentationDO-178B/ED-12B Presentation
DO-178B/ED-12B Presentation
 
Toilet etiquettes
Toilet etiquettesToilet etiquettes
Toilet etiquettes
 
Indian German Unity
Indian German UnityIndian German Unity
Indian German Unity
 
TINYOS Oscilloscope Application
TINYOS Oscilloscope ApplicationTINYOS Oscilloscope Application
TINYOS Oscilloscope Application
 
Mote Mote Radio Communication
Mote Mote Radio CommunicationMote Mote Radio Communication
Mote Mote Radio Communication
 
Simple Railroad Command Protocol
Simple Railroad Command ProtocolSimple Railroad Command Protocol
Simple Railroad Command Protocol
 
Dane presentation
Dane presentationDane presentation
Dane presentation
 
Anti Collision Railways System
Anti Collision Railways SystemAnti Collision Railways System
Anti Collision Railways System
 
Software Fault Tolerance
Software Fault ToleranceSoftware Fault Tolerance
Software Fault Tolerance
 

Recently uploaded

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

TinyOS installation Guide And Manual

  • 1. TinyOS Manual For Beginners in Linux (Ubuntu) Ankit Singh FH Frankfurt am Main February 10, 2011
  • 2. Contents 1 TinyOS Installation Guide for Beginners 2 1.1 Procedure for Installation and configuring TinyOS . . . . . . 2 1.1.1 Installation of TinyOS (Source tinyos.net) . . . . . . . 2 1.1.2 Configuration of TinyOS . . . . . . . . . . . . . . . . . 3 1.1.3 Confirming the correct configuration of the Tinyos . . 4 1.1.4 Connecting Motes & pushing modules to Motes . . . . 4 1.1.5 Setting Up Environment for Mote Listener . . . . . . 6 1.2 Compiling and Pushing Sensor board specific Application . . 7 1.2.1 Compile Module . . . . . . . . . . . . . . . . . . . . . 7 1.2.2 To Push it to the Motes . . . . . . . . . . . . . . . . . 7 1.2.3 Running GUI in For Base Station . . . . . . . . . . . 7 1
  • 3. Chapter 1 TinyOS Installation Guide for Beginners 1.1 Procedure for Installation and configuring TinyOS 1.1.1 Installation of TinyOS (Source tinyos.net) In Ubuntu operating system open following file: System → Administration → Synaptic Package Manager After Synaptic Package Manager get open goto: Settings → Repositories → Other software → (Press) Add After pressing Add button, Please enter the following line to add the tinyOS repositories: deb http://tinyos.stanford.edu/tinyos/dists/ubuntu <distribution> main Distribution is the distribution name of the Ubuntu. If you do not know the distribution name then please follow the steps to know your Ubuntu Distribution: Type the the folllowing command on your linux command line: ankit@ubuntu:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.1 LTS Release: 10.04 Codename: lucid You will get some output like the above. The Codename: lucid is my dis- tribution name. So, Just use the name which shows to you. 2
  • 4. After you inserted the above line in the add pop-up then press close. The linux will ask your permission to update the repositories. Just close it and it will automatically do it. Now, there is a option called Quick Search: Please enter tinyos as search key. You can see some result on it. Choose tinyos-2.1.1. Then press Apply button in Synaptic Package Manager. It will install tinyos for you. 1.1.2 Configuration of TinyOS Open Terminal in Ubuntu You need to source the tinyos.sh (shell script) in bashrc. Type the following command: ankit@ubuntu:~$ sudo gedit .bashrc The .bashrc file will be open after hitting enter Then copy & paste the following lines after the first syntax lines: #Sourcing the tinyos environment variable setup script source /opt/tinyos-2.1.1/tinyos.sh After that, save & exit. Change the owner ship of the tinyos directory Change directory to: (use the following command) ankit@ubuntu:~$cd /opt/ ankit@ubuntu:~$sudo Chown -R ankit:ankit tinyos-2.1.1/ Note: use your home folder name given before ’@’ sign - Add path to tinyos.jar file in tinyos.sh ankit@ubuntu:~$cd /opt/tinyos-2.1.1 ankit@ubuntu:/opt/tinyos-2.1.1$sudo gedit tinyos.sh Add the following line just after the end of the CLASSPATH: :$TOSROOT/support/sdk/java/tinyos.jar:. The line should look like: CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java: $TOSROOT/support/sdk/java/tinyos.jar:. 3
  • 5. 1.1.3 Confirming the correct configuration of the Tinyos Change directory to: ankit@ubuntu:~$cd /opt/tinyos-2.1.1/apps/Blink Type the make command for the module Blink ankit@ubuntu:/opt/tinyos-2.1.1/apps/Blink$ make micaz You should see the output like this: mkdir -p build/micaz compiling BlinkAppC to a micaz binary ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP= 0x22 --param max-inline-insns-single=100000 -DIDENT_APPNAME="BlinkAppC" - DIDENT_USERNAME="ankit" -DIDENT_HOSTNAME="ubuntu" - DIDENT_USERHASH=0x1bba31edL -DIDENT_TIMESTAMP=0x4cec121eL -DIDENT_UIDHASH=0x92b330deL -fnesc- dump=wiring - fnesc-dump=’interfaces(!abstract())’ -fnesc- dump=’referenced(interfacedefs, components)’ -fnesc- dumpfile=build/micaz/wiring-check.xml BlinkAppC.nc -lm compiled BlinkAppC to build/micaz/main.exe 2052 bytes in ROM 51 bytes in RAM avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex writing TOS image If you are able to see ’writing TOS’ image at end then you have successfully configured the Tinyos. 1.1.4 Connecting Motes & pushing modules to Motes Every time you connect a new mote to the serial-based programming board , you have to again setup & configure the network address of the program- ming board and system. So, to make life easy, I wrote a shell script. All SHELL SCRIPTS tools can be found in MicazXpl project repositories. Following are the shell script for configuring network ankit@ubuntu:~$sudo gedit /bin/runMoteSetup.sh #!/bin/sh sudo ifconfig eth0 10.5.5.1 4
  • 6. sudo arp -s 10.5.5.5 00204A13E829 netcat 10.5.5.5 1 netcat 10.5.5.5 9999 NOTE: 00204A13E829 is the MAC address of my serial-based programming board. You need to put your own MAC address finding on the board. This will save the shell script in /bin folder which will make this shell script accessible from any folder or path. Don’t forget to make the shell script to executable file by using the following command. ankit@ubuntu:~$sudo chmod +x /bin/runMoteSetup.sh ankit@ubuntu:~$ runMoteSetup.sh ??#??# *** Lantronix Universal Device Server *** Serial Number 1359433 MAC address 00204A13E829 Software version V5.8.0.1 (041112) LTX Press Enter for Setup Mode Now, The shell script to push the modules to the Motes: ankit@ubuntu:~$sudo gedit /bin/pushToMotes.sh #!/bin/sh ## For comiling Data And pushing it in the Mote make micaz install eprb,10.5.5.5 For making the above shell script executable. ankit@ubuntu:~$sudo chmod +x /bin/pushToMotes.sh ankit@ubuntu:/opt/tinyos-2.1.1/apps/Blink$ pushToMotes.sh mkdir -p build/micaz compiling BlinkAppC to a micaz binary ncc -o build/micaz/main.exe -Os -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile= build/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 -DIDENT_APPNAME="BlinkAppC" - DIDENT_USERNAME="ankit" -DIDENT_HOSTNAME="ubuntu" - DIDENT_USERHASH=0x1bba31edL -DIDENT_TIMESTAMP=0x4ceef6c4L - DIDENT_UIDHASH=0x44161342L -fnesc- dump=wiring -fnesc-dump=’interfaces(!abstract())’ fnesc- dump=’referenced(interfacedefs, components)’ -fnesc- dumpfile=build/ micaz/wiring-check.xml BlinkAppC.nc -lm compiled BlinkAppC to build/micaz/main.exe 2052 bytes in ROM 51 bytes in RAM 5
  • 7. avr-objcopy --output-target=srec build/micaz/main.exe build/micaz/main.srec avr-objcopy --output-target=ihex build/micaz/main.exe build/micaz/main.ihex writing TOS image cp build/micaz/main.srec build/micaz/main.srec.out installing micaz binary using eprb uisp -dprog=stk500 -dhost=10.5.5.5 --wr_fuse_h=0xd9 - dpart=ATmega128 --wr_fuse_e=ff --erase --upload if=build/micaz/main.srec.out --verify Firmware Version: 1.7 Atmel AVR ATmega128 is found. Uploading: flash Verifying: flash Fuse High Byte set to 0xd9 Fuse Extended Byte set to 0xff rm -f build/micaz/main.exe.out build/micaz/main.srec.out 1.1.5 Setting Up Environment for Mote Listener Mote Listner is used to read the data broadcasted by motes in the network and saves to the output file. Following are the commands for listening: java net.tinyos.tools.Listen -comm network@10.5.5.5:10002 It is supposed to be serial communication but in our case, we are us- ing TCP/IP connection. That is why we are using ”network@IP:PORT” in above command. You can also go through the java source for getting more details on number of options available for your type of connection to your PC: ankit@ubuntu:/opt/tinyos-2.1.1/support/sdk/java/net/tinyos$ vim packet/BuildSource.java You can export the MOTECOM for not always passing option -comm export MOTECOM=network@10.5.5.5:10002 Then run java listner without -comm parameter ankit@ubuntu:/opt/tinyos-2.1.1/apps/tests/TestSerial$ java net.tinyos.tools.Listen 6
  • 8. 1.2 Compiling and Pushing Sensor board specific Application We are going to take example of Oscilloscope application given with TinyOS package. Application Path is : /opt/tinyos-2.1.1/apps/Oscilloscope/ 1.2.1 Compile Module To Compile this Module, You need to provide Sensor board type. In our Case its: mts300. Type the following command on your linux console. SENSORBOARD=mts300 make micaz 1.2.2 To Push it to the Motes Type the following command on your linux console using your variables into the syntax bracket. make micaz reinstall eprb,<Node-ID> <IP-Adr> Node-ID: Mote ID you want to set like Mode ID 1 or 2 or anything IP-Adr: IP address of the Motes 1.2.3 Running GUI in For Base Station Goto to Java folder of Oscilloscope: /opt/tinyos-2.1.1/apps/Oscilloscope/java/ Setting Environment variable for motes communication: export MOTECOM=network@10.5.5.5:10002 Then RUN the Java Application: ankit@ubuntu:/opt/tinyos-2.1.1/apps/Oscilloscope-Mic/java$./run Hope it will be helpful for you to get started!!! Thank You!! 7