I'm attempting to set up a Raspberry Pi 3 as a Bluetooth HID device. Since I have no need for BLE, I've set "ControllerMode = bredr" in main.conf. I've also disabled all plugins on the command line, but the bluez daemon still seem to insist on starting the GATT server and adding the mandatory GATT service records: UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) I've looked at the code in some depth and stepped through the initialisation of bluetoothd in gdb, and there doesn't seem to be any checks on the transport mode defined in the config. In adapter.c:read_info_complete() there's a switch on the mode set in the config, where LE is disabled if BREDR is requested (line 7866): case BT_MODE_BREDR: /* ..... */ if (adapter->current_settings & MGMT_SETTING_LE) set_mode(adapter, MGMT_OP_SET_LE, 0x00); This doesn't seem to have any effect on the initialisation of the GATT server/registration of GATT SDP records. Is this intentional, or is this a bug? Is there any way to disable the registration of the GATT records when starting up? If not, can i remove the service records in my own code through the DBus interface somehow? My environment: Linux raspberrypi 4.4.8-v7+ #880 SMP Fri Apr 22 21:55:04 BST 2016 armv7l GNU/Linux Bluez 5.39 # bluetoothd --noplugin=* -d -n Debug log of startup and shutdown of bluetoothd is attached. Regards, -- Tarjei Knapstad
Attachment:
bluetoothd.log
Description: Binary data