[Tinyos-devel] Re: [Tinyos-help] TinyOS-2.x - Controlling the Default Radio Power inSoftware

Philip Levis pal at cs.stanford.edu
Tue Jul 10 09:09:25 PDT 2007


On Jul 10, 2007, at 9:03 AM, David Moss wrote:

> Phil's right - looks like the comments are out of sync with the
> implementation.  Use CC2420Packet to set each outbound packet's Tx  
> power.
> When you send it, the TransmitP uses this to adjust the radio's power:
>
>     if ( m_tx_power != tx_power ) {
>       call TXCTRL.write( ( 2 << CC2420_TXCTRL_TXMIXBUF_CUR ) |
>                          ( 3 << CC2420_TXCTRL_PA_CURRENT ) |
>                          ( 1 << CC2420_TXCTRL_RESERVED ) |
>                          ( (tx_power & 0x1F) <<  
> CC2420_TXCTRL_PA_LEVEL ) );
>     }
>
> Where m_tx_power is the transmit power level the radio is currently  
> set to.
> The lowest power level you can set is 1.  Each message can be sent  
> using a
> different transmit power level.

Moving this over to -devel...

Right, but the question is whether it's worthwhile to be able to set  
the default power level. Clearly, this is something that protocols  
shouldn't do themselves, but it could be something that a management  
system wants to do.

Phil




More information about the Tinyos-devel mailing list