Page 1 of 1

HCI H4: Simultaneous BLE Scanning/Advertising

Posted: Wed Dec 17, 2025 7:54 am
by danergo
I'm using an ESP32 on full UART @921kbps to provide Bluetooth capabilities for my Linux machine:
/usr/bin/btattach -S 921600 -B /dev/ttyS10

Linux machine then uses BlueZ to manage all BT-related functions.

Everything works smooth. :)

Most of the time the controller spends its duty in BLE Ad scanning (activated by BlueZ on HCI):

This is from a btmon output:
HCI Command: LE Set Scan Enable
I wish now not just scanning ads, but also advertising.

(How) Can I do it with ESP32 as a HCI BT processor or it will introduce massive problems?

Thank you!

Re: HCI H4: Simultaneous BLE Scanning/Advertising

Posted: Fri Dec 19, 2025 7:42 am
by lichurbagan
You can advertise and scan only if BlueZ controls both via HCI. You can do this only if your ESP32 controller firmware actually supports concurrent operations.
If the ESP32 is limited to legacy advertising, scanning and advertising are mutually exclusive, and advertising will stop once scanning is enabled.
Running ESP32-side advertising while BlueZ is scanning will break the HCI model and should be avoided.