Tutorial TinyOS BARRIER MATTHIEU Final version .pdf



Nom original: Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdfAuteur: Matt

Ce document au format PDF 1.5 a été généré par Microsoft® Office Word 2007, et a été envoyé sur fichier-pdf.fr le 10/07/2010 à 12:42, depuis l'adresse IP 70.75.x.x. La présente page de téléchargement du fichier a été vue 1704 fois.
Taille du document: 1.7 Mo (14 pages).
Confidentialité: fichier public


Aperçu du document


Tutorial : Step-by-step
installation and the use of TinyOS (v.1 and 2)
You have already tried all of the possible kinds of installation for TinyOS and none is working ?
This tutorial is made for you! It uses Jetos, a virtual machine image included TinyOS. It is based on
JeOS which is a Ubuntu server distribution. You will be able to find more information about Jetos on
its dedicated page. The problem with the latter is that you are only able to flash the motes (there is
no graphic environment). So, it's inappropriate for people who want to program with the machine or
do something else. But why not transform it into a powerful machine to your liking?
Indeed, this tutorial aims to help people who would like to install TinyOS while having a comfortable
working environment. You will tell me : "XubunTOS already exists for that !" ? The proposed Jetos
based solution is less limited : you can install every software you want, and choose your graphic
environment.
Moreover the other main advantage is that Jetos includes the iris motes platform whereas
XubunTOS doesn't allow you to flash those kind of motes by default.
The explication includes four steps :
Step 1. Installation of Jetos as a virtual machine
Step2. Expanding the allocated storage capacity of the machine created
Step 3. Install a graphic environment
Step 4. Make the environment more comfortable (optional)

Step 1. Installation of Jetos as a virtual machine :
Get the tools
First of all, we have to download the tools needed :
The Jetos image which can be found here : Jetos-2.1-try2.7z (255M)
or here : Jetos-2.1-try2.zip (363M)
The free software which allow you to install Jetos as a Virtual Machine : VMware Player.
This virtualization tools enable you to use several operating system at the same time on a computer.
At present, the last version is: v.3.0.1-227600. Download it (Windows or Linux).
The CD-ROM image of Gparted. At the moment it’s the last version is: v.0.5.2-9 Download it.

Install VMware Player and extract the Jetos folder from the archive
Run the setup downloaded to install VMware and follow the instructions.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 1

Now you have to extract the "Jetos" folder included in the archive you downloaded in the step 1
(Jetos-2.1-try2). You can use Winrar for example.

Open a new Virtual Machine
We have reached the stage where you have to add the virtual machine hosting Jetos. For this run
VMware Player and click on “Open a Virtual Machine”.

Then select the Jetos.vmx contained in the folder extracted (e.g. C:\Jetos).

The machine is now added to the top of your library.
Nota bene : You should have a window as follows. Let “I copied it” and press “OK”

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 2

Step 2. Expanding the allocated storage capacity of the machine created:
In order to be able to install a graphic environment you must expand the hard drive capacity. In fact,
there isn’t enough space by default on Jetos.

Change of the VMware settings
In order to be able to modify the settings, the Virtual machine has to be switched off. In that way,
if that’s not the case, click on VM button, "power" and "power Off".

Next, click on “Edit virtual settings”
You would see the virtual machine settings. The part which is relevant for the moment is “Hard Disk”.
Click on “Utilities” button to choose "Expand".

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 3

From then on, specify the size you want.
As you can see on the screenshot, I chose 10Gb but you are free to choose more or less.
Click on the “Expand” button to validate it.

Wait until seeing a message like this :

It tells you that you can’t make use of the new capacity yet. Before, it’s necessary to repartition and
resize the disk with a Partition Editor application. Do we have that ? Yes, remember you downloaded
it in the step 1.

By default the RAM memory allocated for Jetos is 256Mb. You can also increase it in
the virtual machine settings: when the graphic environment will be installed the
resource usage will be higher.

Running Gparted
First of all, run it by clicking “Play virtual machine”.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 4

Now, mount the Gparted image (.iso) by going to the CD settings as it’s show underneath:

Once it’s done, follow the steps indicated on the screenshot:
First make a mark the two checkbox “Connected” and “Connect at power on”.
Secondly, select “Use ISO image file” as connection
Thirdly click the “Browse” button to select the .iso file.

Look for that image downloaded in the step 1 (e.g. located in Downloads folder)

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 5

Press “OK” to confirm the settings.
Now the goal is to boot on the CD-ROM drive containing Gparted.
Thus, reboot the Virtual Machine.

You will see the big logo VMWARE on a black screen with the following part at the bottom :

