Wifi not working after firmware, unable to bring up interfac

You have a problem with your Wandboard and want to ask the community for help.

Wifi not working after firmware, unable to bring up interfac

Postby bcattle » Thu Jun 19, 2014 4:41 am

Hi all,

Having a tricky problem getting WiFi started up on my Wandboard rev C1. I can see the interface in "ifconfig -a" and "ip link" but if I try to bring it up with "ip link set wlan0 up" it fails with the message "RTNETLINK answers: Operation not permitted" and the driver spews all sorts of error messages out in the kernel log. My apologies, this post is rather long.

My setup:

I installed Arch Linux using the instructions at http://archlinuxarm.org/platforms/armv7/freescale/wandboard#qt-platform_tabs-ui-tabs2 and am running the stock kernel.

Code: Select all
root ~ # uname -r
3.10.17-2-ARCH


I then installed firmware according to the instructions at http://archlinuxarm.org/forum/viewtopic.php?t=6692.

Question #1: Tapani's directions with the SDK (pdf here https://github.com/bcattle/wandboard-docs/raw/master/wand-dev.pdf) say

There is a driver patch that will load firmware files with different names depending on the wifi chip type. Using this driver, the filesystem needs to contain the firmware files for both 4329 and 4330 (with specific names and paths), and the driver will then automatically load the right firmware.

Just make sure the firmware and nvram files are located in /lib/ rmware/brcm/, with filenames:
 bcm4329 fw.bin
 bcm4329 nvram.txt
 bcm4330 fw.bin
 bcm4330 nvram.txt


This doesn't work with the Arch Linux stock kernel (linux-wandboard package, version 3.10.17-2). This kernel expects the firmware in the generic location as described by http://wireless.kernel.org/en/users/Drivers/brcm80211#Broadcom_brcmsmac_driver:

In kernel priors to v3.13 the SDIO driver used generic firmware names. Below are the instruction Use the nvram file installed in your system and copy it to /lib/firmware/brcm/brcmfmac-sdio.txt The firmware can be found in the linux-firmware repository.

For 4329: cp brcm/brcmfmac4329.bin /lib/firmware/brcm/brcmfmac-sdio.bin
For 4330: cp brcm/brcmfmac4330.bin /lib/firmware/brcm/brcmfmac-sdio.bin


Was there a patch that perhaps should be applied to the Arch Linux Wandboard Kernel to get the driver-detection feature?

Once I renamed the firmware, everything boots up great. In dmesg I see

Code: Select all
root ~ # dmesg | grep brcm
[    9.453933] brcmfmac: F1 signature read @0x18000000=0x16044330
[    9.881181] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 25 2011 19:34:12 version 5.90.125.104
[    9.895307] brcmfmac: brcmf_fws_init: enabled bdcv2 tlv signaling [1]
[    9.904349] usbcore: registered new interface driver brcmfmac


I can see the interface in "ip link":

Code: Select all
root ~ # ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 00:1f:7b:b4:0b:9c brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether fc:4d:d4:c5:28:72 brd ff:ff:ff:ff:ff:ff


And I can see it in "ifconfig -a":

Code: Select all
root ~ # ifconfig -a
...
wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether fc:4d:d4:c5:28:72  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


The Problem

When I try to bring up the interface, I get an error:

Code: Select all
root ~ # ip link set wlan0 up
RTNETLINK answers: Operation not permitted


A look at dmesg shows that the driver was spewing tons of error messages into the kernel log:

