[CUWiN-Dev] Transmit power control / RSS measurement

David Young dyoung at pobox.com
Wed May 3 01:59:36 CDT 2006


On Tue, May 02, 2006 at 11:54:03PM +0900, Jeongkeun Lee wrote:
> Dave,
> 
> Now I can see the RSSI and average RSSI on UDP packets with getsockopt() in
> an application program. I had to touch the Atheros driver and a number of
> NetBSD header and c files implementing networking functions such as
> udp4_realinput() and ip_ctloutput().
> 
> And I wrote some codes to pass txpower value from the application program to
> the driver through setsockopt() API, and I could see the value passed to the
> driver by printf. Then, I loaded the new txpower value into the descriptor
> by ath_hal_setuptxdesc(). 
> 
>          ath_hal_setuptxdesc(ah, ds
>                 , pktlen                /* packet length */
>                  , hdrlen                /* header length */
>                  , atype                 /* Atheros packet type */
>                  , ni->ni_txpower        /* txpower */
>                  , txrate, try0          /* series 0 rate/tries */
>                  , keyix                 /* key cache index */
>                  , sc->sc_txantenna      /* antenna mode */
>                  , flags                 /* flags */
>                 , ctsrate               /* rts/cts rate */
>                  , ctsduration           /* rts/cts duration */
> 
> The txpower parameter 'ni->ni_txpower' is replaced by the new value
> 'txpower_set'. Because the type of ni->ni_txpower is u_int16_t and its value
> was zero, I have tested with various txpower_set values: from 0 to 50,
> unsigned short.
> But the RSSI at the receiver did not show any change besides usual 1~2 dB
> fluctuation. When txpower_set was set to 80 and 100, there was no received
> packet (from the power controlled transmitter) at the receiver.
>  When hw.ath0.tpscale was controlled, the receiver's RSSI demonstrated
> correlated change regardless of the descriptor value, txpower_set, given by
> ath_hal_setuptxdesc(). 
> 
> Do you any idea about this?

Did you activate per-packet txpower control with the sysctl?  That is,
did you run 'sysctl -w hw.ath0.tpc=1' ?

> Thank you so much for your helpful answers.

No problem.

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list