1 - go to the directory support/make/msp 2 - open the file msp.rules 3 - change the line AMADDR = ActiveMessageAddressC\$$addr to AMADDR = ActiveMessageAddressC__addr
Is all that is needed to operate as it should. Regards, -- Ricardo On Mon, Dec 14, 2009 at 12:46 PM, Arik Sapojnik <[email protected]> wrote: > Ricardo, > > I didn't actually understood the solution. > Could you please elaborate? > > Thanks, > Arik > > > > On Mon, Dec 14, 2009 at 12:04, Ricardo . <[email protected]> wrote: > >> >> Yes, it worked! >> >> I want to thank all the answers that were given in an attempt to solve my >> problem! >> >> Many thanks! =) >> >> >> >> On Mon, Dec 14, 2009 at 9:09 AM, Michiel Konstapel <[email protected] >> > wrote: >> >>> I think I can guess what may be happening. Both TOS_NODE_ID and >>> ActiveMessageAddressC.addr are set at install time by running >>> tos-set-symbols on the binary. If you change the separator nesC uses in its >>> generated code (-fnesc-separator=...), then the generated name of the AM >>> address changes as well. Somewhere along the line, the default separator was >>> changed from $ to __. If you're using an MSP430 based platform, look in >>> support/make/msp/msp.rules and search for a line like this: >>> >>> >>> >>> AMADDR = ActiveMessageAddressC__addr >>> >>> >>> >>> Hope this helps, >>> >>> Michiel >>> >>> >>> >>> *From:* [email protected] [mailto: >>> [email protected]] *On Behalf Of *Ricardo . >>> *Sent:* zaterdag 12 december 2009 17:08 >>> *To:* tinyos-help >>> *Subject:* Re: [Tinyos-help] AMSend malfunction >>> >>> >>> >>> I checked, and do not return the same value. The method >>> AMPacket.address() always returns the value 1, even when the TOS_NODE_ID is >>> not 1. >>> >>> On Fri, Dec 11, 2009 at 5:20 PM, Miklos Maroti <[email protected]> >>> wrote: >>> >>> Hi Ricardo, >>> >>> Then can you verify that AMPacket.address() also returns the same >>> value as TOS_NODE_ID with the same method? >>> >>> Miklos >>> >>> >>> On Fri, Dec 11, 2009 at 6:11 PM, Ricardo . <[email protected]> >>> wrote: >>> > 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 >>> > >>> >>> >>> >> >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > > > > -- > Best Regards, > Arik Sapojnik > [email protected] >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
