Running TinyOS programs using Avrora

Avrora
The readers may be wondering, the post for installation of TinyOS does not have TOSSIM installation steps. It's because I have found Avrora emulator more easier than TOSSIM scripts. Avrora is emulator/simulator for wireless sensor networks, written in Java by UCLA group. It takes an object dump of tinyos programs over AVR platforms ( mica2/micaz) and is capable of single node emulation for verification of the program as well as multiple node simulation. The gui provided with Avrora is not functional when this document is written.

Here I assume that username is "test", tinyos 2.10 and java run time environent are installed. The code used for illustration along with one more application is given for download at end of tutorial

Download the Avrora [Beta 1.7.105] from the site.

Setting up the environment
  1. Copy the avrora jar file in a directory say "home/test/avrora/avrora.jar"
  2. Download the converter.sh
  3. Extract the tar file and get the converter.sh
  4. Assuming that path for converter.sh is "home/test/avrora/converter.sh" copy the following code to ".bashrc"

  5. alias avrora='java -jar /home/test/avrora/avrora.jar'
    alias convert-avrora='sh /home/test/avrora/converter.sh'
  6. Close all the shells opened
  7. Take a new shell and type avrora /convert-avrora, it should produce the following output



Writing our first program: Blink
Please note that this is not blink program described in TinyOS wiki. This is much more simpler version of it.
This consist of following steps
  1. Interfaces : Boot, Leds
  2. Implementation file BlinkC
  3. Define Wiring
  4. BlinkC -> MainC.Boot
  5. BlinkC.Leds -> LedsC ( 3-5 steps is in BlinkAppC )
  6. Write the implementation file BlinkC.nc
  7. Write the Makefile
  8. Compiling
  9. Running the application using Avrora
Save all the following codes in "blink" folder ( say /home/test/tinyospgs/blink)

#include "Timer.h" module BlinkC { uses interface Leds; uses interface Boot; } implementation { event void Boot.booted() { call Leds.set(1) ; call Leds.set(2); call Leds.set(3); call Leds.set(4); call Leds.set(5); call Leds.set(6); call Leds.set(7); } }
Save the above code as "BlinkC.nc"
configuration BlinkAppC
{
}
implementation
{
components MainC, BlinkC, LedsC;
BlinkC -> MainC.Boot;
BlinkC.Leds -> LedsC;
}
Save above code as BlinkAppC.nc
COMPONENT=BlinkAppC
include $(MAKERULES)

Save above as Makefile

Now take a shell, navigate to this folder
Type "make mica2 "
If everything is correct, it will create build/mica2 folder
Navigate to mica2 folder in shell (cd build/mica2)
Type "convert-avrora main.exe blink.od"


Run the simulation by "avrora -seconds=5.0 -platform=mica2 blink.od"
Output will be similar to the following


Congratulations!!!!!!!
You are successfully emulated the first program
Note that only AVR platforms such as Mica2/Micaz is supported by Avrora

Links you might be interested in
Code Download this code and blink with timer here

Radio communication simulation simulation using Avrora

TinyOS programming using C an eazier way : tosthreads simulation using Avrora

65 comments:

Anonymous said...

Can you post another link to converter.sh? The link you provided is dead.

Gireesh said...

I have hosted it in my old geocities
Now I have moved it to google pages
Can you please verify it and let me know if it's still not working

Anonymous said...

It seems the download link for converter.sh is still pointing to the geocities page.

Gireesh said...

Can you refresh the page using reload/ remove cache and check!!!
anyway the code link is
"http://sites.google.com/site/sahyagiri/tinyos/converter.sh.tar.gz?attredirects=0"


"http://sites.google.com/site/sahyagiri/tinyos/nesccode.tar.gz?attredirects=0"

Anonymous said...

Works great! Thanks.

Mohsen said...

Wonderful! thanks mate, I like that! hope you best!

Samir said...

Thank you very much Gireesh. You have been a great help. I hope you have success and prosperity in your life.

chairi said...

hello it's me again sorry about many questions .

i try to use avrora but when i run this command i get the following .

chairi@chairi-desktop:~$ avrora /convert-avrora

Avrora [Beta 1.7.105] - (c) 2003-2007 UCLA Compilers Group

File not found: /convert-avrora
chairi@chairi-desktop:~$

chairi said...

ok i have solved the problem many thanks about the tutorials .


it is perfect

Anonymous said...

@chairi could you please let me know, how you where able to solve the issue. Since I am not able to.

Thanks for the concern.

