[Tinyos-help] Broadcasting in Tossim

Philip Levis pal at cs.stanford.edu
Fri Feb 9 20:28:04 PST 2007


On Feb 9, 2007, at 4:35 PM, ricardo tiago wrote:

> Hi, Here is a situation that is happening when 2 motes broadcast a
> packet in tossim.  I've seen this two cases happening in the same
> simulation. I haven't figured out why this is happening , i checked
> and rechecked my code. Could this some issue in tossim or in my code
> or something else? Any suggestions?
>
> 1ª Case: Mote 5 and 1 send a broadcast msg , and their neighbors
> receive the correct message. Everything is fine in this one.
>
> DEBUG (5): Sending Forward Broadcast Msg  @ 0:0:5.988671899
> DEBUG (5): Starting CSMA with 41045903.
> DEBUG (1): Timer fired!
> DEBUG (1): Sending Forward Broadcast Msg  @ 0:0:5.993632836
> DEBUG (1): Starting CSMA with 17700092.
> DEBUG (5): PACKET: Broadcasting packet to everyone.
> DEBUG (5): PACKET: Send done at 59961181449.
> DEBUG (13): PACKET: Signaling receive at 59956298665.
> DEBUG (13): Receive Broadcast msg from 5 @ 0:0:5.995629866
> DEBUG (1): PACKET: Signaling receive at 59956298665.
> /* Neighbors receive the packet...ok*/
> DEBUG (5): PACKET: Signaling send done at 59961181449.
> DEBUG (1): PACKET: Broadcasting packet to everyone.
> DEBUG (1): PACKET: Send done at 60006518388.
> DEBUG (0): PACKET: Signaling receive at 60001635604.
> DEBUG (0): Receive Broadcast msg from 1 @ 0:0:6.000163560
> /* Neighbors receive the packet...ok*/
> DEBUG (1): PACKET: Signaling send done at 60006518388.
>
> 2ª Case: Mote 13 and 5 send a broadcast msg. Mote 5 sends the
> message first and  his neighbors receive the correct msg, then mote
> 13 broadcasts his msg but his neighbors receive the mote 5 msg.  The
> neighbors of 5 aren't the same of mote 13.
>
> DEBUG (13): Sending Forward Broadcast Msg  @ 0:0:3.389882836
> DEBUG (13): Starting CSMA with 34332075.
> DEBUG (5): Sending Forward Broadcast Msg  @ 0:0:3.390039086
> DEBUG (5): Starting CSMA with 25787203.
> DEBUG (5): PACKET: Broadcasting packet to everyone.
> DEBUG (5): PACKET: Send done at 33959289450.
> DEBUG (14): PACKET: Signaling receive at 33954406666.
> DEBUG (14): Receive Broadcast msg from 5 @ 0:0:3.395440666
> DEBUG (13): PACKET: Signaling receive at 33954406666.
> DEBUG (13): Receive Broadcast msg from 5 @ 0:0:3.395440666
> /* Neighbors receive the packet...ok */
> DEBUG (5): PACKET: Signaling send done at 33959289450.
> DEBUG (13): PACKET: Broadcasting packet to everyone.
> DEBUG (13): PACKET: Send done at 33986260719.
> DEBUG (12): Receive Broadcast msg from 5 @ 0:0:3.398137793
> DEBUG (14): PACKET: Signaling receive at 33981377935.
> DEBUG (14): Receive Broadcast msg from 5 @ 0:0:3.398137793
> DEBUG (4): PACKET: Signaling receive at 33981377935.
> DEBUG (4): Receive Broadcast msg from 5 @ 0:0:3.398137793
> / * The same thing happens to the others neighbors of 13. They  
> receive the message that 5 was sending and not the message from 13,  
> even when 5 has signaled sendDone */
> DEBUG (13): PACKET: Signaling send done at 33986260719.
>
> Any help would be really appreciated,
> Ricardo


Please check back through the archives; this problem appears every  
six months or so. You are trying to transmit using a buffer you have  
given to the radio stack to receive with. So the packet received from  
node 5 is transmitted instead of the one that node 13 generated.

Phil


More information about the Tinyos-help mailing list