[Tinyos-help] CTPInfo interface(T2)

Omprakash Gnawali gnawali at usc.edu
Sat Nov 3 16:19:57 PDT 2007


It would be difficult for me to say what is wrong with the setup you
have. I would be interested in seeing the messages sent by node 0 over
the UART when you run apps/tests/TestNetwork.

I installed apps/tests/TestNetwork on two motes with id 0 and 1 and I
see these messages sent by node 0 over the UART:

00 ff ff 00 00 17 00 ee 00 00 00 00 00 00 01 ee 00 00 00 01 00 00 00 00 ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 20 00 01 00 00 00 00 00 09
00 ff ff 00 00 09 00 16 33 00 00 00 00 00 00 00 0a
00 ff ff 00 00 09 00 16 50 00 00 00 00 00 00 00 0b
00 ff ff 00 00 09 00 16 21 00 02 00 01 00 00 00 0c
00 ff ff 00 00 17 00 ee 00 01 00 0b 00 01 02 ee 00 01 00 02 00 00 00 0b ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 33 00 00 00 00 00 00 00 0d
00 ff ff 00 00 09 00 16 21 00 03 00 01 00 00 00 0e
00 ff ff 00 00 17 00 ee 00 01 00 0b 00 01 03 ee 00 01 00 03 00 00 00 0b ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 33 00 00 00 00 00 00 00 0f
00 ff ff 00 00 17 00 ee 00 00 00 00 00 00 02 ee 00 00 00 02 00 00 00 00 ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 20 00 02 00 00 00 00 00 10
00 ff ff 00 00 09 00 16 50 00 00 00 00 00 00 00 11
00 ff ff 00 00 17 00 ee 00 00 00 00 00 00 03 ee 00 00 00 03 00 00 00 00 ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 20 00 03 00 00 00 00 00 12
00 ff ff 00 00 09 00 16 33 00 00 00 00 00 00 00 13
00 ff ff 00 00 09 00 16 50 00 00 00 00 00 00 00 14
00 ff ff 00 00 09 00 16 21 00 04 00 01 00 00 00 15
00 ff ff 00 00 17 00 ee 00 01 00 0a 00 01 04 ee 00 01 00 04 00 00 00 0a ca fe 00 00 00 00 00
00 ff ff 00 00 17 00 ee 00 00 00 00 00 00 04 ee 00 00 00 04 00 00 00 00 ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 20 00 04 00 00 00 00 00 16
00 ff ff 00 00 09 00 16 33 00 00 00 00 00 00 00 17
00 ff ff 00 00 09 00 16 50 00 00 00 00 00 00 00 18
00 ff ff 00 00 09 00 16 21 00 05 00 01 00 00 00 19
00 ff ff 00 00 17 00 ee 00 01 00 0a 00 01 05 ee 00 01 00 05 00 00 00 0a ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 33 00 00 00 00 00 00 00 1a
00 ff ff 00 00 17 00 ee 00 00 00 00 00 00 05 ee 00 00 00 05 00 00 00 00 ca fe 00 00 00 00 00
00 ff ff 00 00 09 00 16 20 00 05 00 00 00 00 00 1b
00 ff ff 00 00 09 00 16 50 00 00 00 00 00 00 00 1c

The byte just before "cafe" on pkt type 0xee is the metric returned by
CtpInfo.getEtx() call and it seems it is returning non zero values, at
least with my setup. Can you do this test and send what you see? If
TestNetwork seems OK but you get 0's when you run your application,
then we know what to debug.

- om_p

> 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