Code: Select all
root ~ # dmesg | grep brcm
...
[ 9995.949923] brcmfmac: brcmf_sdbrcm_bus_rxctl: resumed on timeout
[ 9995.954646] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9995.964012] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9995.973415] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9995.980745] brcmfmac: brcmf_sdio_regrw_helper: failed with -123
[ 9995.985365] brcmfmac: brcmf_sdbrcm_htclk: HT Avail request error: -123
[ 9995.990610] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000a=00, Err: -123
[ 9995.999915] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000a=00, Err: -123
[ 9996.009247] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000a=00, Err: -123
[ 9996.016586] brcmfmac: brcmf_sdcard_set_sbaddr_window: failed at addr:0x1000a
[ 9996.022388] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000a=00, Err: -123
[ 9996.031725] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000a=00, Err: -123
[ 9996.041058] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000a=00, Err: -123
[ 9996.048370] brcmfmac: brcmf_sdcard_set_sbaddr_window: failed at addr:0x1000a
[ 9996.054136] brcmfmac: brcmf_sdio_ramrw: FAILED to set window back to 0x18000000
[ 9996.060156] brcmfmac: brcmf_fil_cmd_data: Failed err=-110
[ 9996.064260] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[ 9996.070109] brcmfmac: brcmf_dongle_scantime: Scan assoc time error (-5)
[ 9996.070123] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[ 9996.081266] brcmfmac: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[ 9996.087101] brcmfmac: brcmf_netdev_open: failed to bring up cfg80211
[ 9996.719980] brcmfmac: brcmf_btcoex_boost_wifi: attempted to restore not saved BTCOEX params
[ 9996.780085] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9996.789430] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9996.798801] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9996.806137] brcmfmac: brcmf_sdio_regrw_helper: failed with -123
[ 9996.810777] brcmfmac: brcmf_sdbrcm_htclk: HT Avail request error: -123
[ 9996.816015] brcmfmac: brcmf_sdioh_request_word: Failed to write word, Err: 0xffffff85
[ 9996.824582] brcmfmac: brcmf_sdioh_request_word: Failed to write word, Err: 0xffffff85
[ 9996.833152] brcmfmac: brcmf_sdioh_request_word: Failed to write word, Err: 0xffffff85
[ 9996.839682] brcmfmac: brcmf_sdio_regrw_helper: failed with -123
[ 9996.844321] brcmfmac: brcmf_sdioh_request_byte: Failed to read byte F1:@0x1000e=ff, Err: -123
[ 9996.853589] brcmfmac: brcmf_sdioh_request_byte: Failed to read byte F1:@0x1000e=ff, Err: -123
[ 9996.862850] brcmfmac: brcmf_sdioh_request_byte: Failed to read byte F1:@0x1000e=ff, Err: -123
[ 9996.870097] brcmfmac: brcmf_sdio_regrw_helper: failed with -123
[ 9996.874720] brcmfmac: brcmf_sdbrcm_bus_stop: Failed to force clock for F2: err -123
[ 9996.881097] brcmfmac: brcmf_sdioh_f0_write_byte: Disable F2 failed:-5
[ 9996.886241] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F0:@0x00002=02, Err: -5
[ 9996.895416] brcmfmac: brcmf_sdioh_f0_write_byte: Disable F2 failed:-5
[ 9996.900574] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F0:@0x00002=02, Err: -5
[ 9996.909729] brcmfmac: brcmf_sdioh_f0_write_byte: Disable F2 failed:-5
[ 9996.914891] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F0:@0x00002=02, Err: -5
[ 9996.922043] brcmfmac: brcmf_sdio_regrw_helper: failed with -5
[ 9996.926492] brcmfmac: brcmf_sdioh_request_word: Failed to write word, Err: 0xffffff85
[ 9996.935060] brcmfmac: brcmf_sdioh_request_word: Failed to write word, Err: 0xffffff85
[ 9996.943629] brcmfmac: brcmf_sdioh_request_word: Failed to write word, Err: 0xffffff85
[ 9996.950187] brcmfmac: brcmf_sdio_regrw_helper: failed with -123
[ 9996.954992] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9996.964348] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9996.973702] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123
[ 9996.981031] brcmfmac: brcmf_sdio_regrw_helper: failed with -123
[ 9996.985652] brcmfmac: brcmf_sdbrcm_htclk: HT Avail request error: -123
[ 9997.163830] brcmfmac: F1 signature read @0x18000000=0x16044330
[ 9997.491367] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 25 2011 19:34:12 version 5.90.125.104
[ 9997.514755] brcmfmac: brcmf_fws_init: enabled bdcv2 tlv signaling [1]


Any ideas what could be wrong? Am I somehow using the wrong version of the brcmfmac driver for this kernel?

Thanks, and apologies for the long post.
Bryan
bcattle
 
Posts: 5
Joined: Sun Jun 15, 2014 9:24 pm

Re: Wifi not working after firmware, unable to bring up interfac

Postby Tapani » Fri Jun 20, 2014 9:19 am

The wifi firmware is two files, a NVRAM txt file and a binary firmware (the bin file).
You seem to only have copied over the binary one, and not the settings.
If you are unsure of the firmware you are having, try the binary files in the source code package (in the downloads section).

And yes, the firmware naming after chip is a custom driver hack by us.
Tapani
Site Admin
 
Posts: 705
Joined: Tue Aug 27, 2013 8:32 am

Re: Wifi not working after firmware, unable to bring up interfac

Postby darin » Fri Jun 20, 2014 10:35 pm

I see the same problem here. I'm using 3.10.17 (hf). I copied the files into the /lib/firmware/brcm folder, renamed them to brcmfmac-sdio.bin, and brcmfmac-sdio.txt respectively. Checked dmesg | grep brcm and ensured the driver loads the firmware.

Everything proceeds as expected (including 'ip link set wlan0 up') until I run the wpa_supplicant stuff (wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -B). Then I get similar messages as bcattle above.

The ubuntu image (3.0.101) on the main downloads page appears to operate properly.
darin
 
Posts: 1
Joined: Fri Jun 20, 2014 10:23 pm

Re: Wifi not working after firmware, unable to bring up interfac

Postby bcattle » Sat Jun 21, 2014 9:46 pm

Thanks for the replies. Glad to hear someone else is having this problem ;)

@Tapani: I have the nvram installed correctly as "brcmfmac-sdio.txt". If I remove that file, I get errors on boot like

