Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get Realtek RTL8723BS WiFi working with Debian Bullseye on Pine A64+?

3,398 views
Skip to first unread message

ore...@disroot.org

unread,
Feb 11, 2021, 10:20:02 PM2/11/21
to
Long story short - Debian was tried. Wifi didn't work. Armbian Bullseye was tried. WiFi worked. All was good, more or less, aside from guilt from sin of using non-free hardware... But then, Distrowatch discussion of Raspberry PiOS rolling out "an update to the distribution which installs a third-party repository for Microsoft's VSCode packages" was observed coincident with Armbian updates querying a new, non-Debian, site. Paranoia or conscience motivated a return to Debian, Bullseye.

Install, convoluted as it was, worked OK. Contrib and non-free were added to /etc/apt/sources.list, despite the shame. firmware-realtek was installed to get RTL8723BS firmware.

Still no Wifi. Firmware is found:

# find ./ -type f -iname rtl8723bs*
./usr/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin
./usr/lib/firmware/rtlwifi/rtl8723bs_nic.bin
./usr/lib/firmware/rtlwifi/rtl8723bs_bt.bin

Modprobe is attempted, but module is not found.

# modprobe rtl8723bs_wowlan.bin
modprobe: FATAL: Module rtl8723bs_wowlan.bin not found in directory /lib/modules/5.10.0-3-arm64

File is copied, but module is still not found.

# cp -p ./usr/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin /lib/modules/5.10.0-3-arm64/

# modprobe rtl8723bs_wowlan.bin
modprobe: FATAL: Module rtl8723bs_wowlan.bin not found in directory /lib/modules/5.10.0-3-arm64

Help? What magic step(s) are being missed?

Thanks!

Some References:

https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64
https://distrowatch.com/weekly.php?issue=20210208#news
https://forum.armbian.com/topic/15594-armbian-loves-microsoft/
https://wiki.pine64.org/wiki/PINE_A64#Datasheets_for_Components_and_Peripherals




RobJE

unread,
Feb 12, 2021, 1:30:02 AM2/12/21
to


Hi,

On 12 February 2021 02:57:41 UTC, ore...@disroot.org wrote:
[SNIP]
>Install, convoluted as it was, worked OK. Contrib and non-free were added to /etc/apt/sources.list, despite the shame. firmware-realtek was installed to get RTL8723BS firmware.
>
>Still no Wifi. Firmware is found:
>
># find ./ -type f -iname rtl8723bs*
>./usr/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin
>./usr/lib/firmware/rtlwifi/rtl8723bs_nic.bin
>./usr/lib/firmware/rtlwifi/rtl8723bs_bt.bin
>
>Modprobe is attempted, but module is not found.
>
># modprobe rtl8723bs_wowlan.bin
>modprobe: FATAL: Module rtl8723bs_wowlan.bin not found in directory /lib/modules/5.10.0-3-arm64

These are firmware files not kernel modules (aka drivers). firmware is normally loaded into the device by kernel module

>File is copied, but module is still not found.
>
># cp -p ./usr/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin /lib/modules/5.10.0-3-arm64/
>
># modprobe rtl8723bs_wowlan.bin
>modprobe: FATAL: Module rtl8723bs_wowlan.bin not found in directory /lib/modules/5.10.0-3-arm64

which is expected as firmware != kernel module

>Help? What magic step(s) are being missed?

had to research a bit myself. are you sure it is a problem with loading kernel modules?
module RTL8723BS is enabled in arm64 kernels.

