espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.29k stars 7.2k forks source link

bt_hid_mouse_device doesn't work on IOS or Android (IDFGH-13305) #14232

Closed joaoneves1 closed 3 days ago

joaoneves1 commented 1 month ago

Answers checklist.

IDF version.

v5.2.2

Espressif SoC revision.

ESP32-D0WD-V3 (revision v3.1)

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32

Power Supply used.

USB

What is the expected behavior?

I expect to make the bt_hid_mouse_device example to work on Android or IOS devices. It works fine when connected to Windows 10. But on IOS the arrow doesn´t move.

What is the actual behavior?

Commands is sent, but IOS doesn't respond.

Steps to reproduce.

  1. Step - Download ESP-IDF
  2. Step - Build bt_hid_mouse_device
  3. Step - Connect to IOS

Debug Logs.

Here is the log from Windows 10 connection:
I (78596) esp_bt_gap_cb: authentication success: N38660
I (78596) esp_bt_gap_cb: a0 29 42 e0 43 5d
I (78636) esp_bt_gap_cb: event: 21
W (79336) BT_HIDD: hidd_l2cif_config_cfm: config failed, retry
W (79346) BT_APPL: new conn_srvc id:20, app_id:1
I (79346) esp_bt_hidd_cb: connected to a0:29:42:e0:43:5d
I (79346) mouse_move_task: starting
I (79356) Send mouse: Protocol mode
I (79356) esp_bt_hidd_cb: making self non-discoverable and non-connectable.
W (79366) BT_HCI: hci cmd send: sniff: hdl 0x81, intv(10 18)
I (79376) esp_bt_hidd_cb: ESP_HIDD_SEND_REPORT_EVT id:0x00, type:1
W (79396) BT_HCI: hcif mode change: hdl 0x81, mode 2, intv 18, status 0x0
I (79396) esp_bt_gap_cb: ESP_BT_GAP_MODE_CHG_EVT mode:2
I (79856) mouse_move_task: sent
I (79856) Send mouse: Protocol mode
I (79856) esp_bt_hidd_cb: ESP_HIDD_SEND_REPORT_EVT id:0x00, type:1

Here is the log from IOS Connection:

I (84376) esp_bt_gap_cb: authentication success: iPad
I (84376) esp_bt_gap_cb: 44 2a 60 7a be 2e
I (84706) esp_bt_gap_cb: event: 21
W (84836) BT_HCI: hcif link supv_to changed: hdl 0x80, supv_to 8000
W (84896) BT_APPL: new conn_srvc id:20, app_id:1
I (84906) esp_bt_hidd_cb: connected to 44:2a:60:7a:be:2e
I (84906) mouse_move_task: starting
I (84906) Send mouse: Protocol mode
I (84906) esp_bt_hidd_cb: making self non-discoverable and non-connectable.
W (84916) BT_HCI: hci cmd send: sniff: hdl 0x80, intv(10 18)
W (84926) BT_HCI: hcif mode change: hdl 0x80, mode 2, intv 18, status 0x0
I (84936) esp_bt_hidd_cb: ESP_HIDD_SEND_REPORT_EVT id:0x00, type:1
I (84936) esp_bt_gap_cb: ESP_BT_GAP_MODE_CHG_EVT mode:2
I (84986) esp_bt_hidd_cb: ESP_HIDD_SET_PROTOCOL_EVT
I (84986) esp_bt_hidd_cb:   - report protocol
W (84986) BT_HCI: hcif ssr evt: st 0x0, hdl 0x80, tx_lat 18 rx_lat 18
I (85406) mouse_move_task: sent
I (85406) Send mouse: Protocol mode

More Information.

No response

boblane1 commented 1 month ago

Hi @joaoneves1,

I have tested with IPad 7 with os 15.6, and it works well. In fact, IPhone or IPad can not find ESP32 which named HID Mouse Example in example. I just connect to IPhone or IPad with hard coded Bluetooth address. Can you provide more log?