Hello everyone!

I am new to this list and only about two weeks old as tiny os user.

I've been trying to implement a self-organizing application where every
node chooses a number from 1 on. I want to achieve distributed
behaviour, so no central node. In theory it is a very easy algorithm,
which relies on ordering introduced by CSMA.
In practice thinks are different and the algorithm doesn't work. Even
worse, it works in TOSSIM perfectly. I therefore have some questions
about "best-practices" in TinyOS programming.

First, what do I do if I send packets from different functions in the
component: do I use a global message buffer, as in the tutorial, or do I
create a buffer in each function that sends? The fact is that the
behaviour in the two cases is different.

Second: in CSMA only one node will send while others listen because of
the initial back-off. But then, as soon as the medium is free or the
back-off expires they will send. My question is, is there a way to tell
what happens first? Do they first receive the packet blocking the medium
or they first send. Because from what I have seen in my application,
they first receive the sendDone event then the receive event. Is there a
way to control this?

I'm pretty confused. I am working with the tmotes. When nodes settle on
a number they display it on the leds. I use the BaseStation application
to sniff the packets. I include a counter in the packets to see what is
going on. There seem to be packets lost. Also, in some occasions one of
the motes has the number set but doesn't display it on the leds,
although they are both in an atomic block.

What could be the problem? 

Best regards,
Victor Cionca

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to