Page 1 of 1

Esp32 HID Host cannot connect to classic Bluetooth game pad and keyboard

Posted: Tue Sep 24, 2024 7:26 am
by JackPennnnng
i've been trying to use a esp32 wroom as hid host to read data input from bluetooth game pad or keyboard so i can use them as a physical interaction input to my projects. But it seems like the connection always fails. I don't know if it is caused by incompatibility between esp-idf bluedroid and game pad hid profile or it is something else? The following is the log of the whole process:

My keyboard and game pad has the exact same error log except they are scanned as different device.

BLE: d5:8b:0a:70:5d:c0, RSSI: -70, UUID: 0x0000, APPEARANCE: 0x0000, ADDR_TYPE: 'RANDOM'
BLE: c6:dc:df:93:c4:5f, RSSI: -73, UUID: 0x0000, APPEARANCE: 0x0000, ADDR_TYPE: 'RANDOM'
BLE: e2:80:b4:59:85:eb, RSSI: -53, UUID: 0x0000, APPEARANCE: 0x0000, ADDR_TYPE: 'RANDOM'
BLE: 1e:5a:a7:50:76:49, RSSI: -86, UUID: 0x0000, APPEARANCE: 0x0000, ADDR_TYPE: 'RANDOM'
BLE: 58:b6:d8:ee:66:a9, RSSI: -84, UUID: 0x0000, APPEARANCE: 0x0000, ADDR_TYPE: 'RANDOM'
BLE: c1:21:53:26:bc:52, RSSI: -70, UUID: 0x0000, APPEARANCE: 0x0000, ADDR_TYPE: 'RANDOM'
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -18
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -19
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -18
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -17
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -19
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -17
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -17
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -18
BT : 20:09:19:29:1b:24, COD: major: PERIPHERAL, minor: 16, service: 0x001, RSSI: -19
BT : 20:09:19:29:1b:24, BDNAME: Keyboard K380
I (10384) ESP_HIDH_DEMO: SCAN: 1 results
BT : 20:09:19:29:1b:24, RSSI: -19, USAGE: GENERIC, COD: PERIPHERAL[KEYBOARD] srv 0x001, UUID16: 0x0000, NAME: Keyboard K380
W (11514) BT_HCI: hcif conn complete: hdl 0x81, st 0x0
W (11524) ESP_HID_GAP: BT GAP EVENT UNKNOWN
W (11604) BT_SDP: process_service_attr_rsp

W (11824) BT_SDP: process_service_attr_rsp

W (11864) BT_HCI: hci cmd send: disconnect: hdl 0x81, rsn:0x13
E (11864) BT_HIDH: OPEN ERROR: ERR
E (11864) ESP_HIDH_DEMO: OPEN failed!
W (11934) BT_HCI: hcif disc complete: hdl 0x81, rsn 0x16
W (11934) ESP_HID_GAP: BT GAP EVENT UNKNOWN

i'll appreciate any advice!