Eric Decker | 1 Aug 2008 02:32
Picon
Gravatar

Re: JTAG adapter interface for the TelosB/Tmote Sky

The connector is a 14 pin ribbon cable that needs to be properly soldered to the TelosB.
We figured it out from the telosb schematic.  There is a 14 pin dual inline connector.

I don't know of anyone that sells them.

eric

On Thu, Jul 31, 2008 at 10:03 AM, Aisha Neal <aishaneal77 <at> yahoo.com> wrote:
Does anyone know where to purchase the "JTAG adapter" that interfaces with the "MSP-FET430UIF JTAG Tool" for the TelosB/Tmote Sky motes?
The moteiv is now Sentilla, and don't think Sentilla is selling them anymore.

Thank you


_______________________________________________
Tinyos-help mailing list
Tinyos-help <at> millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



--
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC

<div><div dir="ltr">The connector is a 14 pin ribbon cable that needs to be properly soldered to the TelosB.<div>We figured it out from the telosb schematic. &nbsp;There is a 14 pin dual inline connector.</div>
<div><br></div>
<div>I don't know of anyone that sells them.</div>
<div><br></div>
<div>eric<br><br><div class="gmail_quote">On Thu, Jul 31, 2008 at 10:03 AM, Aisha Neal <span dir="ltr">&lt;<a href="mailto:aishaneal77 <at> yahoo.com">aishaneal77 <at> yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div>
<div><div>Does anyone know where to purchase the "JTAG adapter" that interfaces with the <span>"</span>MSP-FET430UIF JTAG Tool" for the TelosB/Tmote Sky motes?<br>
The moteiv is now Sentilla, and don't think Sentilla is selling them anymore.<br><br>Thank you<br>
</div></div>
<br>
</div>
<br>_______________________________________________<br>
Tinyos-help mailing list<br><a href="mailto:Tinyos-help <at> millennium.berkeley.edu">Tinyos-help <at> millennium.berkeley.edu</a><br><a href="https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help" target="_blank">https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help</a><br>
</blockquote>
</div>
<br><br clear="all"><br>
-- <br>Eric B. Decker<br>Senior (over 50 :-) Researcher<br>Autonomous Systems Lab<br>Jack Baskin School of Engineering<br>UCSC<br><br>
</div>
</div></div>
Han Yidong | 1 Aug 2008 04:36
Picon
Favicon

Re: Uart and CC2420 module conflict on telos Platform?

Hi,

 

Thanks a lot for your answer.  You got the problem I encountered.

 

And BSN should belong to telosa platform. I use this platform makefile to compile.

 

Cauz BSN provide a extension board, which has Uart1tx and Uart1rx pins. So I could use its Uart1 interface, beside the USB programming function of Uart1. When I program the BSN node by USB, the BSN will be reset, afterwards, Uart1 could be controlled by the application.

 

Pity thing is, for our CC2420 stack, it could only run on Platform1, and no way to run on PC to test. But Uart1 works quit well before that CC2420 command being executed.

 

This problem really got me frustrated, haha…

 

Thanks again^_^

 

Best Wishes,

Yidong, Neil

 

 

From: tinyos-help-bounces <at> millennium.berkeley.edu [mailto:tinyos-help-bounces <at> millennium.berkeley.edu] On Behalf Of Guillermo De Cesco
Sent: 2008
731 21:13
To: Han Yidong
Cc: tinyos-help <at> millennium.berkeley.edu
Subject: Re: [Tinyos-help] Uart and CC2420 module conflict on telos Platform?

 

Hi,

I am a little confuse, BSN == tmote, isnt it?
You are using tmote as your microcontroler to interact with your own CC2420 stack through  one msp430 Uart.
when you connect bsn to usb, does your application works or you have the same problem?
you say that you use UART1 to communicate to platform1, but how do you achive this if UART1 is used by usb?
if you are using uart0, we can talk about the issues I mentioned in the previous mail, in particular to your application.

Related to debugging I always wanted to use ICE but never bought  it.

On Thu, Jul 31, 2008 at 5:52 AM, Han Yidong <YDHAN <at> ntu.edu.sg> wrote:

