You are not logged in.

#1 2021-07-13 01:46:18

sept
Member
Registered: 2021-07-08
Posts: 7

[SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

*** Final Edit: See 2021-07-23 Comment Below ***


Edit: All the "Pi" type SBCs are ARM, but this one is actually a 64bit x86 Intel CPU.

I'm building an SBC (single-board computer) wireless router, but the wifi .bin and .txt files that I manually copied to /lib/firmware/brcm/ are not being loaded. Instead, the kernel is trying to load files that don't even exist. Why?

Non-existent files are at the bottom (brcmfmac):

# dmesg| grep firmware
[    0.189605] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    6.978752] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    7.931396] atomisp-isp2 0000:00:03.0: Direct firmware load for shisp_2401a0_v21.bin failed with error -2
[    7.931407] atomisp-isp2 0000:00:03.0: atomisp: Error -2 while requesting firmware shisp_2401a0_v21.bin
[    8.263764] sof-audio-acpi-intel-byt 808622A8:00: Direct firmware load for intel/sof/sof-cht.ri failed with error -2
[    8.263785] sof-audio-acpi-intel-byt 808622A8:00: error: request firmware intel/sof/sof-cht.ri failed err: -2
[    8.267466] sof-audio-acpi-intel-byt 808622A8:00: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
[    8.271331] sof-audio-acpi-intel-byt 808622A8:00: error: failed to load DSP firmware -2
[    8.458050] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.Radxa-ROCK Pi X.txt failed with error -2
[    8.458116] brcmfmac mmc2:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2

