• Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

TinyOS installation Guide And Manual

  • 3,197 views
Uploaded on

Quick Guide. Cheatsheet.

Quick Guide. Cheatsheet.

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
3,197
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
128
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TinyOS Installation for Beginners in Linux (Ubuntu) By Ankit Singh FH Frankfurt am Main 23 November 2010
  • 2. Procedure for Installation and configuring TinyOS Step 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'll get some output like the above. The Codename: lucid is my distribution name. So, Just use the name which shows to you. 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. Step 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
  • 3. Then copy & paste the following lines after the first systax 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:. Step3: 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-
  • 4. 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. Step 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 programming board and system. So, to make life easy, I wrote a shell script. Following are the shell script for configuring network ankit@ubuntu:~$sudo gedit /bin/runMoteSetup.sh #!/bin/sh sudo ifconfig eth0 10.5.5.1 sudo arp -s 10.5.5.5 00204A13E829 netcat 10.5.5.5 1 netcat 10.5.5.5 9999 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 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 Hope It will be helpful for you to get started!!! Thank You!!