ble_gap_ext_disc [experimental]

int
ble_gap_ext_disc(
                                 uint8_t  own_addr_type,
                                uint16_t  duration,
                                uint16_t  period,
                                 uint8_t  filter_duplicates,
                                 uint8_t  filter_policy,
                                 uint8_t  limited,
    const struct ble_gap_ext_disc_params  *uncoded_params,
    const struct ble_gap_ext_disc_params  *coded_params
        const struct ble_gap_disc_params  *disc_params,
                        ble_gap_event_fn  *cb,
                                    void  *cb_arg
)

Description

Performs the Limited or General Discovery Procedures.

Parameters

ParameterDescription
own_addr_typeThe type of address the stack should use for itself when sending scan requests. Valid values are: BLE_ADDR_TYPE_PUBLIC BLE_ADDR_TYPE_RANDOM BLE_ADDR_TYPE_RPA_PUB_DEFAULT BLE_ADDR_TYPE_RPA_RND_DEFAULT This parameter is ignored unless active scanning is being used.
durationThe duration of the discovery procedure. On expiration, the procedure ends and a BLE_GAP_EVENT_DISC_COMPLETE event is reported. Unit is 10ms. Specify 0 for no expiration.
periodTime interval between each scan (valid when duration non-zero).
filter_duplicatesFilter duplicates flag.
filter_policyFilter policy as specified by Bluetooth specification.
limitedEnables limited discovery.
uncoded_paramsAdditional arguments specifying the particulars of the discovery procedure for uncoded PHY. Specify NULL if discovery is not needed on uncoded PHY
coded_paramsAdditional arguments specifying the particulars of the discovery procedure for coded PHY. Specify NULL if discovery os not needed on coded PHY
cbThe callback to associate with this discovery procedure. Advertising reports and discovery termination events are reported through this callback.
cb_argThe optional argument to pass to the callback function.

Returned values

ValueCondition
0Success.
Core return codeUnexpected error.