[Tinyos-help] Mote serial numbers and dynamic mote id allocation
David
wizzardx at gmail.com
Mon May 12 05:44:37 PDT 2008
(re-ccing the list, in case others have some info).
On Mon, May 12, 2008 at 1:44 PM, Marco Antonio Lopez Trinidad
<marco.lopez at unige.it> wrote:
> The mote ID is assigned at compile time with the command
>
> make mote_type install,id mib520,port
>
> where:
>
> mote_type can be either the mica2, micaz, etc.
>
> id the mote id.
>
> port is serial, usb or network.
>
> On the other hand, the mote id can be loaded on each packet transmission and you
> have to define and retrieve it in you program code. In the following link there
> are some explanations.
>
> http://docs.tinyos.net/index.php/Mote-mote_radio_communication
>
> cheers up.
> --marco.
Thanks for the info. I dug a bit deeper, and found
doc/txt/porting.txt, where a distinction is made between TOS_NODE_ID
(hardcoded) and AMPacket.localAddress() (defaults to TOS_NODE_ID, but
can be updated at runtime).
It sounds like AMPacket.localAddress() is exactly what I want. I can
set TOS_NODE_ID to the same value for all motes (where I want to
dynamically set the mote ID, and then get the 'runtime' mote ID from
flash).
My remaining problem - what about networking libraries which use
TOS_NODE_ID instead of AMPacket.localAddress()? (Deluge, Drip, etc, a
few others, according to a 'grep'). My apps use those, so they won't
work properly.
Is this a bug in those libraries? Should they be using
AMPacket.localAddress() instead of TOS_NODE_ID?
Maybe a developer can answer this question (I'm going to ask Razvan offlist).
David.
>
>
>
> > Hi list.
> >
> > When I run motelist, I get output like this:
> >
> > M4AOCF87 /dev/ttyUSB0 Moteiv tmote sky
> > M4AOCFBE /dev/ttyUSB1 Moteiv tmote sky
> > M4AOCFAT /dev/ttyUSB2 Moteiv tmote sky
> >
> > Can tinyos apps fetch their serial number?
> >
> > I have an application where I want to dynamically allocate mote ids
> > (and possibly group IDs) over serial.
> >
> > Intended logic goes something like this:
> >
> > 1) Motes without a mote id transmit their serial number
> > 2) Software on PC (connected to basestation) allocates a mote id, and
> > sends it to the mote over radio
> > 3) Motes use the new number as their mote id.
> > 4) Mote's new id should persist across mote resets
> >
> > Any suggestions? Pointers to docs/code I should look at are appreciated.
> >
> > With my current knowledge, I'd probably (try to) implement it like this:
> >
> > * Mote apps ae compiled with an unusual ID, and have their serial
> > number stored in a config volume in flash (an initial 'setup' script
> > on the server reads this ID from motelist and then sends it over
> > serial to the mote).
> >
> > * When motes get the updated mote id over serial, they reprogram
> > themselves. I'll need to take a look at Deluge to see how it preserves
> > mote id numbers.
> >
> > David.
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
>
>
>
More information about the Tinyos-help
mailing list