Hi Bill,

 

I saw your reply about UartStream error in the TinyOS mailing list. Impressive!

 

Actually I also encountered the same Uart1 problem in my project. I am now using telos platform, which is BSN development kit from Imperial College London.

 

This platform has SPI/Uart0 interface and Uart1. Our group is now using this BSN Development Kit to develop our own prototype, which  use another platform Platform1 to connect to BSN through Uart1 interface, we build our own CC2420 stack on Platform1 and try to communicate with another BSN node trough CC2420, like the following graph.  

 

                               Telos(BSN)

|-----------------------------------------------------|

|         |-----------|         SPI              |-----------|    |        Uart         |--------------|

|         |       RF      | <--------------- | MSP430 |<-|-------------->|Platfrom1   |

|        |-----------|     BSN Node    |-----------|    |                           | -------------|

|-----------------------------------------------------|

 

One thing I may mention is that, I plug the BSN into PC to utilize the USB power supply, but when I use battery , the UART1 could not work at all. I still don't know why.

 

Caus we don't have standalone CC2420 module. What telos platform do is to function as Uart-SPI gateway in that we want to utilize the CC2420 module without using CC2420 stack on Telos . On it, we use TinyOS 2.x to program the node, when operating the RF module, we use purely Usart interface to read or write CC2420, like the following interfaces:

 

      call Usart.clrTxIntr();

      call Usart.tx( ch );

      call InterruptFIFOP.clear();

 

 

 

When we try to operate CC2420 on BSN and meanwhile transmit data through Uart,  then few problems happen.

 

1.      After SRXON command strobe is sent to CC2420, we continue to try to send data through Uart1, it turn that the data could not be received correctly at BSN side. But before that command, the Uart1 works quit well.

2.       The same problem would happen after I send STXON command strobe.

3.       Since we only trace to the STXON step, we could not guarantee there's no problem for other command strobes, if so, can you point them out?

 

Have you ever encountered this kind of problem? Or do you have any idea about these?

 

Besides, Is there any efficient method to debug BSN development kit, or telos platform? Do we need to buy other ICE tools if we want to debug BSN?

 

Best Wishes,

Yidong, Neil

 

<div>

<div class="Section1">

<p class="MsoNormal"><span>Hi,<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Thanks a lot for your answer. &nbsp;You got the problem I
encountered.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>And BSN should belong to telosa platform. I use this platform makefile
to compile.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Cauz BSN provide a extension board, which has Uart1tx and Uart1rx
pins. So I could use its Uart1 interface, beside the USB programming function
of Uart1. When I program the BSN node by USB, the BSN will be reset,
afterwards, Uart1 could be controlled by the application.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Pity thing is, for our CC2420 stack, it could only run on
Platform1, and no way to run on PC to test. But Uart1 works quit well before
that CC2420 command being executed.<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>This problem really got me frustrated, haha&hellip;<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Thanks again^_^<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span>Best Wishes,<p></p></span></p>

<p class="MsoNormal"><span>Yidong, Neil<p></p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<p class="MsoNormal"><span><p>&nbsp;</p></span></p>

<div>

<p class="MsoNormal"><span>From:</span><span>
tinyos-help-bounces <at> millennium.berkeley.edu [mailto:tinyos-help-bounces <at> millennium.berkeley.edu]
On Behalf Of Guillermo De Cesco<br>Sent: 2008</span><span lang="ZH-CN">&#24180;</span><span>7</span><span lang="ZH-CN">&#26376;</span><span>31</span><span lang="ZH-CN">&#26085;</span><span> 21:13<br>To: Han Yidong<br>Cc: tinyos-help <at> millennium.berkeley.edu<br>Subject: Re: [Tinyos-help] Uart and CC2420 module conflict on telos
Platform?<p></p></span></p>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

<div>

<p class="MsoNormal">Hi, <br><br>
I am a little confuse, BSN == tmote, isnt it?<br>
You are using tmote as your microcontroler to interact with your own CC2420
stack through&nbsp; one msp430 Uart. <br>
when you connect bsn to usb, does your application works or you have the same
problem?<br>
you say that you use UART1 to communicate to platform1, but how do you achive
this if UART1 is used by usb?<br>
if you are using uart0, we can talk about the issues I mentioned in the
previous mail, in particular to your application.<br><br>
Related to debugging I always wanted to use ICE but never bought&nbsp; it. <br><br><p></p></p>

