deb http://tinyos.stanford.edu/tinyos/dists/ubuntu hardy main
2) with following commands you can update the apt-cache and search the required packages thin you can install the required version and all.
apt-get update
apt-cache search tinyos
apt-get install tinyos-2.1.0
3) then install python development package (headers)
apt-get install python-dev
4) Edit /opt/tinyos-2.1.0
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar:.
4) Import /opt/tinyos-
if [ -f /opt/tinyos-
. /opt/tinyos-
fi
5) Now execut bash again or restart the terminal and chech your enviorenment with bellow command. It will check the enviorenment and report you the status. (Ignore the WORNING returned due to graphvis version)
tos-check-env
6) Lets compile the first application
cd $TOSROOT/apps/Blink
make micaz
for simulator
make micaz sim
have fun!~
I have tried to install TinyOS 2.1.0 but I got the following error:
ReplyDeleteE: /var/cache/apt/archives/avr-gcc-tinyos_4.1.2-20080806_i386.deb:
trying to overwrite `/usr/lib/libiberty.a', which is also in package
binutils-dev
any help
In my case I have not installed binutils-dev. If you want to keep binutils-dev, rename /usr/lib/libiberty.a (or if you don't need binutils-dev at the moment remove it) and install avr-gcc-tinyos again
ReplyDeletegetting a warning...
ReplyDeleteWARNING: The JAVA version found first by tos-check-env may not be version 1.4 or version 1.5one of which is required by TOS. Please ensure that the located Java version is 1.4 or 1.5
I have java 1.6...is Tiny OS compatible with it??
Though I'm using 1.5 it is compatible with 1.6 see this link
ReplyDeletehttp://docs.tinyos.net/index.php/Installing_TinyOS_2.1
Worked fine for me! But why do I need the python-dev package?
ReplyDeleteIn tinyos-2.x TOSSIM is a library: you must write a program that configures a simulation and runs it. TOSSIM supports two programming interfaces: Python and C++. Python allows you to interact with a running simulation dynamically, like a powerful debugger. However, since the interpretator can be a performance bottleneck when obtaining results, TOSSIM also has a C++ interface. Usually, transforming code from one to the other is very simple.
ReplyDeletesee http://docs.tinyos.net/index.php/TOSSIM for more information
Hi, thank U for the post, still I encountered problems. When doing "apt-get install tinyos-2.1.0" I receive an error:
ReplyDeleteErrors:
/var/cache/apt/archives/avr-binutils-tinyos_2.17-20080806_i386.deb
/var/cache/apt/archives/avr-gcc-tinyos_4.1.2-20080806_i386.deb
/var/cache/apt/archives/avr-libc-tinyos_1.4.7-20080806_i386.deb
/var/cache/apt/archives/avrdude-tinyos_5.4-20080806_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
The repository is the same you are giving and I've tried a lot of things.
Can you help, please?
Try,
ReplyDeletesudo apt-get --purge autoremove tinyos-2.1.0
sudo apt-get install tinyos-2.1.0
Hi, thanks for this tutorial but I have some problems. The result of the 'apt-get install tinyos-2.1.0', I have this errors:
ReplyDeleteErrors were encountered while processing:
/var/cache/apt/archives/avr-gcc-tinyos_4.1.2-20080806_i386.deb
/var/cache/apt/archives/msp430-binutils-tinyos_2.17-20080806_i386.deb
/var/cache/apt/archives/msp430-gcc-tinyos_3.2.3-20080806_i386.deb
/var/cache/apt/archives/msp430-libc-tinyos_20060801cvs-20080806_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This is not the same of marina errors.
Can you help me?
Thanks
Captren
Looks like some packages are broken in given repository probably they will fixed in future.
ReplyDeleteTry to install packages manually. Follow the instruction given in this wiki:
http://docs.tinyos.net/index.php/Installing_TinyOS_2.1
Download and convert rpm packages to deb using alien
alien -d --scripts package_name.rpm
Then install all the packages at once using
dpkg -iRE *.deb
If you encounter any dependancyy problem us
apt-get -f install
to fix them
you will be fine...
This comment has been removed by the author.
ReplyDeleteHi guys!
ReplyDeleteExcellents tips, laxaman! Thanks!
I'm starting on TinyOS, when i was installing it i had a problem with 'avrdude-tinyos_5.4-20080806_i386.deb', so following your tip, i dowloaded and converted the package 'avrdude-tinyos_5.6cvs-2_i386.rpm'. I just installed this package.
I executed 'sudo apt-get -f install', to ensure that all working.
My question is:
"Will i have any problem in the future, because i just installed this package?!?"
I'm from Brasil.
Sorry my english, i know a little.
Regards
Rodrigo M. Palheta
there will not be any problem.
ReplyDeleteBut if you try to upgrade the system, prevent replacing your manually installed packages
Thanx man i have juat started working on ubuntu 8.10 intrepid (iris platform). I followed the above steps n everything came well.
ReplyDeletecheers
Hi,
ReplyDeleteI came across your blog, when i was searching for TOSSIM installation. I am new to UBUNTU and TOSSIM. I have installed Ubuntu 9, following ur steps for TOSSIM instructions, I added the deb http://... to the sources.list. But after that when i type apt-get update, the message i get is "Could not open lock file /var/lib/apt/lists/lock-open (13 Permission Denied).
I get the same error message for the third command also. How do i proceed, can u help me. I need to get working fast.
Thanks
Mohana (ssmvalli@gmail.com)
Hi Mohana,
ReplyDeleteYou have to use "sudo"
$sudo apt-get install tinyos-2.1
Hi rodrigomp
ReplyDeleteThanks a lot for ur help, i installed TOSSIm and the tos-check-env command too works, except for the warning. But the application blink is giving me error.When i typed cd $TOSROOT/apps/Blink it says no such directory found. what mistake have i done.
Please help me
Thanks
Hi,
ReplyDeleteI figured out what i should have done, my Tinyos is in /opt....
so i gave cd /opt/tinyos-2.1.0/apps/Blink
then i gave make micaz sim but i am getting this error
make:*** No rule to make target 'micaz'. Stop.
Please help me
Thanks
Check whether MAKERULES environment variable is set
ReplyDeleterun:
echo $MAKERULES
otherwise check step 4) above
Hi,
ReplyDeleteI checked with echo $MAKERULES, there is no message
I just get the $ prompt, should i re install.U had said check Step 4 and above. I am new to linux, so can u please elaborate.
Thanks
MAKERULES is an environment variable which points to a file which contains the generic make rules for many platforms. The make file which is in your project is just a dummy which includes the MAKERULES file.
ReplyDeleteWhat step 4 does is including the file which contain the envirenment setting related stuff from /opt/tinyos-2.1.0/tinyos.sh
In step 4 what you have to do is
change CLASSPATH= line as
CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java/tinyos.jar:.
NOTE: last dot (.) is also required
and
include bellow code snippet at the end of .bashrc file which is in you linux home directory (~/.bashrc)
if [ -f /opt/tinyos-2.1.0/tinyos.sh ] ; then
. /opt/tinyos-2.1.0/tinyos.sh
fi
Then when your starting a terminal(bash), environment for Tinyos development will be automatically set
hello,
ReplyDeletei have successfully installed tinyos from the repository and included the source file in my bashrc.
I tried to make a simple example like Blink and i get this kind of errors:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:26:20: error: Python.h: No such file or directory
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:296: error: ISO C++ forbids declaration of ‘PyObject’ with no type
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:296: error: expected ‘;’ before ‘*’ token
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:297: error: ‘PyObject’ has not been declared
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:302: error: ‘PyObject_HEAD’ does not name a type
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:306: error: expected initializer before ‘*’ token
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:313: error: ‘FILE’ has not been declared
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: In function ‘int swig_varlink_print(swig_varlinkobject*, int*, int)’:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:316: error: ‘fprintf’ was not declared in this scope
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:317: error: ‘struct swig_varlinkobject’ has no member named ‘vars’
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx: At global scope:
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:325: error: expected initializer before ‘*’ token
/opt/tinyos-2.1.0/tos/lib/tossim/tossim_wrap.cxx:3496: error: expected `}' at end of input
make: *** [sim-exe] Error 1
i tried others examples and keep getting errors.What is wrong?
Did you install python-dev
ReplyDeleteok i found it....yes that was the problem!
ReplyDeletenow i am trying to use tossim.
For example i try Blink and python and c++ objects are created, what do i execute next to visualize my simulation?....
thanx for the reply and the help!
Hi, I'm new at tinyos and I'm having trouble with TOSSIM. I understand that tossim is a library and it seems that I have it on the directory /opt/tinyos-2.1.0/tos/lib/tossim . But when I try the command make micaz sim on the Blink directory I get back lots of errors including some TossimActiveMessageC saying it's not implemented. I would like to know if there is something I have to download other then the archives mentioned on the steps of this tutorial or if there is something wrong with my installation.
ReplyDeleteThanks a lot for the help!