Can I dynamically send a scan request packet? | Cypress Semiconductor
Can I dynamically send a scan request packet?
I want to send a scan request packet and receive a scan response packet in return, but only when specific advertisement packets are received.
The advertisement packets can contain arbitrary data in the manufacturer specific data area. When a packet contains the right data I would like to respond with a scan response request, and then receive the scan response data packet that follows. I would also like to customise the data in the scan response request (I believe this is possible.)
I can see CyBle_GapcStartScan may do a general scan response request but this appears to send scan responses out to all devices in the white list which meet the limited/general discovery criteria. I thought about receiving an advertisement packet, adding the BLE address to the white list (removing any previous address) and then sending the scan response on the next packet (this is OK, as the delay between sending the scan response and receiving the initial data is flexible.) However, this feels like a clumsy, inelegant solution. Is there a better way?
Thanks for any advice,