Gireesh said...

you need to download it first
save it in home folder
give path to .bashrc
close terminals
open new terminal and type convert-avrora, it will work

Anonymous said...

@Gireesh Thanks for the interest. By the ways I'd figure out the problem, but was a bit late on my part to update. Sorry about that.

By the ways, I was trying to play around with the apps that come with the Crowbow kit.

I was trying to compile the blink code using avrora, but get the following error:

thegame@thegame-laptop:~/test/avrora/tinyspgs/apps/Blink$ make mica2
mkdir -p build/mica2
compiling Blink to a mica2 binary
ncc -o build/mica2/main.exe -Os -finline-limit=100000 -Wall -Wshadow -Wnesc-all -target=mica2 -fnesc-cfile=build/mica2/app.c -board=micasb -DIDENT_APPNAME=\"Blink\" -DIDENT_USERNAME=\"thegame\" -DIDENT_HOSTNAME=\"thegame-laptop\" -DIDENT_USERHASH=0x349129d3L -DIDENT_TIMESTAMP=0x4995695aL -DIDENT_UIDHASH=0xdfbb2ff9L -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/mica2/wiring-check.xml Blink.nc -lm
In file included from Blink.nc:43:
In component `BlinkM':
BlinkM.nc:44: too few arguments to interface `Timer'
In file included from Blink.nc:43:
BlinkM.nc:55: syntax error before `StdControl'
BlinkM: `StdControl.start' not implemented
BlinkM: `StdControl.stop' not implemented
BlinkM: `Timer.fired' not implemented
In file included from Blink.nc:43:
In component `SingleTimer':
SingleTimer.nc:47: too few arguments to interface `Timer'
SingleTimer.nc:52: component TimerC not found
SingleTimer.nc:54: cannot find `Timer'
SingleTimer.nc:55: no match
In component `Blink':
Blink.nc:44: cannot find `StdControl'
Blink.nc:45: cannot find `StdControl'
make: *** [exe0] Error 1

BlinkM.nc Code:

#include "Timer.h"

module BlinkM {
provides {
interface StdControl;
}
uses {
interface Timer;
interface Leds;
}
}
implementation {

/**
* Initialize the component.
*
* @return Always returns SUCCESS
**/
command result_t StdControl.init() {
call Leds.init();
return SUCCESS;
}


/**
* Start things up. This just sets the rate for the clock component.
*
* @return Always returns SUCCESS
**/
command result_t StdControl.start() {
// Start a repeating timer that fires every 1000ms
return call Timer.start(TIMER_REPEAT, 1000);
}

/**
* Halt execution of the application.
* This just disables the clock component.
*
* @return Always returns SUCCESS
**/
command result_t StdControl.stop() {
return call Timer.stop();
}


/**
* Toggle the red LED in response to the Timer.fired event.
*
* @return Always returns SUCCESS
**/
event result_t Timer.fired()
{
call Leds.redToggle();
return SUCCESS;
}
}

Blink.nc Code:

configuration Blink {
}
implementation {
components MainC, BlinkM, SingleTimer, LedsC;
MainC.StdControl -> SingleTimer.StdControl;
MainC.StdControl -> BlinkM.StdControl;
BlinkM.Timer -> SingleTimer.Timer;
BlinkM.Leds -> LedsC;
}

SingleTimer.nc Code:

configuration SingleTimer {
provides interface Timer;
provides interface StdControl;
}

implementation {
components TimerC;

Timer = TimerC.Timer[unique("Timer")];
StdControl = TimerC;
}

Could you please let me know what could be the issue??

Thanks for your time and concern

Gireesh said...

my posts are based on tinyos 2.1.0
The os taht ships with xbow is tinyos1.1
That may be the reason.

Anonymous said...

hello first thanks anout the tutorial.

and now a question . i am a post graduate student and i am doing my project in WSN .Is there any example which run with micaz and avrora and gives data from micaz (vibrationor or acoustic data ) ?

thank again

Gireesh said...

@anonims
all the best for ur MS
and answer to the question

When you are using emulation, acoustic or any other sensor data is simply a random value. Following is taken from UCLA avrora web site
======================================
"-sensor-data: list = (null)
This option accepts a list describing the input data for each sensor node. The format for each entry in this list is
$sensor:$id:$data, where $sensor is the name of the sensor device such as "light", $id is the integer ID of the node, and $data is the name of a file or the special '.' character, indicating random data. A sensor data input file consists of an initial sensor reading which is interpreted as a 10-bit ADC result, then a list of time value pairs parated by whitespace; the sensor will continue returning the current value until the next (relative) time in seconds, and then the sensor will change to the new value. "
======================================

