ESP32 BLE (Beacon) Scan Request/Response
Posted: Tue May 04, 2021 7:20 am
Hello.
I have some questions about scan request/response.
My project is running with BLE/WiFi/SPI task. First, Check firmware version by WIFI (this is not important part of this Topic). Next, BLE advertising some data. If got 'Scan Response', check MAC address of Central device. If central device(its MAC address) is in the whitelist, send 'Scan Response' for necessary data. (This data will refreshed by other sensor after deep sleep and wake up.) else, failed to got 'Scan Response', send that data by SPI. At last, go to deep sleep.
For this work, I have to know "Scan Response is sent" or "received Scan Request".
And here is my questions.
1. How to know I sent 'Scan Response' or got 'Scan Request'? I will change power mode to deep sleep when finish all task. So it is okay check it once of one booting.
2. How to check scanners MAC address? I checked payload of SCAN_REQ, but can't find that part in ESP-IDF library. There is way to check it?
I have some questions about scan request/response.
My project is running with BLE/WiFi/SPI task. First, Check firmware version by WIFI (this is not important part of this Topic). Next, BLE advertising some data. If got 'Scan Response', check MAC address of Central device. If central device(its MAC address) is in the whitelist, send 'Scan Response' for necessary data. (This data will refreshed by other sensor after deep sleep and wake up.) else, failed to got 'Scan Response', send that data by SPI. At last, go to deep sleep.
For this work, I have to know "Scan Response is sent" or "received Scan Request".
And here is my questions.
1. How to know I sent 'Scan Response' or got 'Scan Request'? I will change power mode to deep sleep when finish all task. So it is okay check it once of one booting.
2. How to check scanners MAC address? I checked payload of SCAN_REQ, but can't find that part in ESP-IDF library. There is way to check it?