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

[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화Jaeseung Ha
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival GuideKernel TLV
 
Building Instruqt, a scalable learning platform
Building Instruqt, a scalable learning platformBuilding Instruqt, a scalable learning platform
Building Instruqt, a scalable learning platformInstruqt
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Opersys inc.
 
Webアプリケーション開発者のためのDockerハンズオン20210519
Webアプリケーション開発者のためのDockerハンズオン20210519Webアプリケーション開発者のためのDockerハンズオン20210519
Webアプリケーション開発者のためのDockerハンズオン20210519虎の穴 開発室
 
tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。(^-^) togakushi
 
Weaveを試してみた
Weaveを試してみたWeaveを試してみた
Weaveを試してみたKazuto Kusama
 
Stm32 f4 first touch
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touchBenux Wei
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversBrent Salisbury
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoScyllaDB
 
Dockerと外部ルータを連携させる仕組みを作ってみた
Dockerと外部ルータを連携させる仕組みを作ってみたDockerと外部ルータを連携させる仕組みを作ってみた
Dockerと外部ルータを連携させる仕組みを作ってみたnpsg
 
Physical Layer - Metal vs Fiber
Physical Layer - Metal vs FiberPhysical Layer - Metal vs Fiber
Physical Layer - Metal vs FiberYuya Rin
 
장용석, fmod를이용한사운드프로그래밍, NDC2010
장용석, fmod를이용한사운드프로그래밍, NDC2010장용석, fmod를이용한사운드프로그래밍, NDC2010
장용석, fmod를이용한사운드프로그래밍, NDC2010devCAT Studio, NEXON
 
Tutorial on IEEE 802.11 - MAC Protocols and Frames
Tutorial on IEEE 802.11 - MAC Protocols and FramesTutorial on IEEE 802.11 - MAC Protocols and Frames
Tutorial on IEEE 802.11 - MAC Protocols and FramesDheryta Jaisinghani
 
Fluentd1.2 & Fluent Bit
Fluentd1.2 & Fluent BitFluentd1.2 & Fluent Bit
Fluentd1.2 & Fluent BitSeiya Mizuno
 
Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen Storage
Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen StoragePros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen Storage
Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen StorageEric Carter
 

What's hot (20)

100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival Guide
 
Building Instruqt, a scalable learning platform
Building Instruqt, a scalable learning platformBuilding Instruqt, a scalable learning platform
Building Instruqt, a scalable learning platform
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Webアプリケーション開発者のためのDockerハンズオン20210519
Webアプリケーション開発者のためのDockerハンズオン20210519Webアプリケーション開発者のためのDockerハンズオン20210519
Webアプリケーション開発者のためのDockerハンズオン20210519
 
tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。
 
Weaveを試してみた
Weaveを試してみたWeaveを試してみた
Weaveを試してみた
 
Stm32 f4 first touch
Stm32 f4 first touchStm32 f4 first touch
Stm32 f4 first touch
 
Docker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan DriversDocker Networking with New Ipvlan and Macvlan Drivers
Docker Networking with New Ipvlan and Macvlan Drivers
 
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in GoCapturing NIC and Kernel TX and RX Timestamps for Packets in Go
Capturing NIC and Kernel TX and RX Timestamps for Packets in Go
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Dockerと外部ルータを連携させる仕組みを作ってみた
Dockerと外部ルータを連携させる仕組みを作ってみたDockerと外部ルータを連携させる仕組みを作ってみた
Dockerと外部ルータを連携させる仕組みを作ってみた
 
Dpdk pmd
Dpdk pmdDpdk pmd
Dpdk pmd
 
Physical Layer - Metal vs Fiber
Physical Layer - Metal vs FiberPhysical Layer - Metal vs Fiber
Physical Layer - Metal vs Fiber
 
장용석, fmod를이용한사운드프로그래밍, NDC2010
장용석, fmod를이용한사운드프로그래밍, NDC2010장용석, fmod를이용한사운드프로그래밍, NDC2010
장용석, fmod를이용한사운드프로그래밍, NDC2010
 
Tutorial on IEEE 802.11 - MAC Protocols and Frames
Tutorial on IEEE 802.11 - MAC Protocols and FramesTutorial on IEEE 802.11 - MAC Protocols and Frames
Tutorial on IEEE 802.11 - MAC Protocols and Frames
 
DPDK
DPDKDPDK
DPDK
 
Fluentd1.2 & Fluent Bit
Fluentd1.2 & Fluent BitFluentd1.2 & Fluent Bit
Fluentd1.2 & Fluent Bit
 
Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen Storage
Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen StoragePros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen Storage
Pros and Cons of Erasure Coding & Replication vs. RAID in Next-Gen Storage
 

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
 
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
 
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
 
It320 Hmwk 4.1
It320 Hmwk 4.1It320 Hmwk 4.1
It320 Hmwk 4.1
 
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

2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
CAULIFLOWER BREEDING 1 Parmar pptx
CAULIFLOWER BREEDING 1 Parmar pptxCAULIFLOWER BREEDING 1 Parmar pptx
CAULIFLOWER BREEDING 1 Parmar pptxSaurabhParmar42
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsEugene Lysak
 

Recently uploaded (20)

2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
CAULIFLOWER BREEDING 1 Parmar pptx
CAULIFLOWER BREEDING 1 Parmar pptxCAULIFLOWER BREEDING 1 Parmar pptx
CAULIFLOWER BREEDING 1 Parmar pptx
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George Wells
 

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