Kuldeep Yadav said...

hi I am messing up with my tinyos installation from last 20 days and as a result I have tinyos-2.0.2 into ubuntu linux and tinyos-1.X in Windows.In windows TinyViz is not properly running.Can avrora do the job.I dont have real sensors to work on,so all I have to do with simulation.Can we install avrora in Windows.Please help me out

Gireesh said...

@kuldeep

Please see my post
http://mythicalcomputer.blogspot.com/2008/08/installation-of-tinyos-in-ubuntu.html

You can not work in avrora unless there is a working tinyos installation
Avrora is a hardware emulator to run the tinyos programs
Please see avrora ucla web site

Anonymous said...

I have jus started working in tiny os. I am unable to develop new application after reading some tutorials.They did not give me clear idea. Can you please suggest some tutorials.

Gireesh said...

Tutorials for tinyos are good in one way or other.
But you need patience to understand the concept. The initial learning curve is bit high.
My blog posts are from my own experience.
You can either visit docs.tinyos.net or my posts in this blog.
All the best

Kuldeep Yadav said...

hi,to run simulation using Avrora,we need avr-objdump utility.From where we can find this program or it is already installed.Please let me know.

Gireesh said...

@kuldeep
it comes with avr-gcc
I have provided a shell script convert-avrora.sh for automating it.

Anonymous said...

Hello,

I am new to Avrora. I initially installed TinyOS (with Cygwin in a Windows XP environment) and the simulation worked fine. I now installed Moteworks and wanted to experiment some XMesh simulations but I get an errors saying "Exception in thread "main" and it throws a bunch of syntax and objdump errors in Avrora. Could you please let me know what could be the problem? Also how do I run the simulation more multiple motes say 100 or 1000? Your help would be highly appreciated.

Thanks,
Sunviv

Anonymous said...

hello, i'm student in ubuntu and avrora, when i type : avrora /convert-avrora in shell, i have the following error : File not found: /convert-avrora. what the problem, thnkx.

Anonymous said...

hello, i'm student and i'm new in ubuntu/avrora, when i type : avrora /convert-avrora, i have the following error : File not found: /convert-avrora, what's th problem, thnkx.

Gireesh said...

@ Sunviv
check out my posts for radio for multiple motes.
exception, i need more info

@anonims student
problem is with ur lack of patience to read and follow :)

Anonymous said...

@ Gireesh
thank u, i think that it's the right reason. thanks agian.

Jospeh said...

I am having the same problem everyone else had and I really "think" I'm reading it and following.

israfel@antiquityRoam:~$ avrora /convertavrora
Avrora [Beta 1.7.106] - (c) 2003-2007 UCLA Compilers Group

File not found: /convertavrora
israfel@antiquityRoam:~$ gedit ~/.bashrc


this is my .bashrc entry:

#add Avrora
alias avrora='java -jar /home/israfel/workspace/avrora/avrora.jar'
alias convertavrora='sh /home/israfel/workspace/avrora/converter.sh'

I am sure the paths are correct. I have closed all terminals many times, restarted, ect. What else could be wrong?

Jospeh said...

Okay, "look at what is typed in the terminal output demos joe."

That's rich :) Thanks

Fazlullah Khan said...

Hi All!
I tried to use Avrora with Tinyos 2.x, i put averora.jar and converter.sh in my /home/vr/avrora directory, modified the .bshrc file accordingly and tried to execute the command
averora | averora-converter (Aliases) and got the Error
Line 1. Unable to access jar files /home/vr/averora/avrora.jar
Line 2. Usage :convert-averora filename1.exe filename2.od
Reagrds Fazlullah Khan

Fazlullah said...
This comment has been removed by the author.
Gireesh said...

it looks for .od extension

Fazlullah said...

Hey!
I got the following ERROR and also runnig time is too long i.e. in minutes with my 4GHz Processor and 1 GB RAM
[root@localhost micaz]# avrora -simulation=sensor-network -second=2.0 -nodecount=2 blink.od
Avrora [Beta 1.7.91] - (c) 2003-2007 UCLA Compilers Group

This simulator and analysis tool is provided with absolutely no warranty,
either expressed or implied. It is provided to you with the hope that it be
useful for evaluation of and experimentation with microcontroller and sensor
network programs. For more information about the license that this software is
provided to you under, specify the "license" option.

