-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BT VHCI configuration for 3rd party stack (EHM-7) #7
Comments
Hello @AndyDevLat , Thank you for the detailed question. You can have a look at The lower level APIs used from NimBLE are shown there. These nimBLE Specific APIs can be ported/replaced to one's from BlueKitchen. |
Thank you! I figured out, that i need to disable BT support in sdkconfig (CONFIG_BT_ENABLED must not be defined) and replace esp_vhci_host_send_packet calls with direct calls to esp_hosted_tx. |
Understood. Point taken. Also, if you are comfortable, you can also raise PR with your BlueKitchen port. Will be helpful for us and others as lot. |
Thank you, will do! |
I have also made another optimization for BtStack: inside process_spi_rx_buf i do not forward ESP_HCI_IF packets to spi_process_rx_task via _h_queue_item. Instead i call hci_rx_handler directly and then call spi_buffer_free. This is because BtStack already has own ring buffer and queues incoming packets for processing inside own thread. This way we remove unnecessary packet copying and reduce latency. Maybe it would be good idea to add some menuconfig option for this. |
Hmm. Seems great.. will add shortly. Else wait for your PR.. |
What is correct way to configure ESP hosted for 3rd party BTStack operation via VHCI? At the moment it supports NimBLE only.
But i want to use BlueKitchen BtStack which uses esp_vhci_host_... APIs to access controller.
More specifically, it uses these APIs:
esp_vhci_host_register_callback
esp_vhci_host_check_send_available
esp_vhci_host_send_packet
Do i need to clone ESP Hosted component and patch host\drivers\bt\vhci_drv.c file for this purpose?
Or is there some other solution?
Note that I am not considering UART H4 mode yet, as it requires 4 more GPIO pins and more difficult to setup.
My host is ESP32-P4 (ESP32-P4-Function-EV-Board) and slave is ESP32 (ESP-WROVER-KIT) connected via SPI transport.
The text was updated successfully, but these errors were encountered: