Closed lopsided98 closed 18 hours ago
Hi @lopsided98! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
CC @erwango @FRASTM @ABOSTM @gautierg-st @Desvauxm-st @GeorgeCGV
After playing with hci_usb (with the old USB stack) on the STM32WB55, it looks like the M0+ HCI firmware is far too buggy to be usable with Linux, so this is definitely a low priority.
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
@asm5878 to provide an update
ST doesn't support hci over usb way of working with STM32WB product. And a feature update is not planned.
Sorry, but I think we can close this ticket as a solution cannot be provided.
Describe the bug
The
hci_usb
sample is non-functional when used with the new USB device stack on the STM32WB55. The command buffer sent to the HCI driver is malformed, withbuf->data == NULL
andbuf->len > buf->size
, causing the following error message to be printed:bt_hci: Error sending to driver
.I'm having some trouble following the data flow in the
udc_stm32
driver, but I traced at least as far asHAL_PCD_DataOutStageCallback()
. In that function,udc_buf_get()
returns a buffer withlen == size == 0
anddata == NULL
. The code then proceeds to callnet_buf_add(buf, rx_count)
on the buffer, whererx_count > 0
. This results in the buffer withlen > size
and would cause a assertion failure withCONFIG_ASSERT
. In practice, enablingCONFIG_ASSERT
causes a crash earlier due to #61464.To Reproduce Steps to reproduce the behavior:
NULL
argument tosample_usbd_init_device()
call inhci_usb
sample to fix buildwest build samples/bluetooth/hci_usb -DCONF_FILE=usbd_next_prj.conf --board nucleo_wb55rg
west flash
Expected behavior
hci_usb
should be functional with the new USB stackImpact The old USB stack must be used to get
hci_usb
functionality on the STM32WB55.Logs and console output
Environment:
cc @loicpoulain