to check, does `sudo dmesg | grep rtl8723` (without `) show the chip being initialised?

when it does, the problem might be down to configuration of WiFi.

Paul Wise

unread,
Feb 12, 2021, 4:50:02 AM2/12/21
to
On Fri, Feb 12, 2021 at 3:15 AM ore...@disroot.org wrote:

> Debian was tried. Wifi didn't work.
> Armbian Bullseye was tried. WiFi worked.
> Help? What magic step(s) are being missed?

Boot Armbian again and look at the Linux kernel dmesg output to see
which firmware is being loaded. Try to find that in Debian using
apt-file. If it isn't present, try to find it in the upstream Linux
firmware git repo. If it is present then you just need a newer version
of the linux-firmware to get into bullseye. If it isn't present then
Armbian needs to get the missing firmware added upstream, and then it
will later get into Debian.

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/

--
bye,
pabs

https://wiki.debian.org/PaulWise

Arnd Bergmann

unread,
Feb 12, 2021, 5:30:03 AM2/12/21
to
On Fri, Feb 12, 2021 at 3:57 AM <ore...@disroot.org> wrote:
>
> Long story short - Debian was tried. Wifi didn't work. Armbian Bullseye was tried. WiFi worked. All was good, more or less, aside from guilt from sin of using non-free hardware... But then, Distrowatch discussion of Raspberry PiOS rolling out "an update to the distribution which installs a third-party repository for Microsoft's VSCode packages" was observed coincident with Armbian updates querying a new, non-Debian, site. Paranoia or conscience motivated a return to Debian, Bullseye.
>
> Install, convoluted as it was, worked OK. Contrib and non-free were added to /etc/apt/sources.list, despite the shame. firmware-realtek was installed to get RTL8723BS firmware.
>
> Still no Wifi. Firmware is found:
>
> # find ./ -type f -iname rtl8723bs*
> ./usr/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin
> ./usr/lib/firmware/rtlwifi/rtl8723bs_nic.bin
> ./usr/lib/firmware/rtlwifi/rtl8723bs_bt.bin
>
> Modprobe is attempted, but module is not found.
>
> # modprobe rtl8723bs_wowlan.bin
> modprobe: FATAL: Module rtl8723bs_wowlan.bin not found in directory /lib/modules/5.10.0-3-arm64

Can you check if armbian has the same kernel image? It's quite
possible that they
ship a kernel that is different from Debian's and that may have patches to fix
driver bugs in the mainline kernel, or that enables additional modules.

The mainline kernel only has a 'staging' driver for rtl8723bs, the
module name is
'r8723bs.ko'. There are two other drivers for related hardware, the modern
'rtl8xxxu' that only supports USB style devices, and a cleaned-up version of the
driver that is in staging, named 'rtlwifi' that also lacks support for
rtl8723bs but
supports some similar devices.

There are also various out-of-tree drivers for realtek wireless devices that may
have been included in armbian.

Arnd

ore...@disroot.org

unread,
Feb 12, 2021, 1:50:03 PM2/12/21
to
> which is expected as firmware != kernel module

Woops.

> to check, does `sudo dmesg | grep rtl8723` (without `) show the chip being initialised?

No, but at least wired ethernet works:

# dmesg|grep -i rtl
[ 14.614875] dwmac-sun8i 1c30000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211E Gigabit Ethernet] (irq=POLL)

FWIW:

# uname -a
Linux <snipname> 5.10.0-3-arm64 #1 SMP Debian 5.10.13-1 (2021-02-06) aarch64 GNU/Linux
# uname -srvpio
Linux 5.10.0-3-arm64 #1 SMP Debian 5.10.13-1 (2021-02-06) unknown unknown GNU/Linux

Comparing the two above, is an "unknown" a minor bug in uname, or user error?


Poking around some, it seems some rtl8723bs things are there:

:/lib/modules/5.10.0-3-arm64# grep -i rtl8723bs *
grep: kernel: Is a directory
modules.alias:alias of:N*T*Crealtek,rtl8723bs-btC* hci_uart
modules.alias:alias of:N*T*Crealtek,rtl8723bs-bt hci_uart
modules.dep:kernel/drivers/staging/rtl8723bs/r8723bs.ko: kernel/net/wireless/cfg80211.ko kernel/net/rfkill/rfkill.ko
grep: modules.dep.bin: binary file matches
modules.order:kernel/drivers/staging/rtl8723bs/r8723bs.ko

# ls -F kernel/net/wi*
kernel/net/wimax:
wimax.ko

kernel/net/wireless:
cfg80211.ko lib80211_crypt_ccmp.ko lib80211_crypt_tkip.ko lib80211_crypt_wep.ko lib80211.ko


