Hi all,

 I can successfuly receive radio packets on TelosB platform. However, all the 
nodes that I am working with do receive the packet from BaseStation mote. How 
can I check if a packet is intended to come into a specific mote?

 For example I have the follwoing code in header of my application:

enum
 {
 //Active Message Type
 AM_TYPE = 8,
 //Active Message Group
 AM_GROUP = 22
 };

 And in my app I have this code to receive packets:

 event message_t * RadioReceive.receive(message_t *msg, void *payload, uint8_t 
len)
 { 

 if(len == lenComMsg)
 { 
 MyPacket_t* inc = (MyPacket_t*) payload;

 switch(inc->Command)
 {
 case 's':
 StartSci();
 return msg; 

 default:
 //Do nothing!
 break;
 } 
 }
 }

So my question is how can I check if the incoming packet has AM GROUP set to 22 
and AM TYPE set to 8?

 This is the code from my configuration file:

 components ActiveMessageC;
 components new AMSenderC(AM_TYPE);
 components new AMReceiverC(AM_TYPE);

 App.RadioPacket -> AMSenderC;
 App.RadioSend -> AMSenderC;
 App.RadioControl -> ActiveMessageC;
 App.RadioReceive -> AMReceiverC; 

 So shoud I change the AM_TYPE each time I am going to program a mote, or I can 
just check for it in receive event in my code?

 Regards,
 Sean.
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to