Tag Archives: devuan

BCM43142 driver setup on ASUS notebook with Devuan

Had a hard time getting Bluetooth to work on my ASUS notebook under Devuan. My notebook, ASUS X550ZA have on board Broadcom hybrid controller BCM43142 for wireless and bluetooth connectivity. Since Broadcom’s stance toward open software is rather unwelcoming – drivers for their products are by default not included in Linux distributions. On top of it there are many versions of the same Broadcom product requiring different drivers. Knowing that – some fun was to be expected, but after walking circles for a while it boils down to:

1. See what controller we have

# inxi -nxxx
Network: Card-1: Broadcom and subsidiaries BCM43142 802.11b/g/n driver: wl
IF: wlan0 state: down mac: ac:e0:10:xx:xx:xx
Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r81699
IF: eth0 state: up speed: 100 Mbps duplex: full mac: 1c:b7:2c:xx:xx:xx

lspci for some more details

# lspci -nn | grep -i net
03:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)

OK, so for the wireless we need drivers for BCM43142 [14e4:4365] controller

Note: If your have a different version of BCM43* controller – you may want to check if you find a corresponding driver HERE

2. Add non-free and contrib to /etc/apt/sources.list

deb http://th.deb.devuan.org/merged ascii main non-free contrib
deb-src http://th.deb.devuan.org/merged ascii main non-free contrib

3. Update and install headers, image, and broadcom-sta-dkms package:. It will build wl kernel module

# apt update
# apt install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') broadcom-sta-dkms

4. Unload conflicting modules, then load wl module, or just reboot

# modprobe -r b44 b43 b43legacy ssb brcmsmac bcma
# modprobe wl

5. Confirm if wireless is working as expected

# iwconfig
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=200 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

Initially, made somewhat optimistic assumption that Network Controller BCM43142 is a blanket name for both wireless and Bluetooth and will get all the necessary drivers from a single package. After getting wireless to work, I found that bluetooth sort of worked, but in fact it did not. Upper layers functionality looked OK, bluetoothctl, hciconfig, et all worked without errors, but scan could not detect any devices around. After banging my head for a while, came to senses and asked simple question:

# dmesg | grep blu
[ 9.093970] bluetooth hci0: firmware: failed to load brcm/BCM.hcd (-2)
[ 9.094031] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2

And then another one

# lsusb | grep BCM
Bus 006 Device 002: ID 04ca:2006 Lite-On Technology Corp. Broadcom BCM43142A0 Bluetooth Device

As much as I wanted to believe that BCM43142 was sitting on PCI bus only – clearly it wasn’t the case. Since it wasn’t loading the driver properly despite the fact that broadcom-bt-firmware was already present as package was installed – took more direct action

6. Find the correct driver from the list on on the github of broadcom-bt-firmware https://github.com/winterheart/broadcom-bt-firmware/tree/master/brcm and download it

# wget -c https://github.com/winterheart/broadcom-bt-firmware/raw/master/brcm/BCM43142A0-04ca-2006.hcd

7. Copy downloaded driver to replace the wrong one

# cp BCM43142A0-04ca-2006.hcd /lib/firmware/brcm/BCM.hcd

8. Reinsert module, or reboot

# modprobe -r btusb
# modprobe btusb

9. Check modules

lsmod | grep bt
btusb 45056 0
btrtl 16384 1 btusb
btbcm 16384 1 btusb
btintel 16384 1 btusb
bluetooth 552960 26 btrtl,btintel,bnep,btbcm,btusb
usbcore 253952 11 uvcvideo,usbhid,usb_storage,ehci_hcd,ohci_pci,xhci_pci,btusb,uas,ohci_hcd,xhci_hcd, ehci_pci

10. See how things worked out

# bluetoothctl
[NEW] Controller D0:53:49:D7:F3:EB nobo [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller D0:53:49:D7:F3:EB Discovering: yes
[NEW] Device F2:00:7A:05:B3:3F WannaFit-G1D-B33F
[NEW] Device C4:BB:F6:14:B2:59 Braceli5-5657





Devuan FTW!

Being chased to the corner by systemd making inroads to many popular linux distros, just discovered Devuan, and enjoy every moment of it. YES. I did some effort to give a try with other distributions listed on sysdfree but ultimately had fallen for Devuan. Clean, elegant, and does what it says.

To those who fall outside the default mindset model of a sheep flock member – HERE you can find some good explanations why systemd is not good for your health.

If you would like to give it a try – grab live image HERE, burn it to DVD or make bootable USB and have a fun.

Desktop image lifted from distrowatch.com