> Boot Armbian again and look at the Linux kernel dmesg output to see
which firmware is being loaded. Try to find that in Debian using
apt-file.

> Can you check if armbian has the same kernel image?


# uname -a
Linux <snipname> 5.10.12-sunxi64 #21.02.1 SMP Wed Feb 3 20:42:58 CET 2021 aarch64 GNU/Linux
# uname -srvpio
Linux 5.10.12-sunxi64 #21.02.1 SMP Wed Feb 3 20:42:58 CET 2021 unknown unknown GNU/Linux

Armbian does the "unknown" thing too.

# dmesg|grep -i rtl8723bs
[ 8.093365] RTL8723BS: module init start
[ 8.093383] RTL8723BS: rtl8723bs v4.3.5.5_12290.isthisaserialnumber
[ 8.093387] RTL8723BS: rtl8723bs BT-Coex version = isthisaserialnumber
[ 8.186225] RTL8723BS: rtw_ndev_init(wlan0)
[ 8.197672] RTL8723BS: module init ret =0
[ 9.376310] Bluetooth: hci0: RTL: loading rtl_bt/rtl8723bs_fw.bin
[ 9.387212] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723bs_fw.bin failed with error -2
[ 9.387236] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8723bs_fw.bin not found
>>>[ 69.493525] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[ 72.976787] RTL8723BS: rtw_set_802_11_connect(wlan0) fw_state = 0x00000008
[ 73.111432] RTL8723BS: start auth
[ 73.113961] RTL8723BS: auth success, start assoc
[ 73.118152] RTL8723BS: rtw_cfg80211_indicate_connect(wlan0) BSS not found !!
[ 73.118179] RTL8723BS: assoc success
[ 73.122495] RTL8723BS: send eapol packet
[ 73.128246] RTL8723BS: send eapol packet
[ 73.128600] RTL8723BS: set pairwise key camid:4, addr:ab:cd:ef:gh:ij:kl, kid:0, type:AES
[ 73.129380] RTL8723BS: set group key camid:5, addr:ab:cd:ef:gh:ij:kl, kid:2, type:TKIP

plus, success:

[ 73.129523] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

So Bluetooth isn't so happy, but at least Wifi is.

That (>>> above) FW file was found in Debian too, or at least a file by the same name (original post):

/usr/lib/firmware/rtlwifi/rtl8723bs_nic.bin

> the modern 'rtl8xxxu' that only supports USB style devices, and a cleaned-up version of the driver that is in staging, named 'rtlwifi' that also lacks support for rtl8723bs but supports some similar devices.

This is a "hat" type small (SDIO?) Wifi/BT card plugged onto the board, not a USB device, and the Pine A64+ hardware is dated March 21, 2016.

Is there something I can (reasonably) do to help move this module thing along, or is the best advice to just wait more patiently?

On a related topic, what would it take to make the Pine Debian installs more nicely packaged, like the Raspbian installs? (Thanks, Gunnar!)

Thanks RobJE, Paul Wise, and Arnd Bergmann!

Paul Wise

unread,
Feb 12, 2021, 9:20:03 PM2/12/21
to
On Fri, 2021-02-12 at 18:26 +0000, ore...@disroot.org wrote:

> So Bluetooth isn't so happy, but at least Wifi is.

The Bluetooth firmware file is in the firmware-realtek Debian package.

>
> Is there something I can (reasonably) do to help move this module
> thing along, or is the best advice to just wait more patiently?

On Debian, does `modprobe rtlwifi` help?

The WiFi firmware file is in the firmware-realtek Debian package.

> On a related topic, what would it take to make the Pine Debian
> installs more nicely packaged, like the Raspbian installs? (Thanks,
> Gunnar!)

There are too many different SBCs to make individual images for each
platform a viable strategy. I think the only reason there are RPi
images is that the hardware is popular and the community around it
expects available images rather than running an installer on-device.
signature.asc

Gunnar Wolf