Loading blink.od...[OK: 3.374 seconds]
=={ Simulation events }=======================================================
Node Time Event
------------------------------------------------------------------------------
Exception in thread "Thread-1" {I am adding this, if the number of nodes, -nodecount=1 then Thread-1 and if -nodecount=2 Thread-2, and if -nodecount=3 then Thread-3 and so on }
java.lang.NullPointerException
at avrora.sim.mcu.AtmelInternalDevice.write16(AtmelInternalDevice.java:87)
at avrora.sim.mcu.Timer16Bit$Ticker.fire(Timer16Bit.java:634)
at avrora.sim.clock.DeltaQueue$Link.fire(DeltaQueue.java:124)
at avrora.sim.clock.DeltaQueue.advanceSlow(DeltaQueue.java:298)
at avrora.sim.clock.DeltaQueue.advance(DeltaQueue.java:251)
at avrora.sim.clock.MainClock.advance(MainClock.java:100)
at avrora.sim.AtmelInterpreter.commit(AtmelInterpreter.java:1122)
at avrora.arch.legacy.LegacyInterpreter.fastLoop(LegacyInterpreter.java:290)
at avrora.arch.legacy.LegacyInterpreter.runLoop(LegacyInterpreter.java:146)
at avrora.sim.AtmelInterpreter.start(AtmelInterpreter.java:479)
at avrora.sim.Simulator.start(Simulator.java:606)
at avrora.sim.SimulatorThread.run(SimulatorThread.java:98)
Exception in thread "Thread-2" java.lang.NullPointerException
at avrora.sim.mcu.AtmelInternalDevice.write16(AtmelInternalDevice.java:87)
at avrora.sim.mcu.Timer16Bit$Ticker.fire(Timer16Bit.java:634)
at avrora.sim.clock.DeltaQueue$Link.fire(DeltaQueue.java:124)
at avrora.sim.clock.DeltaQueue.advanceSlow(DeltaQueue.java:298)
at avrora.sim.clock.DeltaQueue.advance(DeltaQueue.java:251)
at avrora.sim.clock.MainClock.advance(MainClock.java:100)
at avrora.sim.AtmelInterpreter.commit(AtmelInterpreter.java:1122)
at avrora.arch.legacy.LegacyInterpreter.fastLoop(LegacyInterpreter.java:290)
at avrora.arch.legacy.LegacyInterpreter.runLoop(LegacyInterpreter.java:146)
at avrora.sim.AtmelInterpreter.start(AtmelInterpreter.java:479)
at avrora.sim.Simulator.start(Simulator.java:606)
at avrora.sim.SimulatorThread.run(SimulatorThread.java:98)
==============================================================================
Simulated time: 1783 cycles
Time for simulation: 0.373 seconds
Total throughput: 0.009557641 mhz
Throughput per node: 0.0047788206 mhz
[root@localhost micaz]#

Prathyusha Reddy said...
This comment has been removed by the author.
Gireesh said...

@prathyusha

>Question is not an answer to the question...
"understand that gedit is just an editor like notepad........." I thought it answered the question.

>I am trying to install it in windows thats what is my doubt....

"you are using cygwin" which I do not support coz I never worked in that..

>instead of answering my question if you are disappointing people how atre they gonna participate in further discussion..

Really?
I thought teaching how to fish is better than giving a fish...

>anyways thanks for your help

If you don't feel that you got help, better say "thanks for reply"

Totally that was an interesting feed which I never got in last 1.5 years. I would appreciate if you come back and say "hei man, this is my blog on windows, to help the community". Till now I have not seen anyone saying that to me

n said...

Hi Girish.....
I have a code for data transfer between two motes....Can U tell me wt is d difference in the codes for data transfer of a audio file like a small Vlc file

Gireesh said...

@n
i did not understand your question!!!
if it s a p2p (comp-comp) data transfer using 2 motes, pls c my recent post on the same topic!!!

marianna said...

i try to use avrora in cygwin but when i run this command i get the following .


Marianna@Marianna-PC ~
$ convert-avrora
bash: convert-avrora: command not found

Marianna@Marianna-PC ~
$

marianna said...

I have solved the problem =D

Anonymous said...

Thanks for the information! Do you know if there is a possibility to use Avrora for simulating a network of shimmer platforms?

Anonymous said...

sir,
its not working for me, i ran avrora /convertavrora. it give unable to access jar file

Manjula said...

Hello any one this is manjula, i'm trying out blink application but i get the following error, when i use make pc command or make mica2


