This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Empty Scan Response Handling

Hello All,

I have a basic question about empty scan response operation with the ADV_IND PDU. When I set advertising data as follows:

    err_code = ble_advdata_set(&advdata, NULL);

is the central somehow informed that there is no scan response data so that it has the option of not issuing a scan request, or does the central have to determine this by issuing a scan request and seeing that the scan response data length is 0?

Looking at the standard I did not see a defined way to specify an empty scan response in the 16-bit advertising channel PDU header, but this seems quite possible (unused RxAdd bit for example) and I wanted to make sure I haven't missed something.

Thanks and Regards, Matt

  • There is no method by which the scanner can determine that the SCAN_RESPONSE is not present in an ADV_IND (advertising packet), so a scan request will be sent and a blank scan response is sent back to the scanner.

    Do you wish to save power ? I would suggest that you reduce the size of the ADV_IND packet and place the bulk of your advertising in the SCAN_RESPONSE. Since the number of ADV_IND packet will outnumber the SCAN RESPONSE packets by a very large margin you will save power by making the ADV_IND as small as possible.

  • Thanks very much for the answer, that is what I thought would happen. The concern here is the behavior of the central device if a scan response packet is dropped and the central moves out of range of the original peripheral and eventually in range of another advertiser that we'd like it to see and scan. I suspect it will re-try the original scan for the duration of some timeout interval, hopefully that will not prevent it from seeing and scanning another advertiser.

    Thanks once again!

    Matt

  • The central runs a active scanner so the ADV_INDs are received and SCAN_REQUEST is sent and SCAN_RESPONSE received and then the data is sent to the application. I.e. The data in the ADV_IND and the SCAN RESPONSE is should then be sent to the application together or not at all. This is the typical behaviour on a central like a iOS device or Android device. So typically there is no chance of an ADV_IND from one device getting mixed with the SCAN RESPONSE of another

  • Thanks again, and for the power optimization comment as well. That hadn't occurred to me but makes a lot of sense. When looking at current during advertising events, the wide pulse associated with a scan response is apparent.

Related