On May 18, 2007, at 8:48 PM, Shuo Xiao wrote:

Hi Phil,

The default transmission power CC2420_DEF_RFPOWER is defined in the CC2420.h. The details is as follows:

#ifndef CC2420_DEF_RFPOWER
#define CC2420_DEF_RFPOWER 31
#endif

And the verification on tx power is in the file CC2420TransmitP.nc.

void loadTXFIFO() {
   cc2420_header_t* header = call CC2420Packet.getHeader( m_msg );
uint8_t tx_power = (call CC2420Packet.getMetadata( m_msg ))- >tx_power;

   if ( !tx_power ) {
     // If our packet's tx_power wasn't configured to anything but 0,
     // send it using the default RF power.  This assumes the
     // packet's metadata is all set to 0's on boot.

     tx_power = CC2420_DEF_RFPOWER;
   }

<snip>

But why did you say that 0 means default power level? I don't quite understand it. And how to use commands CC2420Packet.getPower and CC2420Packet.setPower to get and set the tx power respectively in the application? Thanks a lot.

The above lines of code, starting with "if ( !tx_power)".

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

Reply via email to