zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.85k stars 6.61k forks source link

HCI core data buffer overflow with ESP32-C3 in Peripheral HR sample #43258

Closed pflonz closed 2 years ago

pflonz commented 2 years ago

Describe the bug The Peripheral HR sample program issues the warning <wrn> bt_hci_core: Data buffer overflow (link type 0x01) while connected to nRF Toolbox HRM after some time and stops notification (same behaviour also with other BLE smartphone apps).

Please also mention any information which could help others to understand the problem you're facing:

To Reproduce Steps to reproduce the behavior:

  1. mkdir build
  2. west build -p auto esp32c3_devkitm -s ~/workspace/zephyr/samples/bluetooth/peripheral_hr/ -d build/ -- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
  3. west flash -d build/
  4. west espressif monitor
  5. start nRF Toolkit on smartphone
  6. choose HRM in nRF Toolkit and connect to Zephyr Heartrate Sensor

Expected behavior As soon as a device connects, it generates dummy heart rate values without issuing the warning and stopping the notifications.

Impact What impact does this issue have on your progress (e.g., annoyance, showstopper)

Logs and console output

*** Booting Zephyr OS build zephyr-v3.0.0-483-g145bcd7ab96e  ***
I (1) phy_init: phy_version 500,985899c,Apr 19 2021,16:05:08
Bluetooth initialized
Advertising successfully started
[00:00:00.000,977] <inf> esp32_bt_adapter: BT controller compile version [9c99115]
[00:00:00.295,445] <inf> bt_hci_core: Identity: 88:61:A1:02:02:40 (public)
[00:00:00.295,539] <inf> bt_hci_core: HCI: version 5.0 (0x09) revision 0x0016, manufacturer 0x0060
[00:00:00.295,559] <inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0x0016
Connected
[00:00:05.077,917] <inf> bas: BAS Notifications enabled
[00:00:05.115,279] <inf> hrs: HRS notifications enabled
[00:01:44.403,870] <wrn> bt_hci_core: Data buffer overflow (link type 0x01)
[00:01:44.404,257] <wrn> bt_hci_core: Data buffer overflow (link type 0x01)
[00:01:45.405,777] <wrn> bt_hci_core: Data buffer overflow (link type 0x01)

Environment (please complete the following information):

Additional context Add any other context that could be relevant to your issue, such as pin setting, target configuration, ...

pflonz commented 2 years ago

@sylvioalves Can you possibly help me out here? Many thanks in advance!