michlinux
Posts: 4
Joined: Mon Apr 11, 2016 1:38 pm

RPI3 won't use 40mhz wifi channel width

Mon Apr 11, 2016 2:04 pm

I have been trying to connect my rpi3 to my AP @ 150mbit, however I am getting 72mbit, and other than the rate it is working great. Clearly my rpi3 isn't using 40mhz channel, everything I have found suggests the BCM43438 should fully support 150mbit/40mhz/fat channels. However phy layer and NVRAM firmware file makes it look like the driver/firmware doesn't support it yet. Has anyone successfully used 40mhz bands on the RPI3? Can anyone shine a light on this problem?

Code: Select all

wlan0     IEEE 802.11bgn  ESSID:"XXXXXXXX"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 9C:C1:72:F4:31:5A
          Bit Rate=72.2 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=61/70  Signal level=-49 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:1927  Invalid misc:0   Missed beacon:0

Code: Select all

iw wlan0 station dump
Station XX:XX:XX:XX:XX:XX (on wlan0)
        inactive time:  0 ms
        rx bytes:       3919818827
        rx packets:     6473534
        tx bytes:       349515425
        tx packets:     2184210
        tx failed:      1929
        signal:         -48 [-48] dBm
        tx bitrate:     72.2 MBit/s
        rx bitrate:     65.0 MBit/s
        authorized:     yes
        authenticated:  yes
        WMM/WME:        yes
        TDLS peer:      yes
No HT40 listed under PHY:

Code: Select all

iw phy:
Wiphy phy0
        max # scan SSIDs: 10
        max scan IEs length: 2048 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports roaming.
        Device supports T-DLS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
                * CMAC (00-0f-ac:6)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * P2P-client
                 * P2P-GO
                 * P2P-device
        Band 1:
                Capabilities: 0x1020
                        HT20
                        Static SM Power Save
                        RX HT20 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
20MHz BW mode???

Code: Select all

# cat /lib/firmware/brcm/brcmfmac43430-sdio.txt
# NVRAM file for BCM943430WLPTH
# 2.4 GHz, 20 MHz BW mode

# The following parameter values are just placeholders, need to be updated.
manfid=0x2d0
prodid=0x0727
vendid=0x14e4
devid=0x43e2

michlinux
Posts: 4
Joined: Mon Apr 11, 2016 1:38 pm

Re: RPI3 won't use 40mhz wifi channel width

Wed Apr 20, 2016 7:45 am

I have tried a number of different distributions, and kernel versions without any change. I wanted to try a different firmware version for the wifi, but I can't seam to find any different versions. Is everyone that is using wifi on rpi3 in the same boat, only being able to get 20mhz/72mbps?

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPI3 won't use 40mhz wifi channel width

Wed Apr 20, 2016 8:08 am

michlinux wrote:I have tried a number of different distributions, and kernel versions without any change. I wanted to try a different firmware version for the wifi, but I can't seam to find any different versions. Is everyone that is using wifi on rpi3 in the same boat, only being able to get 20mhz/72mbps?
Yes, all RPi3 shipped with WiFi module capable of MCS07 20MHz channel, no 40MHz channel. Dunno if the module's firmware will (or even can) be upgraded to support 40MHz for 150Mbps in the future.

Vaishnavi
Posts: 1
Joined: Thu Apr 21, 2016 8:38 pm

Re: RPI3 won't use 40mhz wifi channel width

Fri Apr 22, 2016 6:08 pm

I want to modify the Wi-Fi driver configuration, but i am unable to find the file to modify. Under which directory do i find it ?

tantalus
Posts: 2
Joined: Thu Jan 04, 2018 9:14 am

Re: RPI3 won't use 40mhz wifi channel width

Fri Nov 08, 2019 6:23 pm

Hi, I know this is an old thread but maybe it helps someone.
I found out that the driver is buggy. The hardware can do HT40, of course.
Use this patch.