<div>

<p class="MsoNormal">On Thu, Jul 31, 2008 at 5:52 AM, Han Yidong &lt;<a href="mailto:YDHAN <at> ntu.edu.sg">YDHAN <at> ntu.edu.sg</a>&gt; wrote:<p></p></p>

<div>

<div>

<p>Hi Bill,<p></p></p>

<p>&nbsp;<p></p></p>

<p>I saw your reply about UartStream error in the TinyOS mailing list.
Impressive! <p></p></p>

<p>&nbsp;<p></p></p>

<p>Actually I also encountered the same Uart1 problem in my project. I am now
using telos platform, which is BSN development kit from Imperial College
London.<p></p></p>

<p>&nbsp;<p></p></p>

<p>This platform has SPI/Uart0 interface and Uart1. Our group is now using this
BSN Development Kit to develop our own prototype, which &nbsp;use <span>another platform Platform1 to connect to BSN through
Uart1 interface</span>, we build our own CC2420 stack on Platform1 and try
to communicate with another BSN node trough CC2420, like the following graph.
&nbsp;<p></p></p>

<p>&nbsp;<p></p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Telos(BSN)<p></p></p>

<p>|-----------------------------------------------------|<p></p></p>

<p>|&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-----------|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SPI
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-----------|&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Uart&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;|--------------|<p></p></p>

<p>| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;RF&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;| &lt;---------------
|&nbsp;MSP430 |&lt;-|--------------&gt;|Platfrom1&nbsp;&nbsp; |<p></p></p>

<p>|&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-----------|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BSN
Node &nbsp;&nbsp; |-----------|&nbsp;&nbsp;
&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| -------------|<p></p></p>

<p>|-----------------------------------------------------|<p></p></p>

<p>&nbsp;<p></p></p>

<p>One thing I may mention is that, I plug the BSN into PC to utilize the
USB power supply, but when I use battery , the UART1 could not work at all. I
still don't know why.<p></p></p>

<p>&nbsp;<p></p></p>

<p>Caus we don't have standalone CC2420 module<span>.
What telos platform do is to function as Uart-SPI gateway in that we want to
utilize the CC2420 module without using CC2420 stack on Telos .</span> On
it, we use TinyOS 2.x to program the node, when operating the RF module, we use
purely Usart interface to read or write CC2420, like the following interfaces:<p></p></p>

<p>&nbsp;<p></p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call Usart.clrTxIntr();<p></p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call Usart.tx( ch );<p></p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call InterruptFIFOP.clear();<p></p></p>

<p>&nbsp;<p></p></p>

<p>&nbsp;<p></p></p>

<p>&nbsp;<p></p></p>

<p>When we try to operate CC2420 on BSN and meanwhile transmit data through
Uart, &nbsp;then few problems happen. <p></p></p>

<p>&nbsp;<p></p></p>

<p><span>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
After SRXON command strobe is sent to CC2420, we continue to try to send data
through Uart1, it turn that the data could not be received correctly at BSN
side. But before that command, the Uart1 works quit well.</span><p></p></p>

<p>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The same
problem would happen after I send STXON command strobe.<p></p></p>

<p>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Since we
only trace to the STXON step, we could not guarantee there's no problem for
other command strobes, if so, can you point them out?<p></p></p>

<p>&nbsp;<p></p></p>

<p><span>Have you ever encountered this kind of
problem? Or do you have any idea about these? </span><p></p></p>

<p><span>&nbsp;</span><p></p></p>

<p><span>Besides, Is there any efficient method to
debug BSN development kit, or telos platform? Do we need to buy other ICE tools
if we want to debug BSN?</span><p></p></p>

<p>&nbsp;<p></p></p>

<p>Best Wishes,<p></p></p>

<p>Yidong, Neil<p></p></p>

</div>

</div>

</div>

<p class="MsoNormal"><p>&nbsp;</p></p>

</div>

