Yes I did. I print the TOS_NODE_ID and the value is correct... :S On Fri, Dec 11, 2009 at 4:30 PM, Miklos Maroti <[email protected]>wrote:
> Hi Ricardo, > > How did you install your program on the mote? You should > > make iris install.1234 > > Where 1234 is the desired node id for the mote that is installed. > > Miklos > > On Fri, Dec 11, 2009 at 3:35 PM, Ricardo . <[email protected]> > wrote: > > > > Hello everyone, > > > > When sending a message, I want to know who sent it. I know that for this > I > > have to use the interface AMPacket.source (packet). The problem is that I > > get always the same value as if it received all messages from the same > node, > > which is not true. > > > > So I see how this field is set, and find that is filled in > > ActiveMessageLayerC the method: > > > > command error_t AMSend.send[am_id_t id](am_addr_t addr, message_t* msg, > > uint8_t len) > > { > > error_t error; > > > > error = call Config.checkPacket(msg); > > if( error != SUCCESS ) > > return error; > > > > call AMPacket.setSource(msg, call AMPacket.address()); > > call AMPacket.setGroup(msg, call AMPacket.localGroup()); > > call AMPacket.setType(msg, id); > > call AMPacket.setDestination(msg, addr); > > > > return call SubSend.send(msg, len); > > } > > > > > > So it is filled in line AMPacket.setSource call (msg, call > AMPacket.address > > ()). I was reading the documentation of the method AMPacket.address () > and > > says: "Return the node's active message address associated with this AM > > stack". > > My question is: where does this address associated with the AM stack is > > obtained? why is it always the same for different TOS_NODE_ID? (I am > using a > > RF230 radio). > > > > > > Thanks in advance, > > -- > > Ricardo > > > > > > _______________________________________________ > > Tinyos-help mailing list > > [email protected] > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