unread,
Feb 13, 2021, 1:50:03 AM2/13/21
to
Paul Wise dijo [Sat, Feb 13, 2021 at 10:14:34AM +0800]:
> (...)
> > On a related topic, what would it take to make the Pine Debian
> > installs more nicely packaged, like the Raspbian installs? (Thanks,
> > Gunnar!)
>
> There are too many different SBCs to make individual images for each
> platform a viable strategy. I think the only reason there are RPi
> images is that the hardware is popular and the community around it
> expects available images rather than running an installer on-device.

Thanks for the explicit mention! However, the fact you singled me out
by name gives part of the answer -- And while I completely agree with
what Paul said and would have written the same (and that's the reason
I'm answering to his mail rather than to yours), I think this should
be said explicitly:

The Raspberry images are *not* official Debian images. Yes, they are
as-close-as-it-gets-to-being-so, but they are just a convenience
service run by an individual DD, on his hardware, hosted on his
own. You should *not* trust my images as much as you trust official
Debian projects (I promise not to have trojanized the builds... But
should you trust me? Or my computer?)

Anyway, I think it makes sense to ship built images for major, widely
available hardware. And if the images didn't need non-free firmware to
begin the boot process, I'd probably be pushing for them to become
official Debian builds!
signature.asc

Paul Wise

unread,
Feb 13, 2021, 7:10:02 PM2/13/21
to
On Sat, 2021-02-13 at 00:39 -0600, Gunnar Wolf wrote:

> non-free firmware to begin the boot process

The major blocker for replacing the non-free RPi boot firmware with the
libre firmware is the fact that the VC4 support for GCC is not yet
available in GCC upstream and there is no one willing to do the work
needed for copyright assignment of the VC4 support to the FSF etc.

https://github.com/librerpi/rpi-open-firmware
https://github.com/itszor/vc4-toolchain/issues/7
signature.asc

ore...@disroot.org

unread,
Feb 22, 2021, 12:40:03 AM2/22/21
to
February 13, 2021 2:15 AM, "Paul Wise" <pa...@debian.org> wrote:

> On Fri, 2021-02-12 at 18:26 +0000, ore...@disroot.org wrote:
>
>
> On Debian, does `modprobe rtlwifi` help?
>
> The WiFi firmware file is in the firmware-realtek Debian package.

Doesn't seem to help. A bunch of notes are below. The quality was unknown. I was warned. :)
Thanks for the suggestions!

>> On a related topic, what would it take to make the Pine Debian
>> installs more nicely packaged, like the Raspbian installs? (Thanks,
>> Gunnar!)
>
> There are too many different SBCs to make individual images for each
> platform a viable strategy. I think the only reason there are RPi
> images is that the hardware is popular and the community around it
> expects available images rather than running an installer on-device.

I see the difficulty of supporting many, many platforms this way, but...
For every phone* or phone-like device I've owned, there has always been at least one image available to flash, and often a few or more to choose from, from different places. If you're saying a regular install using USB flash drive would work on Pine A64+, then it would be great if the instructions could be updated: https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64
because that's what I followed, and it wasn't a regular installer like I've ever used before. :D

*Exception: Moto Droid 1. Looking for a way to install debian, or other minimal memory GNU/Linux other than Android. (Maybe better on Debian-Mobile list, but it's slow)

Notes:

# apt-file search r8723bs
linux-image-5.10.0-3-arm64: /lib/modules/5.10.0-3-arm64/kernel/drivers/staging/rtl8723bs/r8723bs.ko
linux-image-5.10.0-3-arm64-dbg: /usr/lib/debug/lib/modules/5.10.0-3-arm64/kernel/drivers/staging/rtl8723bs/r8723bs.ko
linux-image-5.10.0-3-arm64-unsigned: /lib/modules/5.10.0-3-arm64/kernel/drivers/staging/rtl8723bs/r8723bs.ko
linux-image-5.10.0-3-rt-arm64: /lib/modules/5.10.0-3-rt-arm64/kernel/drivers/staging/rtl8723bs/r8723bs.ko
linux-image-5.10.0-3-rt-arm64-dbg: /usr/lib/debug/lib/modules/5.10.0-3-rt-arm64/kernel/drivers/staging/rtl8723bs/r8723bs.ko
linux-image-5.10.0-3-rt-arm64-unsigned: /lib/modules/5.10.0-3-rt-arm64/kernel/drivers/staging/rtl8723bs/r8723bs.ko

# modprobe r8723bs
# lsmod|grep 8723
r8723bs 585728 0
cfg80211 729088 1 r8723bs

/var/log/kern.log

Feb 12 17:25:27 apine64 kernel: [11701.936183] cfg80211: Loading compiled-in X.509 certificates for regulatory database
Feb 12 17:25:27 apine64 kernel: [11701.937351] cfg80211: Loaded X.509 cert 'be...@debian.org: 577e021cb980e0e820821ba7b54b4961b8
b4fadf'
Feb 12 17:25:27 apine64 kernel: [11701.938662] cfg80211: Loaded X.509 cert 'romain...@gmail.com: 3abbc6ec146e09d1b6016ab9d6
cf71dd233f0328'
Feb 12 17:25:27 apine64 kernel: [11701.939825] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Feb 12 17:25:27 apine64 kernel: [11701.945659] platform regulatory.0: firmware: direct-loading firmware regulatory.db
Feb 12 17:25:27 apine64 kernel: [11701.948082] platform regulatory.0: firmware: direct-loading firmware regulatory.db.p7s
Feb 12 17:25:27 apine64 kernel: [11702.010505] r8723bs: module is from the staging directory, the quality is unknown, you have
been warned.
Feb 12 17:25:27 apine64 kernel: [11702.026293] RTL8723BS: module init start
Feb 12 17:25:27 apine64 kernel: [11702.026309] RTL8723BS: rtl8723bs v4.3.5.5_12290....
Feb 12 17:25:27 apine64 kernel: [11702.026314] RTL8723BS: rtl8723bs BT-Coex version = ...
Feb 12 17:25:27 apine64 kernel: [11702.026435] RTL8723BS: module init ret =0


/etc/network/interfaces.d/ was empty
created wlan0, following pi0w example which works.

# ip link set wlan0 up
Cannot find device "wlan0"
# ifup wlan0
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ifup: failed to bring up wlan0


# modprobe rtlwifi
# ip link set wlan0 up
Cannot find device "wlan0"
# ifup wlan0
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ifup: failed to bring up wlan0

# lsmod|grep -i wifi
rtlwifi 81920 0
mac80211 790528 1 rtlwifi
cfg80211 729088 2 rtlwifi,mac80211


From /var/log/syslog:

Feb 21 23:39:42 apine64 wpa_supplicant[3084]: Successfully initialized wpa_supplicant
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: Could not read interface wlan0 flags: No such device
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: nl80211: Driver does not support authentication/association or connect commands
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: Could not read interface wlan0 flags: No such device
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: rfkill: Cannot get wiphy information
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: Could not read interface wlan0 flags: No such device
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: WEXT: Could not set interface 'wlan0' UP
Feb 21 23:39:42 apine64 wpa_supplicant[3084]: wlan0: Failed to initialize driver interface

Andrei POPESCU

unread,
Feb 22, 2021, 4:10:02 AM2/22/21
to
On Lu, 22 feb 21, 05:12:29, ore...@disroot.org wrote:
>
> I see the difficulty of supporting many, many platforms this way,
> but...
> For every phone* or phone-like device I've owned, there has always
> been at least one image available to flash, and often a few or more to
> choose from, from different places. If you're saying a regular install
> using USB flash drive would work on Pine A64+, then it would be great
> if the instructions could be updated:
> https://wiki.debian.org/InstallingDebianOn/PINE64/PINEA64
> because that's what I followed, and it wasn't a regular installer like
> I've ever used before. :D

What do you mean by "a regular installer"?

Anyway, the instructions for bullseye are much simpler and GUI mode is
supported as well. Will look into updating the wiki after the release,
unless someone else beats be to it ;)

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser
signature.asc
0 new messages