scan/track ibeacon devices using da14695

hi team,

I'm working on the da14695 with sdk 10.0.12.146 the present device is in peripheral role connected with mobile application for communication,.the mobile application scans the nearby ibeacon devices after found ibeacon it will send that beacon device BD address to da14695 device then DA14695 will switch to central role and scan the  for nearby ibeacon device if the device (da14695) is coming out of the range it will send notification.

here my questions are:

1. how to track the particular ibeacon device when more than one ibeacons are there but i know with minor and major we can differniate but to do it

any example code or any idea u have please tell

thanks

Parents
  • Hi Basu,

    1. how to track the particular ibeacon device when more than one ibeacons are there but i know with minor and major we can differniate but to do it

    any example code or any idea u have please tell

    The ibeacon format takes up all the Advertising Data available space. 
    So, I would suggest you use Scan Filters based on the Device Name (which is the only thing that can be stored in the Scan Response Data during Non-connectable advertising) or via the BDA. 
    For instance, on the ble_central example we provide, you should add a case for BLE_EVT_GAP_ADV_REPORT and create a custom handler to Filter through the Scan results. 
    This case should be added on the ble_central_task with the rest of the BLE events:

    You can take as reference the implementation made for the GTL driver on ble_mgr_gap.c file how we handle the Advertising Report. You will need to add custom filters based on the received Advertising Report.
    You should use the following typedef struct (which is placed in ble_gap.h file) in order to understand how you can filter through the advertising report:

    /** Structure for ::BLE_EVT_GAP_ADV_REPORT event */
    typedef struct {
            ble_evt_hdr_t      hdr;                         ///< Event header
            uint8_t            type;                        ///< Type of advertising packet
            bd_address_t       address;                     ///< BD address of advertising device
            int8_t             rssi;                        ///< RSSI
            uint8_t            length;                      ///< Length of advertising data
            uint8_t            data[BLE_ADV_DATA_LEN_MAX];  ///< Advertising data or scan response data
    } ble_evt_gap_adv_report_t;


    Best Regards,
    OV_Renesas

Reply
  • Hi Basu,

    1. how to track the particular ibeacon device when more than one ibeacons are there but i know with minor and major we can differniate but to do it

    any example code or any idea u have please tell

    The ibeacon format takes up all the Advertising Data available space. 
    So, I would suggest you use Scan Filters based on the Device Name (which is the only thing that can be stored in the Scan Response Data during Non-connectable advertising) or via the BDA. 
    For instance, on the ble_central example we provide, you should add a case for BLE_EVT_GAP_ADV_REPORT and create a custom handler to Filter through the Scan results. 
    This case should be added on the ble_central_task with the rest of the BLE events:

    You can take as reference the implementation made for the GTL driver on ble_mgr_gap.c file how we handle the Advertising Report. You will need to add custom filters based on the received Advertising Report.
    You should use the following typedef struct (which is placed in ble_gap.h file) in order to understand how you can filter through the advertising report:

    /** Structure for ::BLE_EVT_GAP_ADV_REPORT event */
    typedef struct {
            ble_evt_hdr_t      hdr;                         ///< Event header
            uint8_t            type;                        ///< Type of advertising packet
            bd_address_t       address;                     ///< BD address of advertising device
            int8_t             rssi;                        ///< RSSI
            uint8_t            length;                      ///< Length of advertising data
            uint8_t            data[BLE_ADV_DATA_LEN_MAX];  ///< Advertising data or scan response data
    } ble_evt_gap_adv_report_t;


    Best Regards,
    OV_Renesas

Children
No Data