Hi,

I'm implementing a simple message exchange between two motes (to measure 
the RSSI, but this is not of interest) and
send the messages as broadcasts.
I'm using the TinyOS Basestation application with the Listen-Tool to 
check which messages have been sent.
Here's the problem: I have two motes (call them A and B) with nearly 
identical code flashed to them.
A sends a message (broadcast), and after that each mote will send a new 
broadcast after receiving a packet.
All messages sent by A are also received, and thus displayed, by the 
BaseStation-mote, and the LEDs indicate that
all messages are also received by B [otherwise only one message would be 
sent anyway].
But, when B sends a message, it seems to be received by A [as A responds 
with yet another packet], but is not displayed
by the BaseStation-App. I tried to verify this by flashing a third mote 
with custom code, same issue.
If I just call the SendProbe-method [see below] on mote B it works fine 
and switching motes doesn't help either.
LEDs suggest that the SendDone-Event is triggered on both motes.
Ultimately, it seems that the broadcasts are only received by the mote 
from which the last message was received (?).
Is there any property of broadcasts that I am not aware of?
Here is the (relevant) code I use:

     void SendProbe(){
     probe = (ProbeMsg*)(call Packet.getPayload(&pkt,NULL));
     probe->source = 1;
     probe->counter = counter;
     call AMSend.send(AM_BROADCAST_ADDR, &pkt, sizeof(ProbeMsg));
     }

     event message_t * Receive.receive(message_t *msg, void *payload, 
uint8_t len){
     if(len==sizeof(ProbeMsg)){
         probe = (ProbeMsg*)payload;
         call Timer.startOneShot(DELAY_BETWEEN_PROBES);
     }
     return msg;
     }

     event void Timer.fired(){
         SendProbe();
     }


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

Reply via email to