How to disable unused bluetooth services?

SuperPCFan

New Member
Joined
May 2, 2021
Messages
5
Reaction score
0
Credits
71
I use a RPi4 with Raspbian GNU/Linux 10 (buster) to emulate a bluetooth HID device.
In addition to my service (1124) the sddb holds several other services alive right from the boot (out of the box).

My problem is the additional work load (annoying safety confirm question, driver time to load, e.g.) at the pairing process for these "useless" services. Therefore I try to deactivate these services but all Google searches with "disable/unload/deactivate/remove bluetooth service" leads all only to "how to disable bluetooth".... :confused:

I found the "sdptool" command to remove the services. But this command is not a suitable way for a boot script (or I don't know how) because the command references the services not by its service ids. This command uses the handle ids of the sddb entry which are random generated at setup and not preknown like the service ids.

Is there no way to configure the pre loaded bluetooth services before they were loaded the first time to the sddb?
 


Casually I found two ways to remove unused bluetooth services.

One way is to identify the package or module the service depends on and uninstall it.
For example the audio services belong to the module "pulseaudio-module-bluetooth" with sudo apt-get remove pulseaudio-module-bluetooth

The other way is to open the file sudo nano /etc/systemd/system/bluetooth.target.wants/bluetooth.service and append the line ExecStart=/usr/lib/bluetooth/bluetooth with --noplugin=name,…
For example is "name" for the AV remote service "avrcp".

Both ways have the same problem to find the package name or service name which belongs to the unused service. Up to now I found no systematic way for this issue.
 

Members online


Latest posts

Top