</div>

</div>
Omprakash Gnawali | 1 Aug 2008 05:34
Picon
Favicon

Re: Implementation of CTP - SentCache

On Thu, Jul 31, 2008 at 7:01 AM, Oliver Frietsch
<da-mailing-listen <at> friets.ch> wrote:
> Hello list,
>
> I'm currently working on a special-purpose derivate of CTP and therefore
> read all the source code to get an overview. One point that is totally
> unclear to me is in CtpForwardingEngineP (most recent CVS release).
> It says (line 439):
>
>       // Once we are here, we have decided to send the packet.
>       if (call SentCache.lookup(qe->msg)) {
>         call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_CACHE_AT_SEND);
>         call SendQueue.dequeue();
>        if (call MessagePool.put(qe->msg) != SUCCESS)
>          call CollectionDebug.logEvent(NET_C_FE_PUT_MSGPOOL_ERR);
>        if (call QEntryPool.put(qe) != SUCCESS)
>          call CollectionDebug.logEvent(NET_C_FE_PUT_QEPOOL_ERR);
>         post sendTask();
>         return;
>       }
>
> OK, so it should *stop sending* and drop the next packet, in the case
> that this packet (i.e. something very similar...) has already been sent
> before. That's what I think...
>
> Unfortunately, my opinion collides with the comment "Once we are here,
> we have decided to send the packet."

The comment is misleading. As you note, there are more tests done
after the comment before deciding to send the packet.

> and the implementation of the cache
> itself.
>
> As stated in LruCtpMsgCacheP, the result of lookup is: "if key [packet]
> is in cache returns the index (offset by first), otherwise returns count
> [of enqueued packets]".
> So... The packet is dropped *everytime*, except that is is the first one
> in the sent cache or the cache is empty? What does this position imply
> for the packet, except that it is the oldest one that I can remember?
>
> I'm very sure that I missed something important, as this implementation
> looks senseless to me ATM. Please help me!

Cache.lookup returns TRUE if a packet with the same signature is in
the cache. This TRUE/FALSE return by Cache.lookup is different from
what the internal lookup function in LruCtpMsgCacheP.nc returns. The
internal lookup function in LruCtpMsgCacheP.nc returns the position of
a packet in the cache if a similar packet is found, otherwise the size
of the cache. CTP does not use the internal lookup function
LruCtpMsgCacheP.nc.

- om_p
Omprakash Gnawali | 1 Aug 2008 05:38
Picon
Favicon

Re: eetx value doesn't increase for neighbors

On Thu, Jul 31, 2008 at 8:50 AM, Philippe BAYLE <filipaillou <at> gmail.com> wrote:
> Hi all, I am working on tinyos 2.x (not the latest CVS release). I am
> currently doing modifications on CtpRoutingEngineP.nc file in order  to
> choose a parent considering severals parameters such as congestion and
> energy in extra of ETX. For that I check all the neighbors in the Routing
> Table built in the file. The problem is when a node is no longer alive ( for
> example if you move the motes) , it stays in the routing Table....and then
> it is considered for the choice of a new parent.
> I guess that the link Etx value should avoid to consider bad link but it
> doesn't. The link quality must increase in a signifiant way when a neighbor
> mote "die" but in fact, towards what I observed, it stays at the same
> value....This comes from LinkEstimator component with the eetx value. I know
> that there was problems about eetx not increasing in the past but I am using
> the revision 1.6 of this file and it should works so I don't understand at
> all what happens. Can someone tell me if this is a bug or if the eetx value
> only increases when the parent (and not a simple neighbor) is lost?

The link estimator value will decrease slowly - the estimator might
send beacons once every 1024 seconds if the trickle timer has settled
at that value and you will need to realize that you have missed a few
beacons before you start seeing lower values. But if you send some
data packets, the estimator will be updated rapidly.

- om_p
Omprakash Gnawali | 1 Aug 2008 05:52
Picon
Favicon

Re: collection, multiple roots, multiple id's - help

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
superpopb2b | 1 Aug 2008 07:38
Favicon

How to produce a 40kHz square wave by a tmote sky?

Hi all,

