Reputation: 33
On Android: I want to advertise over Bluetooth LE and have a scan response available. As I understand, the scan response is in the same format as an advertisement.
So how is my scan response identified by the scanner? How does it differentiate between my scan response and an advertisement by some other device? In practice: does my scan response need to have some identifying information tying it to the original advertisement? I haven't seen any mention in any documentation that states this.
I've looked at some diagrams, and my only guess is that the scan response always comes exactly X milliseconds after the request for the scan response. That way, there's no need for any information tying the response to the original ad. Seems sketchy though.
Upvotes: 2
Views: 1398
Reputation: 2927
I assume you ask question about non-extended advertising.
See Spec, in chapter 6.B.2.3. Then:
Both AdvData and ScanRspData share the same format, but should not repeat the same contents. They should add-up. Whether to put a given Advertisement Data (AD) in advertisement or in scan response is a matter of optimization tradeoff between max length of advertisement packet and latency for scanning.
Some AD types have restrictions about where they should appear, see Core Specification Supplement for more info.
Upvotes: 2