[Tinyos-help] collection, multiple roots, multiple id's - help
De-MonHell
damonhill82 at gmail.com
Fri Aug 1 01:06:55 PDT 2008
yeah, i made a typo in my question (more than one, i see), but you've right
understood however.
now i have another question: doing as you suggest to me, it's better to work
on a modified version of the already existing CollectionC module or it's
better to take the basic components and write/wire a new component from
scratch.
anyway, that's a bad news for me, because i've based a more than a month work
for my thesis on this idea (different-id ==> different roots).
I don't blame the wiki for this, because maybe it's only my bad english or my
poor experience with tinyos (this is my real first work with it), but i think
some more examples, maybe with some schemas showing the tree build up in a
scenario like mine, will be useful for future newbie.
thanks.
ps: aside this, having someone that can understand my really ugly english,
it's a success.
On Friday 01 August 2008 05:52:51 Omprakash Gnawali wrote:
> On Thu, Jul 31, 2008 at 4:05 AM, De-MonHell <damonhill82 at gmail.com> wrote:
> > hi all.
> >
> > THE EXAMPLE:
> > i have 4 motes: 0,1,3,4 (these are their TOS_NODE_ID)
> > Inside them i have basically the same application that use a single
> > collection with AREA_ID as colllection id BUT:
> > node 0 and 1 have a enum inside them like this:
> > AREA_ID=0
> > node 3 and 4 have
> > AREA_ID=1
> >
> > (for every node: i change the AREA_ID, i recompile and finally i deploy)
> >
> > Node 0 and 2 will act as root of the collection service.
>
> node 2? You have five motes?
>
> > Node 1 and 3 will measure the ambient temperature and send it the the
> > leader of their respective area (using the collection sender)
> > so node 1 will send its data to node 0 and
> > node 4 to node 3
>
> I think there is a typo here - is node 3 your root?
>
> > This is (my) exptected behavior.
> >
> > THE PROBLEM:
> > but this case sometimes work and sometimes not. both "temperature" nodes
> > sent their data (connecting them to the pc i can see their printf )
> > node 0 and 2 indeed, sometimes both thei receive the data, sometimes only
> > one of the two.
> >
> > INFO
> > i'm using the tinyos 2 from CVS
> > 4 tmotesky motes
> > i attach the files of the application
> >
> > ANSWER?!
> > am i missing something about the collection protocol?
> > what can i check to understand what is failing?
> > why sometimes work and sometimes not?
>
> The argument you pass to CollectionSenderC during its instantiation is
> protocol id, the dispatch id of the protocol or application running on
> top of CTP. So, you are not forming two separate/disjoint trees. If
> you want two disjoint trees, you should run one instance of CTP in one
> part of the network and another instance of CTP in another part of the
> network. To do this, you can run CTP on two different AM types.
> Otherwise, you will have multiple roots in the same network and the
> packets will go to any or all of the roots depending on the dynamics
> or topology.
>
> - om_p
More information about the Tinyos-help
mailing list