Looking for something?

In Starndard
Optimize my pi wi fi

Raspberry Pi wifi on enterprise wifi hardware

I've been poking around to get stable wifi with my raspberry pi devices on my Aruba Networks wireless network. My network is far from a typical house solution. I have a rack, a server, Juniper router, Juniper switch, and an Aruba Networks wifi controller, with an access point on each floor of our house.

Having multiple access points all broadcast the same SSID seems to have uncovered an issue with the Raspberry Pi 3's Broadcom brcmfmac firmware/kernel module.

The issue I was experiencing was that the wifi would constantly connect/disconnect, then eventually loose connectivity entirely. I ended up using a 8192cu based USB adapter to overcome the issue. However, with a little poking around, I think I have solved the issue, thanks to a suggestion from @ukscone.

I looked at the module options for the brcmfmac kernel module:

systool -a -v -m brcmfmac

Module = "brcmfmac"

  Attributes:
    coresize            = "186343"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "0"
    srcversion          = "B33E7691EAF20C9A34D6807"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    alternative_fw_path = 
    debug               = "0"
    fcmode              = "0"
    roamoff             = "1"

  Sections:
    .ARM.exidx.exit.text= "0x7f2ee574"
    .ARM.exidx.init.text= "0x7f2ee550"
    .ARM.exidx          = "0x7f2ef6d4"
    .ARM.extab.exit.text= "0x7f2ee568"
    .ARM.extab          = "0x7f2ee57c"
    .ARM.extab.init.text= "0x7f2ee52c"
    .alt.smp.init       = "0x7f2ee504"
    .bss                = "0x7f2f1140"
    .data               = "0x7f2f0264"
    .data.unlikely      = "0x7f2f0f28"
    .exit.text          = "0x7f2e6de0"
    .gnu.linkonce.this_module= "0x7f2f0f40"
    .init.text          = "0x7f306000"
    .note.gnu.build-id  = "0x7f2e6e04"
    .rodata.str         = "0x7f2e86e0"
    .rodata             = "0x7f2e6e28"
    .rodata.str1.4      = "0x7f2e8c9c"
    .strtab             = "0x7f30e17c"
    .symtab             = "0x7f30609c"
    .text               = "0x7f2c9000"
    __bug_table         = "0x7f2e8ab0"
    __mcount_loc        = "0x7f2edf3c"
    __param             = "0x7f2edeb0"

Not a lot to run on compared to the HUGE amount that the 8192cu module has, but there was the one for roamoff, so I tried setting that and surprisingly it seems to have resolved the issues on my wifi network!


Turn off firmware roaming support

Create /etc/modprobe.d/brcmfmac.conf and add the following:

options brcmfmac roamoff=1  

For the sake of compliance, I also edited /etc/default/crda and set REGDOMAIN to US (my wifi equipment is set for US; you would set this to your country code)

REGDOMAIN=US  

In addition to applying the module config, I suggest disabling power save and bluetooth if you don't need it.


Disable wifi power saving mode

Edit /etc/network/interfaces and add up iw wlan0 set power_save off to your wlan0 definition:

allow-hotplug wlan0  
iface wlan0 inet manual  
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    up iw wlan0 set power_save off

Disable Raspberry Pi 3's bluetooth

Edit /boot/config.txt and append dtoverlay=pi3-disable-bt to the end of the file.

Then as root (sudo -i) disable the bluetooth services:

systemctl disable bluetooth.service  
systemctl disable hciuart.service  

My 8192cu USB config

I'm including this here as a resource also. I found that the 8192cu connectivity to my Aruba Networks wifi was also very spotty until I did the following.

Create /etc/modprobe.d/8192cu.conf and add the following:

options 8192cu rtw_power_mgnt=0 rtw_enusbss=0  

My r8188eu (HubPiWi) config

Same as the 8192cu, to ensure reliable a consistent wifi connection, we do the following.

Create /etc/modprobe.d/r8188eu.conf and add the following:

options r8188eu rtw_power_mgnt=0 rtw_enusbss=0  
0 Comments 10 September 2016
Daniel Chote

Daniel Chote

Daniel Chote, the Code Monkey, Cat Herder, Maker, H4x0r, uav pilot, sim racer, bullshit artist and dad. Made in Hastings, New Zealand... Now living in the USA!

Related Post

Comments powered by Disqus