manjula@manjula-desktop:~/opt/tinyos-1.x/apps/blink$ make pc
/opt/tinyos-2.1.1/support/make/Makerules:170: ***

Usage: make
make help

Valid targets: all clean epic eyesIFX eyesIFXv1 eyesIFXv2 intelmote2 iris mica2 mica2dot micaz mulle null shimmer shimmer2 telos telosa telosb tinynode tmote
Valid extras: appdoc blip cthreads docs dynthreads ident_flags nowiring safe savepp sim sim-fast sim-sf stack-check tframe threads tos_buildinfo tos_image tosboot tunit verbose wiring

Welcome to the TinyOS make system!

You must specify one of the valid targets and possibly some combination of
the extra options. Many targets have custom extras and extended help, so be
sure to try "make help" to learn of all the available features.

Global extras:

docs : compile additional nescdoc documentation
tinysec : compile with TinySec secure communication

ERROR, "pc ident_flags tos_image tosboot" does not specify a valid target. Stop.
manjula@manjula-desktop:~/opt/tinyos-1.x/apps/blink$

Gireesh said...

@manjula
make pc is for TOSSIM. Install tossim properly before doing this
Also, u r still in tinyos 1.x :(

Manjula said...

Hello Mr Gireesh, this is Manjula
Can you please eleborate step no 4 to add the aliase lines into .bashrc, please give me the complete command format, as i'm very new to linux i'm not good at using commands. so pls give the entire procudere to add the aliases into the basrch

waiting for the response

with regards
Manjula

Gireesh said...

@manjula
You may open gedit / any favourite editor in linux
eg: open linux terminal and type

gedit ~/.bashrc

Append the lines in step 4

All the best :-)

Manjula said...

Thank you
with regards
Manjula

Manjula said...

Hello Mr. Gireesh

I downloaded avrora -beta-1.7.106, it was a zip file i extracted it and found it consist of 3 folders avrora, cck and META-INF, then where do i find avrora.jar file?


because i get the following error

Unable to access jarfile /home/manjula/avrora/avrora.jar
pls correct my mistake?

Gireesh said...

@manjula

if in attendance register ur name is manju, either u shld correct register or u shld change ur name
ts up2 u :P

Manjula said...

Mr.Gireesh i'm not getting you. please elobrate.

Unable to access jarfile /home/manjula/avrora/avrora.jar


give me the solution to the above problem.

where should i store the downloaded file, where should i unzip the files ? pls let me know, previous answer is very vage,..

with regards
manjula

Gireesh said...

@manjula

I thought "unable to access" is plain english telling that that file does not exist in the "path" you set.
And my blog post has clearly mention where to copy. REad first 3 paragraphs as many times, till you understand your mistake than gettin frustrated

Manjula said...

Hello Me Gireesh!

finally got it, actually the jar file name was avrara-beta 1.7.105 , then i changd it to avrora.jar and was done.

but ur code to blink application has errors , like
no Leds presernt, so i compiled with BLInk apps that comes with tinyos2.1.1 and i'm done with it , thanks a lottt , not lot , thanks a ton................



and sill you pls suggest for avrora tutorials so that i can practice more programs and do little bit of my own

Manjula said...

Can you please give me tne solutin to the problem given below:

i use the command " make micaz sim", then i get the error. Note : its only a patch not complete, because of shortage of word limit, i have not included all of it.




manjula@manjula-desktop:~/Blink$ make micaz sim
mkdir -p simbuild/micaz
placing object files in simbuild/micaz
writing XML schema to app.xml
compiling BlinkAppC to object file sim.o
ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim -fnesc- this function)
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc: In function ‘HplAtm128Timer0AsyncP$last_zero’:
/opt/tinyos-2.1.1/tos/chips/atm128/timer/sim/HplAtm128Timer0AsyncP.nc:101: error: ‘tos_state’ undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc: In function ‘VirtualizeTimerC$0$fireTimers’:
/opt/tinyos-2.1.1/tos/lib/timer/VirtualizeTimerC.nc:68: error: ‘tos_state’ undeclared (first use in this function)

/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc: In function ‘sim_mote_enqueue_boot_event’:
/opt/tinyos-2.1.1/tos/lib/tossim/SimMoteP.nc:162: error: ‘tos_state’ undeclared (first use in this function)
make: *** [sim-exe] Error 1
manjula@manjula-desktop:~/Blink$

suman said...

i got this error
root@shiv-OptiPlex-780:~# avrora /convert-avrora
Avrora [Beta 1.7.105] - (c) 2003-2007 UCLA Compilers Group

