> Can we actually measure the small gap here?
> Is there any experimental tool that can help us to get the value?

This requires expensive external test hardware.  If you have access to one,
a high speed data acquisition unit will allow you to see that kind of time
resolution.  For example, you could turn on a GPIO when the transmit is
complete, and turn it back off when the next transmit occurs.  This will
tell you how big the gap is on the DAQ.  Alternatively, you could look at
the power consumption and flip on all the LED's during the gap - then your
DAQ would show you how wide that gap based on how long those LED's are on
for.  I don't think there's anything in software that will tell you.


> How long does it take for one CCA detection?

This depends on your microcontroller.  I find that the ATmega128 needs to do
less receive checks to cover the gap, and the tmote needs to do more.  This
could be because the ATmega128's transmitter has smaller gaps between
transmissions, or the MSP430 microcontroller may execute code faster (or
some combination of the two).  I specify the number of CCA checks to perform
at compile time based on what platform is being used.  The exact value is
determined through trial-and-error - whatever value is the lowest and still
achieves good detection reliability is the one to use - keep in mind that it
must work across platforms as well.


> The way I use is sense the channel first, then wait for 1 ms 
> (TOSH_uwait(1000)) and sense the channel again.

This should be ok as long as your first sample had backed off using some
initial random value. Also, keep in mind that no other code gets to execute
during the uwait() command on the mote - so it could cause other areas of
the application to be sluggish, especially if it's being run over and over.

Finally, if two transmitters use a constant backoff period then there may be
a higher probability that they'll try to transmit at the same time.  Using
at least one initial backoff at the beginning should prevent this.

I think you'll just need to run it and see how it works - if it seems to
work well, then keep it.

-David


-----Original Message-----
From: Jiakang Lu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 29, 2007 11:17 AM
To: David Moss
Subject: Re: Questions about CC2420 in Tinyos-1.x

Hi David,
> There's still going to be a small gap in modulation no matter what you do,
> because the microcontroller needs to re-issue the command to transmit. 
>   
Can we actually measure the small gap here? Is there any experimental 
tool that can help us to get the value?

> To handle these inevitable small modulation gaps, I've changed the initial
> backoff behavior when using LPL.  Essentially, I have it backoff *several
> times* - not just once like it normally does - before determining that the
> channel is truly not in use.  If any one backoff sample determines that
the
> channel is in use, it starts over again from the beginning.  
>   
How long does it take for one CCA detection? According the data sheet, 
CCA detection takes at least the time of 8 symbols (128us). Do you know 
the exact time value? The key point here is to guarantee the coverage of 
the gap under all circumstances. So this value is important to us.

The way I use is sense the channel first, then wait for 1 ms 
(TOSH_uwait(1000)) and sense the channel again. If both CCA sampling 
indicates the channel is free, then we start to transmit. How do you 
think of it?

Thanks a lot.

Best,
Jiakang


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

Reply via email to