Hi,

It now finally works great. I did figure it out yesterday that I must send
packets too using LinkEstimator. However, I did not realize that those
packets should be broadcast instead of unicast. Thanks a lot for your
help.

I am happy that the TinyOS CTP protocol also works with Java applications
[1]. However, it has some strange behaviors. This behavior also persist in
pure TinyOS applications.

1) If there is no root then a non-root mote does not send any packets.
However, when it once start sending packets then switching off the root
node does not make it stop sending those packets. That  behavior is
strange for me and does not feel consistent?

2) Assigning mote Id at runtime does not works. The motes have to be
assigned unique ids at compilation time.

-- 
Faisal Aslam

[1]
http://sourceforge.net/apps/mediawiki/takatuka/index.php?title=Collection_Tree_Protocol

> On Thu, Dec 3, 2009 at 8:43 AM, Faisal Aslam
> <[email protected]> wrote:
>> Dear Gnawali and all,
>>
>> I really need a good Link Estimation that works on many different
>> platforms (e.g. Telosb, mica2, micaz etc). It will be good to have a
>> 4-bit
>> link estimation that is reliable.
>> I have tried to use the LinkEstimation interface however, it always
>> return
>> same 255 value. Can someone please guide me that what I am doing wrong?
>> I
>> really appreciate your help.
>>
>> Here is the code.
>>
>> +++++++++++++ LinkEstTestC.nc ++++++++++++
>> #include <Timer.h>
>> #include "printf.h"
>>
>> module LinkEstTestC {
>>  uses interface Boot;
>>  uses interface SplitControl as RadioControl;
>>  uses interface StdControl as LEStart;
>>  uses interface Leds;
>>  uses interface LinkEstimator;
>>  uses interface Timer<TMilli>;
>> }
>>
>> implementation {
>>
>>  event void Boot.booted() {
>>    call RadioControl.start();
>>  }
>>
>>  event void RadioControl.startDone(error_t err) {
>>    if (err != SUCCESS) {
>>      call RadioControl.start();
>>    } else {
>>      call LEStart.start();
>>      call Timer.startPeriodic(2000);
>>    }
>>  }
>>
>>  event void RadioControl.stopDone(error_t err) {}
>>
>>  event void Timer.fired() {
>>      uint16_t linkQuality = call LinkEstimator.getLinkQuality(5);
>>      printf("LinkQ = %u \n", linkQuality);
>>      call Leds.led2Toggle();
>>      printfflush();
>>  }
>>
>>  event void LinkEstimator.evicted(am_addr_t neighbor) {}
>> }
>>
>> +++++++++++++++++ LinkEstTestAppC.nc ++++++++++++
>> configuration LinkEstTestAppC {}
>> implementation {
>>  components LinkEstTestC, MainC, LedsC, ActiveMessageC;
>>  components new TimerMilliC(), LinkEstimatorP;
>>
>>  LinkEstTestC.Boot -> MainC;
>>  LinkEstTestC.RadioControl -> ActiveMessageC;
>>  LinkEstTestC.Leds -> LedsC;
>>  LinkEstTestC.Timer -> TimerMilliC;
>>  LinkEstTestC.LEStart -> LinkEstimatorP;
>>  LinkEstTestC.LinkEstimator -> LinkEstimatorP;
>> }
>>
>> +++++++++++++++++++++ Makefile ++++++++++++++++++++
>> COMPONENT=LinkEstTestAppC
>> CFLAGS += -I$(TOSDIR)/lib/printf \
>>          -I$(TOSDIR)/lib/net \
>>          -I$(TOSDIR)/lib/net/le \
>>          -I$(TOSDIR)/lib/net/ctp
>> include $(MAKERULES)
>
>
> The estimator does not generate traffic of its own. You should send
> packets through the estimator to broadcast address. You should look at
> CtpRoutingEngineP.nc for an example on how to send a packet through
> the link estimator.
>
> - om_p
>




_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to