This is a delicate manipulation because the screen doesn’t stay a long time : be quick!
Click inside the screen to direct input to your VM and press “ESC” key to enter the “Boot Menu”.
If you don’t succeed, restart the machine again.
You should see the following screen.
Select “2. CD-ROM drive” using the keyboard and press “Enter” key.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 6

Using Gparted
Gparted is now loaded !
Choose the first choice in the menu by pressing “Enter” key.

Continue by pressing "Enter" as soon as you get this message :

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 7

Select now the language of the interface by typing the corresponding number.
I chose “33” for English language.

Piece of advise : Remember to activate the numeric keyboard

Then, enter “0” to access to the graphic mode

It’s all right Gparted is loaded ! Let's deal with serious matters now. To expand the primary partition
we need to delete the extended partition.
Beginning with deleting the “linux-swap” partition by right clicking on it and selecting “Delete”.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 8

Do the same thing for the extended partition.

Now that you are able to expand the main partition select “Resize/move”.

You need to leave enough space to recreate the swap partition (149MiB).
That is why I chose 10088 (Maximum size – future free space i.e. 10237 – 149).

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 9

Let’s recreate the swap-linux partition.

For your information, swapping is a mechanism which gives memory to the current
application (process) that needs it immediately.
First of all create a new partition by right clicking on the unallocated part and selecting "New".

Create it as an “Extended partition”. Press “Add” button to confirm.

Repeat the operation choosing a “linux-swap” partition now.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 10

Activate the swapping. In that way, right click on the last partition created and select “Swapon”

Apply all the operations pending thanks to the relevant button :
Restart the virtual machine after it’s done.

Step 3. Install a graphic environment :

Get back the Internet :
Log in using “root” for the login and the pass.

Because Jetos is an image built on another computer you won’t probably be able to access the
Internet. To fix it edit the “70-persistent-net.rules” file by using “vim” a text editor.

Delete all the lines included in the red frame using the “del” key.

Register the modifications :
Press "ESC" key. Then type “:wq” to write the file and exit

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 11

Restart the virtual machine using the following command : shutdown –r 0

When it’s done, still log in as root.

Download and install the packets :

You can check first your packet sources. I advise you to change them if you don’t live
in the United States (the country by default) in order to increase your bitrate.
In that case edit the "sources.list" file contained in the /etc/apt/ folder :
vim /etc/apt/sources.list

Replace "us.archive" by e.g "ca.archive" all over the document thanks to typing
:%s/us.archive /ca.archive /

Register the modifications as indicated during the previous instructions (:wq)
Update the package index : apt-get update

Wait for the end.

To use a graphical user interface you have to install the corresponding packet.

I chose to install GNOME with gdm. But, once again, you are free to choose another
like KDE, Xfce and so on. Here is the command I used to have a complete installation of
all the tools needed.
Thus, I used the following command : apt-get install ubuntu-desktop
Be patient : this operation should take a long time. It depends on your connection.

Run the graphic environment
The goal is now close : run the graphic environmment with “startx” command.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 12

Step 4. Make the environment more comfortable (optional):
Add your rights !
To be allowed to edite files or doing something else requiring a “superuser” access while using
"tinyos-2.1" account, I advise you to edit the “sudoers” file located in /etc/ .

You can do exactly the same thing with “tinyos” account to work with tinyos 1

Run a terminal.

Add a new line "tinyos-2.1 ALL=(ALL) ALL" in the file thanks to the command :
sudo echo "tinyos-2.1 ALL=(ALL) ALL" >> /etc/sudoers

Activate the scroll wheel of your mouse
If you want to make the scroll wheel working, you need to edit the xorg.conf file located in
/etc/X11. Profit from your new rights to modificate it with gedit : gedit /etc/X11/xorg.conf

Add the lines, contained in the red frame on the screenshot, in the “InputDevice” section. I mean :
Option
Option

“Buttons” “3”
“ZAxisMapping” “4 5”

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 13

Save the file and restart the virtual machine.
Log in with the “tinyos-2.1” (the password is the same as the login) in order to use tinyos 2. It’s
also possible to work with tinyos 1 logging in with “tinyos” account.

If you want to program, I advise you to install a code editor like Geany.

Now, enjoy your new confortable environment.

Matthieu BARRIER - Internship University of Calgary - Department of Electrical and Computer Engineering – 2010

Page | 14


Aperçu du document Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdf - page 1/14
 
Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdf - page 3/14
Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdf - page 4/14
Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdf - page 5/14
Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdf - page 6/14
 




Télécharger le fichier (PDF)


Tutorial TinyOS - BARRIER MATTHIEU - Final version.pdf (PDF, 1.7 Mo)

Télécharger
Formats alternatifs: ZIP



Documents similaires


9bk5ssf
annonce stages mesrs dii 1
getbinarylinkurl
cv walid saad
bakhti2016
internship repport national university of singapore