3

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.

8
  • 1
    On the command line use bluetoothctl show to see the services that are advertised by the RPi. I would expect audio features to be in there which is why the Windows machine thinks its an audio device. service bluetooth status will show how the bluetooth daemon was started. Adding the option to remove the audio plugin should remove those options being advertiseed.
    – ukBaz
    Jan 10 at 9:55
  • 1
  • @ukBaz Thank you very much for your reply. Indeed, bluetoothctl show displays a bunch of services, including some audio stuff. Since the Bluetooth daemon is started at boot, I guess I should edit the /lib/systemd/system/bluetooth.service file and add the relevant option --noplugin=<plugin>. However, I did not find any detailed example about the syntax of this option: what should I replace <plugin> with? Can you help me with that? Jan 10 at 13:34
  • Yes, I believe it is /lib/systemd/system/bluetooth.service that would need to be updated. I am not by a RPi to test this, but I seem to remember it is --noplugin=audio. If that doesn't work you might have to use the lowerlevel names such as a2dp and avrcp. This is about the best clues you get: github.com/bluez/bluez/blob/master/Makefile.plugins
    – ukBaz
    Jan 10 at 14:10
  • @ukBaz --noplugin=audio does not work, but --noplugin=a2dp,avrcp produces the intended effect: the audio services are no longer advertised. On Windows, the raspberrypi device now has the same icon as Dell dock, but it is still under Audio. However, it no longer appears in the list of audio devices in the control bar as before, which means that my main problem might be solved (I need to investigate further). It is still amazing that Windows classifies this as Audio, though. Maybe this is some kind of default setting? Jan 10 at 16:28

1 Answer 1

1

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

1
  • I'm having the exact same issue, I followed your path and now Windows puts my Raspberry BT connection in "Others" category. The issue is that I still can't connect to the Outgoing COM port, every terminal (TeraTerm, RealTerm, Putty, etc) throws me some error when trying to open that port... Opening the Incoming port works, but doesn't send nor receive any data. Did you had this issue before making the connection to be seen by Windows as "Others" (Audio)?
    – mariusmmg2
    Feb 3 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.