Open carlessole opened 5 years ago
The documentation for the AT commands looks like there is some form of filtering, but it was never finished or implemented. Currently, we just filter for specific MAC addresses or for a specific data packet. Hopefully, there is something that can be done inside the ESP32 to perform this filtering though.
Thanks @Rvice So I understand that you implement the filter outside the ESP32. This is what I had in mind to do but for our application we need a continous scan (we are constantly listening for advertising telegrams because we use some sensors that just talk using advertising telegrams) and when doing so, there is a lot of traffic in the AT UART.
Filtering can be configured in menuconfig. Is this configuration suitable for your application?
make menuconfig->Component config->Bluetooth->Bluetooth controller
Thank @xiewenxiang ,
But I don't see
make menuconfig->Component config->Bluetooth->Bluetooth controller
in my project.
What I see is:
But in
make menuconfig->Component config->Bluetooth->Bluedroid Enable
I have these options:
So maybe are you referring to these three final fields?
Thank you.
So, I understant that there is no way using AT CMDS to filter the advertisment (by Bluetooth Address) packets during scan? (So I just let pass these addresses I let pass)
Thanks again
It would be very, very useful to be able to set the 'scan duplicate' element in the scan_params structure in the esp_err_t esp_ble_gap_set_scan_params(esp_ble_scan_params_t *scan_params) function call. Without this the serial port and/or cpu may become overwhelmed when scanning with many BLE devices available. It is suggested that this is implemented by adding another parameter to the BLESCANPARAM.
AT+BLESCAN=<enable>[,<interval>][,<filter_type>,<filter_param>]
You can try the last two parameters
Thanks for that, I had seen this and tested it. The problem is when you do not know either the device MAC nor Bluetooth address (or perhaps using a random address) but wish to scan for a device that supports a particular service (such as a heart monitor) in a busy environment. At present this means having to needlessly decode hundreds (or tens thousands) of duplicate advertising reports when scanning. This obviously eats into the serial port bandwidth and available CPU. If this is not seen as important I guess I can compile a custom command to drop the duplicates when starting BLE scanning.
Hi everybody, I'm doing a BLE scan using AT cmds (v1.1.3.0). The procedure I follow is:
Everything works fine but the problem is that so many devices are found, and then, there is a lot of trafffic in AT Uart. So my question is:
Is there a way to filter the scanning and just scan for the BLE address that starts with some pattern or something like that?
Thank you very much.