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.

GAP Device Discovery

Currently GAP_DeviceDiscoveryRequest sends two GAP_DEVICE_INFO_EVENT:s for active scanning and one for passive for every device. I would like to get as much as possible of these events during scanning. For my use case contents of final GAP_DEVICE_DISCOVERY_EVENT is not needed.

How can I configure this procedure so that I will get unfiltered or less filtered GAP_DEVICE_INFO_EVENT messages and empty GAP_DEVICE_DISCOVERY_EVENT?

  • Hello,

    I'm not sure why some would be filtered, but maybe I'm not understanding.  You would filter using a whitelist, but I don't think you are doing that. One thing might be you need to configure your device discovery to report more devices. Also check scan window - and perhaps make it 100% so you don' t miss any advertisements.

     

        uint8 scanRes = DEFAULT_MAX_SCAN_RES;

        GAPCentralRole_SetParameter ( GAPCENTRALROLE_MAX_SCAN_RES, sizeof( uint8 ), &scanRes );

     

     

    Passive Scanning

     

    Scanner listens on advertising channels for advertising packets
    When an advertisement packet is received, it passes the information up to the host

    Active Scanning
    Scanner listens on advertising channels for advertising packets
    When an advertisement packet is received, it responds with a “scan request” packet
    Advertiser then responds back with a “scan response” packet (this packet can contain additional data from advertiser)
    Br,
    -Greg

     

  • Hi,

    Filtering was wrong term selection by me. I meant that GAP is checking if it has already sent GAP_DEVICE_INFO_EVENT for a device with certain MAC address. Currently if GAP_DEVICE_INFO_EVENT is sent once it is not sending it second time until new discovery is started. I would like to be able to receive GAP_DEVICE_INFO_EVENT for every advertising packet received.

    GAPCENTRALROLE_MAX_SCAN_RES was the default 8 at ble central sample and with 2 devices and passive scanning two GAP_DEVICE_INFO_EVENT:s are received before final event GAP_DEVICE_DISCOVERY_EVENT when discovery is done.

    Br,
    - Arto

  • Ahh I see. Good question.  The filtering is on the advertisement data and address.  To get multiple advertisements from same address, have the slave change it's adv data. 

    If the data doesn't change, then you will have to stop/start scans in order to catch the advertisements.

    BR,

    -Greg

  • Thanks for sharing this workaround possibility. It would be excellent to get possibility to disable this filtering on the next released version of the BLE library. Changing AdvData at the slave side is not the most energy efficient way because of extra cycles needed to drive changes there.

    Br,
    -Arto

  • Hey Arto

    Any updates in this?Did it work? namely:  If you change the Adv Data. Can you receive several DEV INFO EVENTS in a single DISCOVERY EVENT (scan window) from the same ADDRESS ?

    If yes, how did you modify dinamically the advertData ?

    Best Regards,

    Luis

  • Hi Greg

    I am working on a BLE Observer program based on SimpleBLEObserver sample project in BLE Stack 1.3.1.

    I want get GAP_DEVICE_DISCOVERY_EVENT when the Broadcaster advertising every time.

    I have changed the advertisement data broadcaster side every time, but It still only one GAP_DEVICE_DISCOVERY_EVENT is called.

    Is it possible to get multiple GAP_DEVICE_DISCOVERY_EVENT from single Broadcaster by not restarting the scan?

    Thanks a lot!

    Jeff

  • So, did you get this to work?
    If so, could tell how?

    thanks :)