File not found: /convert-avrora


i set this path in bashrc:
alias avrora='java -jar /test/avrora/avrora.jar'
alias convert-avrora='sh /test/avrora/converter.sh'

river said...

I could successfully convert TinyOS program into .od file. But when I execute it with avrora it gives error - ".... illegal write to sram...."

Gireesh said...

@river
avrora is just a hex file reader and atmel emulator.

Tinyos application when compiled using avr-gcc, it gives an output compatible with this emulator.
So if you are getting an error, that MAY be due to memory corruption in your program

river said...

Thanks Girish...how can I sort this out?

Gireesh said...

I dont know!!!
depends on your program
check for pointer arithmetic

river said...

Microtower-PC:/opt/tinyos-2.1.1/apps
Hello Gireesh,

The memory error is resolved, when I re-installed avrora. I executed the simple Blink program, it gives the following output:


/Blink/build/iris$ avrora blink.od
Avrora [Beta 1.7.115] - (c) 2003-2007 UCLA Compilers Group

Loading blink.od...OK
=={ Simulation events }=======================================================
Node Time Event
------------------------------------------------------------------------------

Not displaying anything after this. Though the program when run with actual sensor node does blink the LEDs on node...

My program is:

configuration BlinkAppC
{
}
implementation
{
components MainC, BlinkC, LedsC;
components new TimerMilliC() as Timer0;
components new TimerMilliC() as Timer1;
components new TimerMilliC() as Timer2;


BlinkC -> MainC.Boot;

BlinkC.Timer0 -> Timer0;
BlinkC.Timer1 -> Timer1;
BlinkC.Timer2 -> Timer2;
BlinkC.Leds -> LedsC;
}

#include "Timer.h"

module BlinkC @safe()
{
uses interface Timer as Timer0;
uses interface Timer as Timer1;
uses interface Timer as Timer2;
uses interface Leds;
uses interface Boot;
}
implementation
{
event void Boot.booted()
{
call Timer0.startPeriodic( 250 );
call Timer1.startPeriodic( 500 );
call Timer2.startPeriodic( 1000 );
}

event void Timer0.fired()
{
dbg("BlinkC", "Timer 0 fired @ %s.\n", sim_time_string());
call Leds.led0Toggle();
}

event void Timer1.fired()
{
dbg("BlinkC", "Timer 1 fired @ %s \n", sim_time_string());
call Leds.led1Toggle();
}

event void Timer2.fired()
{
dbg("BlinkC", "Timer 2 fired @ %s.\n", sim_time_string());
call Leds.led2Toggle();
}
}

Gireesh said...

@river

can u check the simple program using avrora

if it is working, pl remove the dbg statements, make simpler version and c if t works
There is one more project avroraz which extends the functionality for simulating micaz by adding cc2420 radio simulation

nevertheless i should say, it is not so much useful to simulate networked nodes... the channel models and propagation modules are not so strong..

River said...

Hello Gireesh,

I tried running the same Blink program which is given by u, following exactly the same steps, still i do not get to see anything after it displays...

node time event
----------------------

river said...

Hello Gireesh,

Can you pl suggest what can be missing that I do not get the complete output?

Gireesh said...

@river

I have no clue!!!

Ideally if you convert a program using avr-gcc it gives you a program which Avrora understands.

Leds and timer are there in avrora. So it is supposed to run.

Can you try with AvroraZ instead?

river said...

Thanks Girish. Its now working.

Thanks a lot.

Anonymous said...

Hello Sir
i have installed avrora on mac os x 10.6.8. it works fine but there is one problem i am facing, it does not show the time for simulation and total throughput in the output. could you please give me the reason?

PREETI BISHT said...

i have typed
alias avrora='java -jar /home/test/avrora/avrora.jar'
alias convert-avrora='sh /home/test/avrora/converter.sh'

in my .bashrc and then you said to close all shells.
my question is how to close the shells.
i'm new to linux thats why i need a little guidance..please help..

PREETI BISHT said...

after setting path
alias avrora='java -jar /home/preeti/avrora/avrora.jar'
alias convert-avrora='sh /home/preeti/avrora/converter.sh'
got this exception
preeti@ubuntu:~$ source ~/.bashrc
Setting up for TinyOS 2.1.2
preeti@ubuntu:~$ avrora
Exception in thread "main" java.lang.UnsupportedClassVersionError: avrora/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: avrora.Main. Program will exit.

please help.