ubuntu 20.04 configure bluetooth and btusb not found solution


foreword

If you want to use ubuntu 20.04 as a daily development platform, you need to connect a Bluetooth headset, so record the Bluetooth configuration and debugging process.


1. Configuration steps

1. Install Bluetooth tools and packages

Execute under the terminal:

sudo apt-get install bluez*

2. Start the Bluetooth driver module

Execute under the terminal:

sudo modprobe btusb

At this step, the error message is prompted:

FATAL: Module btusb not found in directory /lib/modules/5.11.0-25-generic

The second section explains how to solve it.

3. Enable Bluetooth service

Check Bluetooth status:

sudo systemctl status bluetooth.service

insert image description here
Enable bluetooth service:

sudo systemctl enable bluetooth.service

Restart the bluetooth service:

sudo systemctl restart bluetooth.service

Check the bluetooth status again:

sudo systemctl status bluetooth.service

insert image description here
So far, the Bluetooth service has been successfully enabled, just open it in the software, if there is no corresponding icon, just install it in the software store.

insert image description here

4. Restart the Bluetooth service (no need to operate, just know)

Stop the bluetooth service:

sudo systemctl stop bluetooth.service

Restart the bluetooth service:

sudo systemctl enable bluetooth.service

Check the bluetooth status again:

sudo systemctl status bluetooth.service

2. btusb not found error solution

First enter the Bluetooth driver path corresponding to the kernel version. According to the error message, my path is:
/lib/modules/5.15.0-41-generic/kernel/drivers/bluetooth
cd After entering, I found that there is indeed no btusb module (generally reflected for btusb.ko)
insert image description here
but I found that in my other kernel folders, there are corresponding files:
insert image description here

I tried to copy the btusb.ko of other ubuntui machines or kernels (the string of characters 5.15.0-41-generic represents the kernel version number),
but it didn't work , of course I didn't get into the principle

so, the final solution can only switch the kernel version:

For details, please refer to:
https://blog.csdn.net/Thanours/article/details/104834536

But I didn't delete the new version of the kernel~ Let's keep it like this for now, although it may be digging a hole, but after doing this, the kernel version number has been successfully switched, and then perform the operation in the first section.

Summarize

Another day of debugging.
If you have any questions, please leave a message~

grateful

  1. https://bynss.com/linux/591885.html
  2. https://blog.csdn.net/Thanours/article/details/104834536
  3. https://unix.stackexchange.com/questions/664143/how-do-i-fix-a-module-not-found-error

Guess you like

Origin blog.csdn.net/weixin_43357695/article/details/126087105