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?
ESP32 BLE (Beacon) Scan Request/Response
ESP32 BLE (Beacon) Scan Request/Response
- Attachments
-
- SCAN_REQ.png (51.66 KiB) Viewed 3785 times
-
- Posts: 4
- Joined: Thu Jul 29, 2021 5:44 am
Re: ESP32 BLE (Beacon) Scan Request/Response
How to send sesor data using ble beacon example. can you share code ?
Re: ESP32 BLE (Beacon) Scan Request/Response
I didn't make code yet, but I think it isn't that hard.komal nagda wrote: ↑Thu Jul 29, 2021 6:07 amHow to send sesor data using ble beacon example. can you share code ?
In my scenario, my ESP will repeat sleeping and waking up.
Every waking up sequence, ESP read the sensor data and create advertising data based on sensor data.
I'll transfer sensor data to some byte code(packet) like [00.000000,000.000000] => 0x00000000. The size of this packet always is 15. (Maximum size of ADV_IND + SCAN_RSP is 64, so that's enough)
The last step is just advertising it.
Who is online
Users browsing this forum: No registered users and 60 guests