Code: Select all

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index d541d8af..8609e830 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6003,7 +6003,8 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
 		band_bwcap.bw_cap = cpu_to_le32(WLC_BW_CAP_40MHZ);
 		err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap,
 					       sizeof(band_bwcap));
-	} else {
+	}
+	if (err) {
 		brcmf_dbg(INFO, "fallback to mimo_bw_cap\n");
 		val = WLC_N_BW_40ALL;
 		err = brcmf_fil_iovar_int_set(ifp, "mimo_bw_cap", val);

youling257
Posts: 1
Joined: Mon Mar 23, 2020 10:06 am

Re: RPI3 won't use 40mhz wifi channel width

Mon Mar 23, 2020 10:12 am

tantalus wrote:
Fri Nov 08, 2019 6:23 pm
Hi, I know this is an old thread but maybe it helps someone.
I found out that the driver is buggy. The hardware can do HT40, of course.
Use this patch.

Code: Select all

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index d541d8af..8609e830 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6003,7 +6003,8 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
 		band_bwcap.bw_cap = cpu_to_le32(WLC_BW_CAP_40MHZ);
 		err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap,
 					       sizeof(band_bwcap));
-	} else {
+	}
+	if (err) {
 		brcmf_dbg(INFO, "fallback to mimo_bw_cap\n");
 		val = WLC_N_BW_40ALL;
 		err = brcmf_fil_iovar_int_set(ifp, "mimo_bw_cap", val);
with this patch support HT40, but it still 20MHZ because nvram.txt is "2.4 GHz, 20 MHz BW mode".

# iw phy
Wiphy phy2
Band 1:
Capabilities: 0x1022
HT20/HT40
Static SM Power Save
RX HT20 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40

iw wlan0 station dump
tx bitrate: 24.0 MBit/s
rx bitrate: 58.5 MBit/s

bmichaelb
Posts: 12
Joined: Tue Jun 18, 2019 3:05 am

Re: RPI3 won't use 40mhz wifi channel width

Wed Jun 03, 2020 7:36 am

I went through this with a 'TP-Link Archer T4UH High Gain Wireless Dual Band USB Adapter (AC1200)' , capable of 20/40/80, with a max of 866Mbps. The only way I could get anything higher than 72Mbps was to use hostapd.conf. That allowed me to set the channel width. Mind you I was setting up a wireless NAS for my Oculus Quest, and couldn't configure it manually, so I cheated by installing RaspAP, then just modifying the needed files. After that, I have an 866Mbps connection to my headset. :) Only problem is, that's with the 'older' Raspbian from a few months ago, not the 'newer' Raspberry Pi OS from a few days ago...the RaspAP app updated somehow, and now I can't even get an access point, let alone 866Mbps. Strangely, adding 'dtoverlay=pi3-disable-wifi' to the /boot/config.txt seems to disable my usb wifi dongle as well as the onboard wifi, and I'm not sure why. Never had that issue before. :p

Code: Select all

$ sudo nano /etc/hostapd/hostapd.conf

driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=OcuPi
hw_mode=a
wmm_enabled=0
macaddr_acl=0
interface=wlan0
wpa=2
auth_algs=1
wpa_key_mgmt=WPA-PSK
wpa_passphrase=ChangeMe
wpa_pairwise=TKIP
rsn_pairwise=CCMP
country_code=CA
ignore_broadcast_ssid=0

# N
ieee80211n=1
require_ht=1
ht_capab=[MAX-AMSDU-3839][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]

# AC
ieee80211ac=1
require_vht=1
ieee80211d=1
#ieee80211h=0
ieee80211h=1
#vht_capab=[MAX-AMSDU-3839][SHORT-GI-80]
vht_capab=[MAX-AMSDU-11454][MAX-A-MPDU-LEN-EXP7][SHORT-GI-80]
vht_oper_chwidth=1
channel=44
vht_oper_centr_freq_seg0_idx=50

Return to “Troubleshooting”