The files I copied are the top and bottom one (the files the kernel is trying to load don't exist):

# ls /lib/firmware/brcm | grep 43455
brcmfmac43455c0-sdio.bin
brcmfmac43455-sdio.bin
brcmfmac43455-sdio.clm_blob
brcmfmac43455-sdio.MINIX-NEO Z83-4.txt
brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
brcmfmac43455-sdio.raspberrypi,4-model-b.txt
brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt
brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt
brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.txt

Driver Link (the third relevant file, the .hcd Bluetooth driver file, seems to be loading fine):
https://wiki.radxa.com/RockpiX/downloads

Board Specs (Model B):
https://wiki.radxa.com/RockpiX/getting_ … tart_specs

Can someone explain why this is happening? How does the kernel decide what files to look for, and why is it trying to load files that don't exist? How do I solve this problem correctly?

Last edited by sept (2021-07-23 15:46:04)

Offline

#2 2021-07-13 01:57:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,622
Website

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

Arch ARM is a separate distribution, please ask on their boards: https://bbs.archlinux.org/viewtopic.php?id=153431

Nvm: didn't realise it was 64bit.

Last edited by jasonwryan (2021-07-13 01:59:51)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Online

#3 2021-07-13 02:00:45

sept
Member
Registered: 2021-07-08
Posts: 7

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

jasonwryan: Rock Pi X is x86 and 64bit:

64bits Quad Core X86 Processor
Intel Atom x5-Z8350 Cherry Trail

https://wiki.radxa.com/RockpiX/getting_ … tart_specs

Last edited by sept (2021-07-13 02:06:47)

Offline

#4 2021-07-13 03:23:34

loqs
Member
Registered: 2014-03-06
Posts: 13,871

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

Offline

#5 2021-07-13 03:37:22

sept
Member
Registered: 2021-07-08
Posts: 7

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

"I added some files from some users, now the wifi is working, but it can only connect to my mobilephone hotpoint but can't connect to other wifi"

https://bbs.archlinux.org/viewtopic.php?id=266763

I was hoping for a better solution than "I added some files from some users".

I wanted to learn how to solve this properly. Is there no way to force the kernel to load the files I copied from the manufacturers website? I have no experience with kernel modules or drivers. I'm a bit of a newb.

Offline

#6 2021-07-13 03:44:36

loqs
Member
Registered: 2014-03-06
Posts: 13,871

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

What if you rename 'brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.txt' to 'brcmfmac43455-sdio.Radxa-ROCK Pi X.txt'
or 'brcmfmac43455-sdio.bin' to 'brcmfmac43455-sdio.txt'

Offline

#7 2021-07-13 03:52:14

sept
Member
Registered: 2021-07-08
Posts: 7

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

If there's no other way, then I would do that. I wanted to learn a little about how kernel loading works. I was hoping someone could give me some background about why it behaves this way. Why does the kernel insist on filenames that don't exist? Is there a naming convention that the manufacturer just ignored?

Offline

#8 2021-07-13 04:05:11

loqs
Member
Registered: 2014-03-06
Posts: 13,871

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

The code for brcmfmac firmware loading is https://github.com/torvalds/linux/blob/ … firmware.c
`modinfo  brcmfmac` shows a debug option so loading the module with debug=16777215 (debug looks to be a bit mask and 1677215=0XFFFFFF should cover every bit used so you will get all debug which may well be too much).

Offline

#9 2021-07-13 12:16:33

sept
Member
Registered: 2021-07-08
Posts: 7

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

COULD NEVER GET WLAN0 TO WORK AS AN ACCESS POINT (WHICH WAS THE GOAL). I'M USING A WIFI DONGLE INSTEAD (RTL88x2bu). I CAN START HOSTAPD WITH THAT HARDWARE.

Download the latest "WiFi & BT Firmware" file (named AP6255_BT_WIFI_Firmware.zip in my case) and extract it:

https://wiki.radxa.com/RockpiX/downloads

Next, copy the extracted .hcd file from the 'bt' directory and the .txt and .bin files from the 'wifi' directory to /lib/firmware/brcm/. Then rename the .txt file to brcmfmac43455-sdio.txt. The Bluetooth .hcd file should load fine without any name change. I did not rename the .bin file. My guess is that it's ignored because there already is a proper .bin file for that WiFi hardware in the brcm directory:  /lib/firmware/brcm/brcmfmac43455-sdio.bin. Finally, reboot. The driver should load automatically.

# cp ~/Downloads/AP6255_BT_WIFI_Firmware/BT_WIFI_Firmware/bt/BCM4345C0.hcd /lib/firmware/brcm
# cp cp /home/user1/Downloads/AP6255_BT_WIFI_Firmware/BT_WIFI_Firmware/wifi/brcmfmac43455-sdio.ROCK\ Pi-ROCK\ Pi\ X.txt /lib/firmware/brcm
/lib/firmware/brcm
# cp ~/Downloads/AP6255_BT_WIFI_Firmware/BT_WIFI_Firmware/wifi/brcmfmac43455c0-sdio.bin /lib/firmware/brcm

# mv /lib/firmware/brcm/brcmfmac43455-sdio.ROCK\ Pi-ROCK\ Pi\ X.txt brcmfmac43455-sdio.txt

# reboot

Now when I do the command:

# ip addr

I get an entry for wlan0.

Last edited by sept (2021-07-19 23:02:56)

Offline

#10 2021-07-23 16:50:39

sept
Member
Registered: 2021-07-08
Posts: 7

Re: [SOLVED] Rock Pi X WiFi Works, but Terrible (See 2021-07-23 Comment)

I was able to get the Rock Pi X's WiFi working, but I wouldn't recommend it. If you insist on using the onboard WiFi, see the instruction at the end. The performance and range of the onboard WiFi are terrible. Instead, get a USB WiFi dongle sold by:

http://pandawireless.com/

The Panda Wireless drivers are plug-and-play as the rt2800usb driver is in the mainline kernel according to this site:

https://www.elinux.org/RPi_USB_Wi-Fi_Adapters

I will confirm this once I receive my Panda Wireless dongle.

IF YOU INSIST ON USING THE ONBOARD WIFI, FOLLOW THESE INSTRUCTION. NOTE: USE THE PKGBUILD FILE BELOW, OR EDIT THE ONE FROM THE AUR. IF YOU USE THE ONE FROM THE AUR, YOUR INSTALLATION WILL FAIL.

You can either edit the PKGBUILD file yourself, or just copy and paste the file below to an empty PKGBUILD file. To edit it yourself, clone the package using 'git clone https://aur.archlinux.org/rockpix-ap6255.git' then replace all '/lib/firmware/' with '/usr/lib/firmware/', and finally, build/install the package: 'makepkg -si'.

Or, you can just copy and paste the text below to a PKGBUILD text file, and put it into your build directory, and build/install using 'makepkg -si':

# Maintainer: Malacology <guoyizhang at malacology dot com>
# Contributor: Malacology <guoyizhang at malacology dot com>

pkgname=rockpix-ap6255
pkgver=1.0
pkgrel=1
pkgdesc="WiFi & BT Firmware patch for ROCK PI X"
arch=('x86_64')
url="https://wiki.radxa.com/RockpiX/downloads"
license=('custom')
depends=(
	'linux-firmware'
)
source=("https://dl.radxa.com/rockpix/drivers/firmware/AP6255_BT_WIFI_Firmware.zip")
sha256sums=('1b9434fcdd361b778effe4b510b84e717e3ece7589cfaec55ec8944ef9836003')

package() {
  install -dDm755 "$pkgdir"/usr/lib/firmware/brcm
  cd "$srcdir"/BT_WIFI_Firmware/bt
  install BCM4345C0.hcd "$pkgdir"/usr/lib/firmware/brcm/BCM4345C0.hcd
  cd "$srcdir"/BT_WIFI_Firmware/wifi
  install "brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.txt" "$pkgdir"/usr/lib/firmware/brcm/"brcmfmac43455-sdio.Radxa-ROCK Pi X.txt"
  install "brcmfmac43455-sdio.ROCK Pi-ROCK Pi X.txt" "$pkgdir"/usr/lib/firmware/brcm/brcmfmac43455-sdio.txt
  install brcmfmac43455c0-sdio.bin "$pkgdir"/usr/lib/firmware/brcm/brcmfmac43455-sdio
  install brcmfmac43455c0-sdio.bin "$pkgdir"/usr/lib/firmware/brcm/brcmfmac43455c0-sdio.bin
}

That should work. But like I said above, it's not worth the effort. Get the Panda Wireless dongle instead.

Last edited by sept (2021-07-24 14:11:49)

Offline

Board footer

Powered by FluxBB