Driver not loading for the WPET-236ACN(BT) by Sparklan

support
#1

Hello!

I am having trouble getting the WPET-236ACN(BT) to work.
Background:
Fin 1.1, mPCIE port on the back, but interfaces over USB?
Chipset:
Realtek RTL8822BU-CG
Datasheet:
here

Ultimate purpose? Monitoring mode.

lsusb shows:
Bus 001 Device 005: ID 0bda:b82c Realtek Semiconductor Corp.

iwconfig shows:
nothing relevant

dmesg shows:

Highlights:
[ 366.731232] Bluetooth: hci1: Failed to load rtl_bt/rtl8822b_fw.bin
[ 366.740644] Bluetooth: hci1: rtl: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8822
[ 366.753215] Bluetooth: hci1: rtl: loading rtl_bt/rtl8822b_config.bin
[ 366.761730] bluetooth hci1: Direct firmware load for rtl_bt/rtl8822b_config.bin failed with error -2
[ 366.775018] Bluetooth: Necessary config file rtl_bt/rtl8822b_config.bin not found

Context:

full_log_fin_drivers.log (22.5 KB)

#3

@tacLog, just to clarify, does the WiFi of that mPCIe card work? Driver/firmware files are clearly missing for Bluetooth as you have pointed out. But for WiFi I see the following in the logs:

...
[  366.655084] usb 1-1.2: Product: 802.11ac NIC
[  366.659503] usb 1-1.2: Manufacturer: Realtek
...
[  877.491382] device wlan0 entered promiscuous mode
[  877.544878] device wlan0 left promiscuous mode
[ 1724.972789] device wlan0 entered promiscuous mode
[ 1725.055875] device wlan0 left promiscuous mode
#4

wlan0 is the on board adapter.
So no wifi does not work from the card.

At least best I can tell anyways.

Also the logs are from the host.

-Thomas

#7

Support access granted.

uuid:
908104a18a06ae5e1a3dc13c25e007c7

Anything short of bricking the device is fine. Wipe it, restart it, what every you need. :smile:

Thanks for the clarification @pdcastro
I am actively working on figuring this out myself, but I am way out of my league here.

-Thomas

#8

Update:

Trying to install this package to my primary Alpine container.

#9

@tacLog thank you for granting support access to the device. I think the dmesg output you had shared and the missing ‘.bin’ file are the key to this issue. I am bringing this thread to the attention of our devices team – FYI, there may not be a reply before Monday. I am not sure if we have the ability of adding firmware files through an app container (I’ve found this issue), and it might require a new balenaOS release. But let’s see what the team comes back with.

#12

Hi,

As a test, please try to on your board the following commands and let us know if your wifi starts working:

cd /lib/firmware/
mount -o remount,rw /
mkdir rtl_bt
cd rtl_bt/
wget https://github.com/wkennington/linux-firmware/raw/master/rtl_bt/rtl8822b_config.bin
wget https://github.com/wkennington/linux-firmware/raw/master/rtl_bt/rtl8822b_fw.bin
reboot
#14

Best I can tell this didn’t work.

Though it did get rid of the errors above.

I am reading over the dmesg to try and find any more clues. Will update when I do.

new_dmesg.log (19.8 KB)

#15

The errors around Bluetooth have vanished to be replaced with:

[   10.068602] usbcore: registered new interface driver btusb
[   10.075252] Bluetooth: hci1: rtl: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8822
[   10.085941] Bluetooth: hci1: rtl: loading rtl_bt/rtl8822b_config.bin
[   10.109501] Bluetooth: hci1: rtl: loading rtl_bt/rtl8822b_fw.bin
[   10.202748] Bluetooth: hci1: rom_version status=0 version=2
[   10.210246] Bluetooth: cfg_sz 14, total size 20270

Which by what I understand of the above commands is what we just installed.

I can’t find any major differences between the dmesg of a fin with the adapter and without the adapter other than the text above.

This leads me to believe that somehow the wifi part of the adapter is not loaded or recognized independently of the Bluetooth.

Support access is now granted to a new device:
a49451f78439e9a53876fb5a6172f6ee (has the fix that @spanceac created)

#16

Thanks for sharing the new findings, @tacLog. Is at least Bluetooth working, then? I see two bluetooth devices:

root@a49451f:~# hcitool dev
Devices:
	hci1	00:0E:8E:8D:0B:00
	hci0	AC:3F:A4:DA:47:39

(Where hci0 is the Fin’s built-in BT, and hci1 is the mPCIe BT device – deduced by MAC address similarity with the previous Fin device you had shared with us.)

For WiFi, it may now be a matter of the kernel missing a driver for the RTL8822BU chipset. I’ve found this git repo where someone wrote a driver:

8822BU for Linux - Driver for 802.11ac USB Adapter with RTL8822BU chipset
Only STA/Monitor Mode is supported, no AP.

And we have this sample repo that shows how to build a kernel module and load it (insmod) using an app container. Perhaps you’d like to try: :slight_smile:

We don’t normally advise loading WiFi modules through app containers when the module is required for the device to connect to the internet, because if for any reason the app container failed to start (say, an app bug) and the device was rebooted, this could render the device unreachable. However, in your case, it sounds like the additional WiFi card is for monitoring purposes and not required to connect the device to the internet, in which case it might be OK.

We’ll see also if @spanceac has something to add / other suggestions.

#18

@pdcastro

Only STA/Monitor Mode is supported, no AP.

That perfectly fine!

Also, your right in our case this would be completely fine. I will work on this further this afternoon.
Thank you for your help! I hope this works!
-Thomas