Unable to change default bitrate of wireless network interface

Unix & Linux Asked by Tanya Shreedhar on December 6, 2020

I am trying to change the bitrate of my wireless nic (AR9565 driver: ath9k_htc) for experimentation purposes. I am running Ubuntu 14.04 LTS and my card details are as follows:

wlan0     IEEE 802.11abgn  ESSID:"FACULTY-STAFF-N"  
             Mode:Managed  Frequency:5.24 GHz  Access Point: C4:0A:CB:2D:75:5A   
             Bit Rate=240 Mb/s   Tx-Power=17 dBm   
             Retry short limit:7   RTS thr:off   Fragment thr:off
             Power Management:off
             Link Quality=38/70  Signal level=-72 dBm  
             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
             Tx excessive retries:2  Invalid misc:0   Missed beacon:0

To fix the bitrate (9Mbps in this case, but I checked multiple bit rates), I use these commands:

sudo iw dev wlan0 set bitrates legacy-5 9


sudo iwconfig wlan0 rate 9M

I check the maximum bit rate used by wlan0 by iw dev wlan0 link; iwconfig wlan0 and I check the current bitrate used by interface through glances. However, none of these commands seem to have any effect on the bit rate.

This is the information on running iw dev wlan0 link:

Connected to c4:0a:cb:2d:75:55 (on wlan0)
freq: 2462
RX: 420678 bytes (1949 packets)
TX: 144065 bytes (850 packets)
signal: -57 dBm
tx bitrate: 130.0 MBit/s MCS 14 short GI

bss flags:  short-preamble short-slot-time
dtim period:    1
beacon int: 102

The accepted answer to the related question asked here requires me to bring down the interface before I change the rates. However, doing so I encounter the following error:

Error for wireless request "Set Bit Rate" (8B20) :
SET failed on device wlan0 ; Network is down

Also I tried iw list. This command does not return all available rates but returns the current rate.

One Answer

I will be assuming that the WiFi card is called wlan0. I will divide the answer in two parts:

  1. Fixing the Error

Run sudo ifconfig wlan0 up to start the network, because you are getting error : SET failed on device wlan0 ; Network is down

  1. How to change the bitrate properly

Run iwlist wlan0 bitrate first to check what bit rates are supported and the current bitrate is.

Then, iwconfig wlan0 bitrate 24M

Answered by Vedant on December 6, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP