Setting up bluethooth on honor magicbook 14 and ubuntu 22.04
For adapters based on Qualcomm Atheros QCNFA765 (rev 01) – as I understand it, anything QCNxxx will do
call lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 27c6:5125 Shenzhen Goodix Technology Co.,Ltd. Goodix Fingerprint Device
Bus 003 Device 002: ID 0489:e0e1 Foxconn / Hon Hai
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0408:1040 Quanta Computer, Inc. ov9734_techfront_camera
Bus 001 Device 002: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
0489:e0e1 – get the ID of our device (Foxconn)
in settings – driver manager – ububtu software – enable repositories with source code
sudo apt install dpkg-dev (needed for the dpkg-source utility)
apt-get source linux (you may have to install linux-headers via regular apt install)
cd linux-5.15.0/drivers/bluetooth/ (I have kernel version 5.15.0, here is your version accordingly)
vim btusb.c
we find a block with a similar module (in theory, only the revision has been changed, there are no special differences in operation)/* QCA WCN6855 chipset */
добавляем блок с нашим ID
{ USB_DEVICE(0x0489, 0xe0e1), .driver_info = BTUSB_QCA_WCN6855 |
BTUSB_WIDEBAND_SPEECH |
BTUSB_VALID_LE_STATES },0x0489, 0xe0e1 – where the numbers are from 1 point, depending on the version of the laptop, the last digit may differ
assembling the module
make -C /lib/modules/$(uname -r)/build M=$(pwd) clean
cp /usr/src/linux-headers-$(uname -r)/.config ./
cp /usr/src/linux-headers-$(uname -r)/Module.symvers Module.symvers
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
install -b btusb.ko /lib/modules/$(uname -r)/kernel/drivers/bluetooth/
modprobe -r btusb – unload the driver, try to load the modprobe btusb driver – it will give a permissions error
generate signatures for the kernel
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=MyBtDriver/"
sign our driver/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n btusb)
loading our signature into the system
mokutil --import MOK.der
will ask you to enter a password, come up with a password, we will need it after the reboot, oncewe reboot, we get a blue window with a menu, select eroll something there, enter our password from step 10, asks to reboot again.
should work