How to produce 40khz square wave on the pin that SCL_CLK?

I have overwritten the TACCR0 to make an MSP430 counter overflow interrupt, int the event ,by using the function that port33.setHigh or setLow to produce the square wave. If the TACCR0 is large ,the square wave is good but lager than the frequency than what I want ,If the TACCR0 is small, the port output nothing! Why , and How to do about it to produce square wave whose frequency is 40KHz? My code is that :

======================================================================

module BlinkM {

  provides {

    interface StdControl;

  }

  uses {

    interface Timer;

    interface Leds;

    interface MSP430GeneralIO as Port33;

    interface MSP430Timer as TimerA;

    interface Counter<TMicro,uint16_t> as CounterMicro;

  }

}

implementation {

       bool state=FALSE;

       int i;

  command result_t StdControl.init() {

    call Leds.init();

    call Port33.setLow();

WDTCTL=WDTPW+WDTHOLD;

        TACTL=0x0216;

    TACCR0=25;

    TACCTL0=CCIE;

    return SUCCESS;

  }

  command result_t StdControl.start() {

      call Timer.start(TIMER_REPEAT,100);

      return SUCCESS;

  }

 

  command result_t StdControl.stop() {

     return SUCCESS;

  }

  event result_t Timer.fired()

  {

  return SUCCESS;

  }

  async event void CounterMicro.overflow(){

        state=!state;

    if(state)

      call Port33.setHigh();

    else

      call Port33.setLow();

  }

  async event void TimerA.overflow(){

  }

}

 

