This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

maxScanResponse parameter

Other Parts Discussed in Thread: BLE-STACK, CC2541, CC2640

Hi all,

I have the question about parameter maxScanResponse in HCI function GAP_DeviceInit (opcode 0xFE00). I had read that this parameter has to affect size of buffer space for received advertisiment packets,because do allocation buffer in RAM memory and its default value is 3. 

I'm using ble-stack, running on CC2541F256 as Network processor with Master mode configuration and I need to connect to maximum possible number of slave devices. 

My questions are:

  • How much space occupies one advertisiment packet?
  • How look a buffer overflow? Is it some kind of circle buffer or anything else?
  • Could you advise me some tested or recommanded value for my use?

I hope, that there will be someone who can advise me. Thank you in advance for your help.

  • Hello,

    Max scan response has more to do with filtering of the advertisement data sent in the report at the end of a scan. There is a max of 3 connections with C254x running as master. This is due to memory required for keeping track of  link layer data.

    BR,

    -Greg

  • Hi Greg,

    What is the maximum number I can set? Without setting higher number, under radio high saturated condition, I am seeing my device can't properly receive expected advertisement data. CC2541 seems running fine with 15. However, if I set maxScanRespons to 20, I am seeing C2541 not responding.

    Thanks,

    James
  • Hy there,

    same question for CC2640: I need to be able to scan as many as possible other BLE devices. I assume, that the necessary memory is allocated somewhere behind the sendWaitMatchCS call within GAP_DeviceInit function, right? Where is the allocated memory? How do I know that it was possible to allocate the memory? Can I influence the available memory?

    In my application, I only need to store the BLE device address of the scanned devices, not all advertising and scan response. Would it be possible to increase the number of stored devices by scanning several times. Example: I have 80 devices that need to be scanned and registered. I set maxScanResponse to 10, do a GAP_DeviceDiscoveryRequest, collect the 10 scanned devices and do GAP_DeviceDiscoveryRequest again. Is there any way to guarantee, that I don't see the same 10 devices again?

    Regards

    Harald