ESP32 BLE (Beacon) Scan Request/Response

hyunwoo
Posts: 2
Joined: Tue May 04, 2021 6:54 am

ESP32 BLE (Beacon) Scan Request/Response

Postby hyunwoo » 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?
Image
Attachments
SCAN_REQ.png
SCAN_REQ.png (51.66 KiB) Viewed 143 times

Who is online

Users browsing this forum: Baidu [Spider], bigdanv and 39 guests