4

The problem I have is the following: when setting my Raspberry Pi Bluetooth as discoverable, then pairing from a Windows laptop, the Raspberry is incorrectly identified as an audio device, as can be seen on the following screenshot. (This is using Raspberry Pi OS version 11 - Bullseye)

RPi detected as audio device

I would want this Raspberry Pi to be identified as other device.

The reason is: I need to interact with this Raspberry Pi with low-level sockets on specific BT ports, and because of this incorrect classification, windows seems to be attempting connections on some BT ports, therefore interfering with the program that I am trying to run. The Raspberry Pi is also to be used headless, so the pairing has to be initiated by the laptop.

Note that might be relevant: on Raspbian 9 (Stretch), the same process lead to the Raspberry Pi being correctly identified as other device. I would like to obtain the same result on an up-to-date version of the OS. Maybe some of you know what has changed in the Bluetooth configurations between these versions ?

Among other things, I have tried changing the Bluetooth device class. This will change the icon displayed on windows, but not the category under which the device is listed. It seems that windows is using another method to determine whether a device is audio or not, which remains quite mysterious to me.

I have been scratching my head over this for a long time, and any suggestion will be greatly appreciated.

1 Answers1

2

EDIT:
My original answer works well but does not feel very clean. I just found that the GATT service Headset responsible for my problems can be cleanly disabled by stopping every program related to PulseAudio or PipeWire. In fact I just uninstalled them.

ORIGINAL ANSWER:
For the record, I eventually solved the problem by disabling the unwanted services using sdptool.

I needed to edit /lib/systemd/system/bluetooth.service to start the bluetooth daemon with option --compat.

Then I disabled 2 services with sudo sdptool del 0x10004 and sudo sdptool del 0x10005.

It was the only way that I found to disable the "Headset" service that was the cause of the problem and seems to be started by default on my raspberry.

Source of this solution: Trying to disable some Bluetooth features on RPi3