[Tinyos-help] Application of dynamic address allocation
Itamar Amsili
amsilii at bgu.ac.il
Sat Aug 18 02:27:24 PDT 2007
My application is based on Ad-Hoc infrastructure so it's a little bit different,
but the main idea is quite the same.
Do you have any Code i can take a look at?
My big problem is acctualy implementing the protocol on code, so some
examples will be a big big help for me.
Thanks alot
Itamar
----- Original Message -----
From: "R. Steve McKown" <rsmckown at yahoo.com>
Date: Thursday, August 16, 2007 3:28
Subject: Re: [Tinyos-help] Application of dynamic address allocation
To: tinyos-help at millennium.berkeley.edu
Cc: Itamar Amsili <amsilii at bgu.ac.il>, Jacob Sorber <jacob.sorber at gmail.com>
> On Sunday 12 August 2007 07:21:36 Itamar Amsili wrote:
> > Hi Jacob,
> >
> > I'm looking for a DHCP-style application, but much simple,
> which means
> > assigning a 2-byte address(the TOS_NODE_ID in tinyos 2.x) to a
> node who is
> > joining a network. if there is no network in the reception
> area, the node
> > will assign to itself the default=1, and will continue
> searching the area.
> > if the node finds a nother node, i.e. there is a network
> around, it will
> > recieve an address to assign from the network(depends on how
> many nodes are
> > in the network already). It's an Ad-Hoc network,no leader.
> > this is it in general. it is not so complicated but i have no
> experience in
> > the NesC code so i need an example or reference of the
> operations we take (
> > initializing, sending & recieving data, timers etc ). If you
> have any ideas
> > it will be great.
>
> We implement a dhcp-like address assignment operation.
> When a node wants to
> join a message, it unicasts to the well-known base station
> address a join
> request packet, which includes its node-unique id value (a 64-
> bit guid in our
> case). The base station looks in its active tables for a
> guid->netid mapping
> and if not present it creates one via a hash. It then
> returns a join
> response packet to the original requester, via broadcast.
> The node then sets
> it's local ID via amSetAddress() exported by
> ActiveMessageC. It also sets
> TOS_NODE_ID and does some jockeying with the cc2420 radio so
> that it is also
> informed of the new local netid (2.0.2 may add some stuff to
> make this
> easier).
>
> Hope this helps.
>
> >
> > Thanks in advance
> >
> > Itamar
> >
> >
> > ----- Original Message -----
> > From: Jacob Sorber <jacob.sorber at gmail.com>
> > Date: Saturday, August 11, 2007 21:25
> > Subject: Re: [Tinyos-help] Application of dynamic address allocation
> > To: Itamar Amsili <amsilii at bgu.ac.il>
> > Cc: tinyos-help at millennium.berkeley.edu
> >
> > > Are you looking for a full dhcp-style application or do you want
> > > to know how
> > > to change the mote's address?
> > >
> > > Changing the mote's address should be easy. At least in
> > > Tinyos 1.x,
> > > TOS_LOCAL_ADDRESS is just a variable (uint16_t). So, you
> > > should be able to
> > > change its value at runtime. I haven't ever needed to do
> > > this, but from the
> > > code I don't see any reason why you couldn't. Try it out
> > > and see.
> > >
> > > As for doing dhcp on motes, I don't know of any existing
> > > application that
> > > does this. I'm sure you can do it, but I don't know that
> > > you really want
> > > to. If you could give some details about what exactly you
> > > need, it might
> > > help. What kind of addresses are you assigning?
> 2-
> > > byte TinyOS addresses?
> > > IPv4? Do you need to be able to uniquely identify your
> > > nodes (i.e. do you
> > > need a unique node address (like a MAC address) as well as the
> > > dynamic one?
> > >
> > > Anyway, hope that helps.
> > >
> > > Jacob Sorber
> > >
> > > On 8/11/07, Itamar Amsili <amsilii at bgu.ac.il> wrote:
> > > > Hi all,
> > > > I need to implemet an application of allocating an address to
> > >
> > > a mote in a
> > >
> > > > dynamic way,
> > > > i.e. after the mote is waking up, it's searching for a network
> > >
> > > to join, if
> > >
> > > > finding one- the network gives it
> > > > an address, and if not- allocating to itself an address.
> > > > Is anyone has an idea or example or kind of application i can
> > >
> > > use to help
> > >
> > > > me?
> > > > I need it ASAP...
> > > >
> > > > Thanks alot,
> > > >
> > > > Itamar
> > > >
> > > > _______________________________________________
> > > > Tinyos-help mailing list
> > > > Tinyos-help at Millennium.Berkeley.EDU
> > > > https://mail.millennium.berkeley.edu/cgi-
> > >
> > > bin/mailman/listinfo/tinyos-help
> > >
> > >
> >
> > !DSPAM:46bf156e143321804284693!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070818/a488054e/attachment.html
More information about the Tinyos-help
mailing list