23

What exactly is a BLE scan response packet?

Since there is almost nothing to be found online, we would like to now this.

Does a scan response packet, respond on a device scan or is it like the advertisement packet sent every x seconds?

Cœur
  • 37,241
  • 25
  • 195
  • 267
barry007
  • 539
  • 1
  • 4
  • 14

4 Answers4

33

A BLE scan response is the packet that is sent by the advertising device (peripheral) upon the reception of scanning requests (i.e. yes, it is a response to a device scan). The scan response usually has more data than the advertising packets. In other words, central devices send scan requests to the advertising device in order to get additional user data through the scan response. Please also note that scan responses are considered to have fixed 'static' data relative to the more dynamic advertising data.

Advertising packets and scan response share the same format, and are transmitted over the same three physical channels (they are both sent as advertising events), but are otherwise two different things.

For more information, I recommend reading about scan response packets in the SIG's core specification found here.

I hope this helps

Youssif Saeed
  • 11,789
  • 4
  • 44
  • 72
6

An important addition to yousif saeed's answer:

According to the Bluetooth 4.x specification, Peripheral devices accepting Scan Requests,

  • Must advertise this by using a specific Advertising Type value in the protocol header.
  • Must use advertising intervals of equal or bigger than, at least, 100 ms, so that the Central/Peripheral devices can exchange the Scan Request/Response packets in the time between two consecutive advertising packets (advertising interval).

Keep in mind, also, that depending on your particular hardware platform and Bluetooth Low Energy software stack,

  • You may find that a peripheral device accepting Scan Requests is non connectable, that is, may be limited to behave as a pure beacon (connection-less).
WedaPashi
  • 3,561
  • 26
  • 42
jose.angel.jimenez
  • 2,127
  • 23
  • 17
  • I don't believe this is accurate, connectable devices can provide scan response data as well. In the 4.2 spec section 4.4.3.2 Active Scanning, it says "The Link Layer shall send at least one SCAN_REQ PDU after entering the Scanning State to all advertisers that are allowed by the scanner filter policy from which ADV_IND or ADV_SCAN_IND PDUs are received." ADV_IND advertisers are connectable. – Sogger Aug 30 '16 at 16:35
  • Thanks @Sogger for the correction and review of my answer. I will double check BTLE spec as per your indications. I am correcting now the answer. – jose.angel.jimenez Aug 30 '16 at 17:47
4

I was just looking for this information and it is difficult to find good technical resources beyond the basic description.

There is a great few pages on one of the manufacturer's sites that goes into the details of how their hardware interacts with these communications.

The scan response packet consists of: Device name, Transmission power, Beacon ID, Firmware version, Battery level

https://support.kontakt.io/hc/en-gb/articles/201492492-iBeacon-advertising-packet-structure https://support.kontakt.io/hc/en-gb/articles/201493072-Beacon-services https://support.kontakt.io/hc/en-gb/articles/201492492-iBeacon-advertising-packet-structure

I am not promoting Kontakt.io, but they did a pretty good job of providing this answer in good detail.

Christopher Wade Cantley
  • 7,122
  • 5
  • 35
  • 48
  • 1
    The question was not what people usually put in the scan response packet but rather how and when it's to be sent over the air. After a peripheral has sent out an advertisement, a scanner can send a SCAN_REQ packet after exactly 150 microseconds. If this is snapped up by the peripheral, it sends back the SCAN_RSP packet after exactly 150 microseconds. – Emil Dec 01 '16 at 01:18
  • 2
    To reiterate, one of the questions was "What exactly is a BLE scan response packet?". Since I had that particular question recently, I felt my response helped add to the conversation or at least provide a resource for others who might find this with a similar question. But, I appreciated the additional information you provided. I did not know the time response for that communication. That has provided some direction in researching latency in the communication process so, I appreciate your comment. – Christopher Wade Cantley Dec 01 '16 at 14:31
  • Well, now when you say it like that, I understand your interpretation of the question ;) – Emil Dec 01 '16 at 16:19
0

Yes it does depend on device scan. I recently had this experience. I was working with Nordic device and started sending advertising packets which included scan rsp data. But either I was getting no scan rsp packet or hardly any packet. The issue was I was not scanning from my other nordic device. Once I started scanning from another device, scan rsp packets started coming quickly.