Thanks.

 
<div><div>
<span lang="EN-US"><span class="trans"><p><p class="MsoNormal"><span class="trans"><span lang="EN-US">Hi all,<p></p></span></span></p>
<p class="MsoNormal"><span class="trans"><span lang="EN-US">How to produce 40khz square wave on the pin that SCL_CLK?<p></p></span></span></p>
<p class="MsoNormal"><span class="trans"><span lang="EN-US">I have overwritten the TACCR0 to make an MSP430 counter overflow interrupt, int the event ,by using the function that port33.setHigh or setLow to produce the square wave. If the TACCR0 is large ,the square wave is good but lager than the frequency than what I want ,If the TACCR0 is small, the port output nothing! Why , and How to do about it to produce square wave whose frequency is 40KHz? My code is that :<p></p></span></span></p>
<p class="MsoNormal"><span class="trans"><span lang="EN-US">======================================================================<p></p></span></span></p>
<p class="MsoNormal"><span lang="EN-US">module BlinkM {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>provides {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>interface StdControl;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>uses {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>interface Timer;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>interface Leds;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>interface MSP430GeneralIO as Port33;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span>interface MSP430Timer as TimerA;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>interface Counter&lt;TMicro,uint16_t&gt; as CounterMicro;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">implementation {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>bool state=FALSE;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>int i;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>command result_t StdControl.init() {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>call Leds.init(); <p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>call Port33.setLow();<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">WDTCTL=WDTPW+WDTHOLD;</span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>TACTL=0x0216;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>TACCR0=25;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>TACCTL0=CCIE;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>return SUCCESS;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>command result_t StdControl.start() {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>call Timer.start(TIMER_REPEAT,100);<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>return SUCCESS;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>command result_t StdControl.stop() {<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>return SUCCESS;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>event result_t Timer.fired()<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>{<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>return SUCCESS;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>async event void CounterMicro.overflow(){<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>state=!state;<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>if(state)<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp; </span><span>&nbsp;&nbsp;</span><span>&nbsp;</span>call Port33.setHigh(); <p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp; </span>else<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>call Port33.setLow();<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>async event void TimerA.overflow(){<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><span>&nbsp; </span>}<p></p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">}</span></p>
</div>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks.</span></p>
<p class="MsoNormal"></p></p></span></span>&nbsp;</div></div>
Oliver Frietsch | 1 Aug 2008 09:05
Picon

Re: Implementation of CTP - SentCache

Omprakash,

there are really two lookup implementations in LruCtpMsgCacheP. When I 
found the internal one (it comes first), I missed the missing "Cache." 
in front and thought it was the published one... Uh.
Anyway, it's good to see that I understood the intention of the code 
correctly. The CTP is a really nice thing.

Thanks,
Oliver

Omprakash Gnawali schrieb:
> On Thu, Jul 31, 2008 at 7:01 AM, Oliver Frietsch
> <da-mailing-listen <at> friets.ch> wrote:
>> Hello list,
>>
>> I'm currently working on a special-purpose derivate of CTP and therefore
>> read all the source code to get an overview. One point that is totally
>> unclear to me is in CtpForwardingEngineP (most recent CVS release).
>> It says (line 439):
>>
>>       // Once we are here, we have decided to send the packet.
>>       if (call SentCache.lookup(qe->msg)) {
>>         call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_CACHE_AT_SEND);
>>         call SendQueue.dequeue();
>>        if (call MessagePool.put(qe->msg) != SUCCESS)
>>          call CollectionDebug.logEvent(NET_C_FE_PUT_MSGPOOL_ERR);
>>        if (call QEntryPool.put(qe) != SUCCESS)
>>          call CollectionDebug.logEvent(NET_C_FE_PUT_QEPOOL_ERR);
>>         post sendTask();
>>         return;
>>       }
>>
>> OK, so it should *stop sending* and drop the next packet, in the case
>> that this packet (i.e. something very similar...) has already been sent
>> before. That's what I think...
>>
>> Unfortunately, my opinion collides with the comment "Once we are here,
>> we have decided to send the packet."
> 
> The comment is misleading. As you note, there are more tests done
> after the comment before deciding to send the packet.
> 
> 
>> and the implementation of the cache
>> itself.
>>
>> As stated in LruCtpMsgCacheP, the result of lookup is: "if key [packet]
>> is in cache returns the index (offset by first), otherwise returns count
>> [of enqueued packets]".
>> So... The packet is dropped *everytime*, except that is is the first one
>> in the sent cache or the cache is empty? What does this position imply
>> for the packet, except that it is the oldest one that I can remember?
>>
>> I'm very sure that I missed something important, as this implementation
>> looks senseless to me ATM. Please help me!
> 
> Cache.lookup returns TRUE if a packet with the same signature is in
> the cache. This TRUE/FALSE return by Cache.lookup is different from
> what the internal lookup function in LruCtpMsgCacheP.nc returns. The
> internal lookup function in LruCtpMsgCacheP.nc returns the position of
> a packet in the cache if a similar packet is found, otherwise the size
> of the cache. CTP does not use the internal lookup function
> LruCtpMsgCacheP.nc.
> 
> - om_p
De-MonHell | 1 Aug 2008 10:06
Picon

Re: collection, multiple roots, multiple id's - help


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

Erwing R. Sanchez | 1 Aug 2008 11:00
Picon

tmote jtag adapter and olimex's msp-jtag-tiny in OS X

Hi,
I'm trying to debug a tmote (telosb) with olimex's msp-jtag-tiny  
(which is the USB jtag pod from olimex). I built myself the adapter  
to match the 8-pin header of the tmote with the 14-pin connector of  
the jtag device, but I'm not sure if i did it well beacause the  
tmote's schematic is not clear. According to it, the 6th pin of the  
jtag connector is undefined, and thus I didn't connect it to the  
olimex device...  has anyone built the adapter? it is ok to leave  
unconnected the 6th pin of the tmote's jtag 8-pin header?
Besides, I've been having some trouble making the jtag device work on  
Mac OS X. I've seen that Olimex has plenty of documentation and  
drivers for windows (but not linux or OS X). I've seen some guides  
for configuring GDB to work with TI USB FET jtag device; does anyone  
know if the same procedure may work with olimex's device? any advice?
thanks,
Erwing
Nicola Wegner | 1 Aug 2008 12:14

ActiveMessage: Receiving duplicates

Hi everybody,

is there any possibility to receive duplicate AM-packets which are
normally suppressed? I have a little snooper application that monitors
the network packets. If I let a mote send one packet, turn it off and
on again then the resend package is not being received by the snooper.
If possible I do not want to mess around with the TinyOS code. Perhaps
there is something I can add to the Makefile?

Thanks

Nicola

Gmane