Hi, I'm trying to send and receive message in Tinyos-2.x. I have been
foolowed the chapter 3 of Tutorial and I write this code:

event void Timer.fired(){
dbg("beacon", "Timer fired\n");
if(busy)
   dbg("beacon", "BUSY!!!");
if(!busy){

   beaconPayloadPtr = (BeaconMsg*) (call Packet.getPayload(&beaconPacket,
NULL));
   beaconPayloadPtr -> msgCode=BEACON_CODE;
   beaconPayloadPtr -> seed = call Random.rand16();
   if (call BSend.send(AM_BROADCAST_ADDR, &beaconPacket, sizeof(BeaconMsg))
== SUCCESS) {
      // busy = TRUE;
       dbg("beacon", "Message sent");
   }

   }}



event void BSend.sendDone(message_t *msg, error_t error){
dbg("beacon", "send done\n");
if (&beaconPacket == msg) {
   busy = FALSE;

   }


}


If I try to debug my application, I send but I don't receive any signal from
the event sendDone.I think to have well linked all the modules and
interfaces
Could you help me?
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to