Tengo un dongle BT 4.0 falso de China y pruebo el procedimiento de este hilo:Problema con el dongle Bluetooth
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
Device: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
bcdDevice: 88.91
Kernel: 5.10.3-051003-generic
usb-devices | awk '/0a12/' RS=
T: Bus=02 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0a12 ProdID=0001 Rev=88.91
S: Product=BT DONGLE10
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I: If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
Pero incluso después del parche, recibo el siguiente error a través de hcidump:
HCI Event: Command Complete (0x0e) plen 4
Set Event Filter (0x03|0x0005) ncmd 1
status 0x12
Error: Invalid HCI Command Parameters
Compruébalo:https://bugzilla.kernel.org/show_bug.cgi?id=60824#c155
“Mismo dispositivo y mismo problema en Pi Zero. “Cambiando el #define lmp_bredr_capable(dev)
en hci_core.h
devolver falso hizo el truco.”
No sé cómo hacer eso #define lmp_bredr_capable(dev). ¿Alguien podría ayudar?
Estoy totalmente disponible para probarlo.
Respuesta aceptada:
Resolví mi problema comentando las líneas 296 y 297 de hci_core.c (más parches).
static void bredr_setup(struct hci_request *req)
{
__le16 param;
__u8 flt_type;
/* Read Buffer Size (ACL mtu, max pkt, etc.) */
hci_req_add(req, HCI_OP_READ_BUFFER_SIZE, 0, NULL);
/* Read Class of Device */
hci_req_add(req, HCI_OP_READ_CLASS_OF_DEV, 0, NULL);
/* Read Local Name */
hci_req_add(req, HCI_OP_READ_LOCAL_NAME, 0, NULL);
/* Read Voice Setting */
hci_req_add(req, HCI_OP_READ_VOICE_SETTING, 0, NULL);
/* Read Number of Supported IAC */
hci_req_add(req, HCI_OP_READ_NUM_SUPPORTED_IAC, 0, NULL);
/* Read Current IAC LAP */
hci_req_add(req, HCI_OP_READ_CURRENT_IAC_LAP, 0, NULL);
/* Clear Event Filters */
//flt_type = HCI_FLT_CLEAR_ALL; HERE!!
//hci_req_add(req, HCI_OP_SET_EVENT_FLT, 1, &flt_type);
/* Connection accept timeout ~20 secs */
param = cpu_to_le16(0x7d00);
hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, ¶m);
Tal vez el "#define lmp_bredr_capable(dev) 0" también funcione. Pero no estoy seguro. Todavía ejecuto bredr_setup() pero omito el paso de filtro de eventos claro...
obs:Funciona impecablemente desde hace 2 días. El único problema es que no puedo convertirlo en un perfil HSP\HSP pero creo que es otra historia (incluso después del ofono gambiarra). Bluetooth en Linux es un dolor en un $ ..
Relacionado:¿Cómo agregar un usuario existente a un grupo existente en Ubuntu?