Code: Select all
brcmfmac: brcmf_sdbrcm_download_code_file: Fail to request firmware -2
brcmfmac: _brcmf_sdbrcm_download_firmware: dongle image file download failed


I've tried four different versions of the driver. The newest are the versions from the Android repository.

Version #1: Android repo
Filename: fw_bcm4330_abg.bin (available here: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/47a3b8f496e6d2a836ac6b7268e5626c969542ec/bcmdhd/firmware/bcm4330/)
Size: 223581
Version: 5.90.195.114
Date: Jan 23 2013 17:46:35

Version #2: Android repo
Filename: fw_bcm4330_bg.bin (available here: https://android.googlesource.com/platform/hardware/broadcom/wlan/+/47a3b8f496e6d2a836ac6b7268e5626c969542ec/bcmdhd/firmware/bcm4330/)
Size: 211548
Version: 5.90.195.114
Date: Jan 23 2013 17:47:32

Version #3: linux-firmware repo
Filename: brcmfmac4330-sdio.bin (available here: http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/brcm)
Size: 222126
Version: 5.90.125.104
Date: Oct 25 2011 19:34:12

Version #4: Tapani's Wandboard SDK zip file
Filename: bcm4330_fw.bin (available here: http://wandboard.org/images/downloads/wandboard-sdk-20140519.tar.xz)
Size: 169594
Version: 5.90.125.94
Date: Oct 5 2011 14:41:51

All four drivers boot successfully, then produce substantially the same error messages upon "ip link set wlan0 up".

For all of the above, I'm using the nvram file from Tapani's SDK package, "bcm4330_nvram.txt" size 1791.

One odd thing I noticed is with the errors you get. You see a lot of stuff like

Code: Select all
[16629.564644] brcmfmac: brcmf_sdioh_request_byte: Failed to write byte F1:@0x1000e=10, Err: -123


Then you get

Code: Select all
[16630.601090] mmc1: card 0001 removed
[16630.673613] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[16630.679475] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[16630.685365] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[16630.692582] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[16630.701182] mmc1: queuing unknown CIS tuple 0x80 (11 bytes)
[16630.754711] mmc1: new high speed SDIO card at address 0001


I don't know enough about the board yet to know what the correlation is between the GPIO used for the WiFi and mmc1, but I'll take a look at that next.
bcattle
 
Posts: 5
Joined: Sun Jun 15, 2014 9:24 pm

Re: Wifi not working after firmware, unable to bring up interfac

Postby PLyttle » Thu Jun 26, 2014 1:51 pm

Archlinux uses a devicetree. Board rev C1 is wired differently than a rev B1; You need to patch the devicetree to implement these changes.

I made a patch, It;s already on this board, here: viewtopic.php?f=8&t=440&sid=b49b7de10d696605c91630681bd9767a#p2079.

You need dtc to decompile the binary device tree blob (dtb) and then compile the source (dts) back into the dtb
If you need detailed instructions, let me know.

LP
PLyttle
 
Posts: 95
Joined: Thu Jun 26, 2014 12:29 pm

Re: Wifi not working after firmware, unable to bring up interfac

Postby bcattle » Thu Jun 26, 2014 10:30 pm

Brilliant! Thanks so much
bcattle
 
Posts: 5
Joined: Sun Jun 15, 2014 9:24 pm

Re: Wifi not working after firmware, unable to bring up interfac

Postby PLyttle » Fri Jun 27, 2014 6:56 am

Glad to be of service, you know what to do?
LP
PLyttle
 
Posts: 95
Joined: Thu Jun 26, 2014 12:29 pm

Re: Wifi not working after firmware, unable to bring up inte

Postby Mashallah » Tue Feb 23, 2016 12:02 pm

I have the nvram installed correctly as "brcmfmac-sdio.txt". If I remove that file, I get errors on boot like ????
Mashallah
 
Posts: 1
Joined: Tue Feb 23, 2016 12:00 pm

Re: Wifi not working after firmware, unable to bring up inte

Postby dinhly » Wed Sep 27, 2017 9:20 am

So informative subjects are provided proper right here, I sincerely glad to look at this put up, I modified into definitely I get hold of as actual with you. This positioned up is genuinely inspirational. I like your publish and all you percent with us is up to date and pretty informative herbal fertility supplements.
https://raovatbds24h.com/
dinhly
 
Posts: 2
Joined: Wed Sep 27, 2017 9:18 am

Re: Wifi not working after firmware, unable to bring up inte

Postby dinhly » Thu Sep 28, 2017 8:40 am

Thanks for taking the time to talk about th[*]at, I simply experience strongly about it and love gaining knowledge of greater on that topic. If possible, as you gain competence, may you mind updating your weblog with greater data? It is mainly useful for me.
https://traodoiraovat.com
dinhly
 
Posts: 2
Joined: Wed Sep 27, 2017 9:18 am

Next

Return to Getting started

Who is online

Users browsing this forum: No registered users and 13 guests