[Avrora] Re: More questions Re: low power listening in Avrora

Benjamin Titzer titzer at CS.UCLA.EDU
Wed Aug 24 09:53:51 PDT 2005


Hi Yuan,

I think your example program does not appear to have any collisions
because both nodes are transmitting exactly the same data at exactly the
same time. Since collisions are handled by OR'ing the bits in the same
"time slot", OR'ing the same value with itself produces the same value.

Try offsetting the nodes in time with -random-start or -stagger-start and
changing your program to transmit values other than 0.

On Wed, 24 Aug 2005, Yuan Li wrote:

> Hi, Ben,
>
> Thank you very much for your quick helps on my pevious questions. So far I
> have been very impressed by Avrora!
>
> I have several other questions regarding Avrora here :).
>
> 1. From messgaes on maillist, I think Avrora can support packet
> collisions, but when I run a small test program, in which two sender send
> at the same time without doing any carrier sense, it seems that the
> receiver can recieve the packets all the time. The red Led toggles each
> time the nodes sends a packet and the green Led toggles when receiving any
> packet.
>
>    0  0:00:01.251373  Packet sent:
> 33:CC:64:10:00:2F:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:1F:0C:
>    1  0:00:01.251373  Packet sent:
> 33:CC:64:10:00:2F:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:1F:0C:
>    1  0:00:01.251459  Red: on
>    0  0:00:01.251459  Red: on
>    2  0:00:01.251849  Green: on
>    0  0:00:01.306790  Packet sent:
> 33:CC:64:11:00:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:81:76:
>    1  0:00:01.306790  Packet sent:
> 33:CC:64:11:00:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:81:76:
>    1  0:00:01.306876  Red: off
>    0  0:00:01.306876  Red: off
>    2  0:00:01.307265  Green: off
>
> It seems that collision is not detected here?
>
> 2. I tried to verify the transmission range by changing nodes' locations.
> And it seems that range is 31 meter. I am wondering if the value is set by
> the following fomular :
>  rxPower = txPower * lightConst * (1 / (freq * freq * distance
> * distance));
>

I think the relevant code is in avrora.sim.radio.FreespaceAir in lines
159-187, where for each byte transmitted, it determines which other nodes
are within range.

> And are the radio freq and txPower both set by user's TINYOS codes?
>

Yes, these are both settings on the radio that must be programmed by the
TinyOS software radio stack initialization.

> 3. Another question I have is about the main difference between Avrora and
> Tossim. I am sorry that I am not that familar with compiler stuffs. I am
> wondering that what makes Avrora different from Tossim? Why in Tossim one
> need to implement the whole CC1000 radio stack under pc platform? While in
> Avrora, things are much easier?
>

TOSSIM simulates a sensor network program by taking the original nesC (or
C) code and compiling it directly to x86 machine code as a Linux binary.
It replaces the hardware drivers and radio stack with simulation code and
compiles it into this binary (along with a main event loop). You then run
the binary natively on your workstation to see the results.

Avrora works by taking the AVR binary that you would load onto the device
and simulates the CPU core (interpreting AVR machine instructions) as well
as the attached devices. The software runs just as it would on the sensor
device but inside of a simulation that you can observe the results.

Hope this helps,

-B

(replying to mailing list for general interest and archival purposes)


More information about the Avrora mailing list