Modify

Opened 5 years ago

Closed 4 years ago

#13541 closed defect (fixed)

TL-WR1043nd can't set Tx-Power higher than 5dbm

Reported by: NetCop Owned by: developers
Priority: highest Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: tx-power Cc:

Description

In the May 15th snapshot of Barrier Breaker, the wireless interface of wr1043nd can not be set to any other transmit power than 5dbm regardless of the chosen value.
It will set a higher value eventually after many tries, but it will reset back to 5dbm on reboot.

Attachments (0)

Change History (18)

comment:1 Changed 5 years ago by mars

confirmed r36641, problem only occured at router set as AP (WDS) only - routers configured as Client+AP (WDS) didn't show this issue in my case

comment:2 Changed 5 years ago by NetCop

Indeed it was set as WDS-AP. I haven't done any extensive testing as I had to revert to 12.09 because I need the router up and running.

comment:3 Changed 5 years ago by anonymous

Is this still relevant?

comment:4 Changed 5 years ago by nbd

Please try a newer version

comment:5 Changed 5 years ago by NetCop

r36802 seems to work fine.

comment:6 Changed 5 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 5 years ago by NetCop

Oh, I'm sorry but the problem persists :(
My previous statement was wrong.

comment:8 Changed 5 years ago by NetCop

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:9 Changed 5 years ago by NetCop

As a temporary solution I created a dummy wifi client (connecting nowhere) which allows me to set the desired tx power.

comment:10 Changed 5 years ago by NetCop

Once again I spoke too soon. This client thing broke the AP functionality. But after deleting the client and restarting, the router kept it's TX power setting. Quite odd. Looks like a config bug to me rather than a driver bug.

comment:11 Changed 5 years ago by NetCop

iw phy0 set txpower fixed XXXXX works fine

I think there is something wrong in mac80211.sh

458 txpower="${txpower:-$vif_txpower}"

459 [ -z "$txpower" ]
iw dev "$ifname" set txpower fixed "${txpower%%.*}00"

if I understand this right, it sets the power to XXdbm*100 (XX + two trailing zeroes) which is 10 times less than the desired value so for example 20dbm is set as 2000mdbm

comment:12 Changed 5 years ago by nbd

Please read my comment about this 'mdbm' confusion in that other ticket #12911.

comment:13 Changed 5 years ago by NetCop

My bad, units are correct indeed and mac80211.sh is fine.
The problem is somewhere else.

comment:14 Changed 5 years ago by anonymous

Problem persists in r37018

comment:15 Changed 5 years ago by NetCop

It seems the command iw dev wlan0 set txpower fixed XXXX ... is not always working (works sometimes though)
iw phy phy0 set txpower fixed XXXX on the other hand works just fine. So as a temporary workaround I added the command to the mac80211.sh and so far so good.
I don't know where is the problem. Maybe one of the devs will figure it out.

/lib/wifi/mac80211.sh
.
.
.
458:            txpower="${txpower:-$vif_txpower}"
459:            #[ -z "$txpower" ] || iw dev "$ifname" set txpower fixed "${txpower%%.*}00"
                [ -z "$txpower" ] || iw phy $phy set txpower fixed "${txpower%%.*}00" # This is the new line. It's a dirty fix, but works for me

Regards!

comment:16 Changed 5 years ago by Gorby

The same issue. I figured it out as i started again to play with my router. I could not set txpower more than 17dBm on Buffalo WZR-HP-G300NH (out of the box it supports 30dBm!) with latest trunk and, as far as i remember, any of the previous builds. My atheros drivers patched to override US regulations (http://wiki.openwrt.org/toh/netgear/wndr3700, "Wireless Regulatory Issues" section),

root@DIR-300:~# iw list
Wiphy phy0
        max # scan SSIDs: 4
        max scan IEs length: 2257 bytes
        Coverage class: 0 (up to 0m)
        Device supports RSN-IBSS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
        Available Antennas: TX 0x7 RX 0x7
        Configured Antennas: TX 0x7 RX 0x7
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point
                 * P2P-client
                 * P2P-GO
        Band 1:
                Capabilities: 0x104e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-15
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (30.0 dBm)
                        * 2417 MHz [2] (30.0 dBm)
                        * 2422 MHz [3] (30.0 dBm)
                        * 2427 MHz [4] (30.0 dBm)
                        * 2432 MHz [5] (30.0 dBm)
                        * 2437 MHz [6] (30.0 dBm)
                        * 2442 MHz [7] (30.0 dBm)
                        * 2447 MHz [8] (30.0 dBm)
                        * 2452 MHz [9] (30.0 dBm)
                        * 2457 MHz [10] (30.0 dBm)
                        * 2462 MHz [11] (30.0 dBm)
                        * 2467 MHz [12] (30.0 dBm)
                        * 2472 MHz [13] (30.0 dBm)
                        * 2484 MHz [14] (disabled)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * new_mpath
                 * set_mesh_config
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * join_mesh
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * tdls_mgmt
                 * tdls_oper
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * Unknown command (92)
                 * testmode
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed, WDS, P2P-client } <= 2048, #{ AP, mesh point, P2P-GO } <= 8, #{ IBSS } <= 1,
                   total <= 2048, #channels <= 1, STA/AP BI must match
                 * #{ AP } <= 1,
                   total <= 1, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz }

        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.
        Device supports low priority scan.
        Device supports scan flush.
        Device supports AP scan.

After applying iw dev wlan0 set txpower fixed 3000:

root@DIR-300:~# iw dev wlan0 set txpower fixed 3000
root@DIR-300:~# iwlist txpower
ifb0      no transmit-power information.
gre0      no transmit-power information.
lo        no transmit-power information.
gretap0   no transmit-power information.
teql0     no transmit-power information.
eth1      no transmit-power information.
wlan0     unknown transmit-power information.
          Current Tx-Power=17 dBm       (50 mW)
eth0      no transmit-power information.
ifb1      no transmit-power information.
pppoe-wan  no transmit-power information.
br-lan    no transmit-power information.

Any (?) powers up to 17dBm apply smoothly.

comment:17 Changed 5 years ago by jow

30dBm output power are complete nonesense, stop confusing theoretical reg limits displayed by iw with hardware capabilities. Not a single OpenWrt supported router I'm aware of supports 500mW (!) output power.

comment:18 Changed 4 years ago by nbd

  • Resolution set to fixed
  • Status changed from reopened to closed

fixed in r37983, r37984

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.