Sam,

If I get you right, you want to generate your own unique ID for your nodes,
based on the HW address.
If so, you can use interface ActiveMessageAddress, which provides
*setAddress(am_group_t
group, am_addr_t addr) *.

Arik



On Wed, Feb 10, 2010 at 00:50, simranjit singh <[email protected]> wrote:

> Thanks janos and eric for the reply.
> I am able to derive a unique ID from the serial ID of the chip. Now the
> only part left is to assign that unique ID as the TOS_NODE_ID. I know tos.h
> declares the TOS_NODE_ID but i am trying to figure out how to declare the
> TOS_NODE_ID from my own application... any suggestion?
>
> Sam
>
>
> On Mon, Feb 8, 2010 at 1:02 PM, Janos Sallai 
> <[email protected]>wrote:
>
>> There are a couple ways to do this:
>>
>> 1. Use deluge. You need to program the mote with the golden image
>> once, giving it a node id. The node id will be maintained when the
>> mote is reprogrammed using deluge.
>>
>> 2. Most of the supported motes (mica2, micaz, telosb, iris) have a
>> serial ID chip (ds2411/ds2401) built in. That will give you a 48-bit
>> unique id. You will need to figure out, though, how to derive a 16-bit
>> mote id from that which is also unique. The implementation is under
>> tos/chips/ds2401.
>>
>> 3. Use ConfigStorage to store the node id. Change hardware
>> initialization such that the node id is loaded from the flash/eeprom
>> and addr in ActiveMessageAddressC and TOS_NODE_ID (a global declared
>> in tos.h) are set accordingly.
>>
>> Janos
>>
>> On Fri, Feb 5, 2010 at 7:31 PM, simranjit singh <[email protected]>
>> wrote:
>> > hey
>> >            I am using TinyOS to set up a wireless sensor network. In
>> this i
>> > want to assign the node_id dynamically meaning i do not want to do make
>> > <platform> install.<nodeid> . Instead i want the node ID allocation be
>> done
>> > from a file. If you could point me to any documents or code that might
>> help
>> > me achieve this. Thanks in advance.
>> > Simranjit Singh
>> > [email protected]
>> >
>> > _______________________________________________
>> > 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

Reply via email to