Take a look at CC2420CsmaP.nc again, but start at line 190.

In summary, you stopped too early when tracing the code. After loading
the txfifo, it grabs a backoff value from CC2420CsmaP (line 191) and
backs off for that period of time.

--
Jonathan W. Hui
[EMAIL PROTECTED]
http://www.cs.berkeley.edu/~jwhui/

On 9/12/06, Tie Luo <[EMAIL PROTECTED]> wrote:

Actually I read CC2420CsmaP.nc before I wrote the first email, its
Send.send() just modifies some states and eventually calls
CC2420Transmit.sendCCA( m_msg ), which is the function that I mentioned in
my first email.

I have tracked CC2420Transmit.sendCCA().  It basically calls an internal
function send( message_t* p_msg, bool cca ), which in turn calls
loadTXFIFO(), which in turn calls TXFIFO.write().  Then I tracked this
TXFIFO.write () and found that (after many nesting files) it finally writes
data onto SPI bus.   In summary, where the carrier sense and backoff are
done remains unknown.

Please help. Thanks a ton!

Tie


On 9/12/06, Jonathan Hui <[EMAIL PROTECTED]> wrote:
> The backoffs are implemented in CC2420CsmaP.nc.
>
> You can use the CCA (clear channel assessment) to check for energy on
> the air. See the datasheet for more details.
>
> --
> Jonathan W. Hui
> [EMAIL PROTECTED]
> http://www.cs.berkeley.edu/~jwhui/
>
> On 9/12/06, Tie Luo <[EMAIL PROTECTED]> wrote:
> >
> > This question is w.r.t MAC/PHY in TinyOS 2.0.
> >
> > By theory, MAC should sense the channel until it becomes idle for some
time
> > (e.g. DIFS) and then sends the packet.  But we did not find how to
control
> > carrier sensing and backoff (the Backoff interface just provides two
events
> > - initial() & congestion() - which seem not relevant).
> >
> > Or, are these implicitly done in CC2420Transmit.sendCCA()?  (assuming
cc2420
> > transceiver)
> > Then, how can we control the contention strategy - e.g. modify DIFS,
change
> > backoff interval, etc. ?
> >
> > --
> > Regards,
> > Tie
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> >
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
> >
> >
>



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

Reply via email to