[Tinyos-help] CTPInfo interface(T2)

behnaz.bostanipour at epfl.ch behnaz.bostanipour at epfl.ch
Thu Nov 1 08:02:44 PDT 2007


Hi Omprakash,

Thanks,I've updated the CVS,but I still have the ETX=0,
the thing is that after your changes,I have no more problems
when I call CtpInfo.getEtx(),because before when I added the
value returned by call of this function to the messages that each
node sends ,I could receive some corrupted packets with wrong information
in each field(like TOSNODE_ID=1033 instead of 2)now I don't have this
problem any more but I still receive the ETX=0 and this for every node.


My network is not single hop,it is actually the modified version of
MultihopOsciloscope,more precisely,
I've added a single hop module(let's call it myApplicationC)  to
MultihopOsciloscope i.e.:

1)In MultihopOscilloscopeAppC ,I add this line:

components myApplicationAppC;

2)In myApplicationAppC,I add these lines:

configuration myApplicationAppC {
  provides {
    interface StdControl;
  }
}

implementation {

components myApplicationC as App,....
.
.
.


StdControl = App.StdControl;

.
.
.

3)I recompile and install MultihopOsciloscope on my nodes,so they
can send also the singlehop messages corresponding to  myApplicationC,
but I think that they run also the multihopOsciloscop successfuly
because I  get the correct number of neighbors with call of 
CtpInfo. numNeighbors().

For your information,I call CtpInfo.getEtx,as below :

if (call CtpInfo.getEtx(&gradient) == SUCCESS)

(where uint16_t gradient),so I don't think it's a problem with 
the call of the function .

I don't know what can be the problem...
Thanks and RGDS,
B.


Quoting Omprakash Gnawali <gnawali at usc.edu>:

> 
> CtpInfo.getEtx() was returning 0 because of a bug. It was returning
> the ETX from the current parent to the root. Your network was probably
> a single hop network so all the nodes had the root as their
> parent. Etx from the root would be 0 so it was returning 0.
> 
> I have fixed this so that it returns etx(parent to the root) + etx
> (link to the parent). The change has been committed to the CVS.
> 
> - om_p
> 
> ----------
> 
> Date: Fri, 26 Oct 2007 19:23:10 +0200 (MEST)
> From: behnaz.bostanipour at epfl.ch
> Subject: [Tinyos-help] CTPInfo interface(T2)
> To: tinyos-help at millennium.berkeley.edu
> Message-ID: <1193419390.4722227e50bde at imapwww.epfl.ch>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Hi all,
> 
> I've  modified multihopOscilloscope application which uses CTP,
> and I've installed this application on 5 nodes,where the node with id
> 0
> is the root.
> 
> Actually I try to  get the ETX  for each node by calling
> CtpInfo.getEtx,
> it returns Success but it puts zero for all the  ETX  values for all the
> nodes.
> 
> 
> I even try to place the nodes in far distances but there is no change.
> 
> I've also tried to check the other commands of the CTP info like
> CtpInfo.numNeighbors() which returns the correct value i.e in this
> case
> 4.
> 
> I know that zero is the  best ETX value.But I don't think it's noprmal
> Any ideas?
> RGDS,
> B.
> 
> 


More information about the Tinyos-help mailing list