mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-28 05:47:45 +00:00
Merge branch 'nimble-1.3.0-C3-WL-DLE' into 'nimble-1.3.0-idf'
NimBLE: APIs to set whitelist and set LE packet length (nimble-1.3.0-idf) See merge request espressif/esp-nimble!63
This commit is contained in:
@@ -1139,6 +1139,23 @@ int ble_gap_adv_set_fields(const struct ble_hs_adv_fields *rsp_fields);
|
||||
*/
|
||||
int ble_gap_adv_rsp_set_fields(const struct ble_hs_adv_fields *rsp_fields);
|
||||
|
||||
/**
|
||||
* Configure LE Data Length in controller (OGF = 0x08, OCF = 0x0022).
|
||||
*
|
||||
* @param conn_handle Connection handle.
|
||||
* @param tx_octets The preferred value of payload octets that the Controller
|
||||
* should use for a new connection (Range
|
||||
* 0x001B-0x00FB).
|
||||
* @param tx_time The preferred maximum number of microseconds that the local Controller
|
||||
* should use to transmit a single link layer packet
|
||||
* (Range 0x0148-0x4290).
|
||||
*
|
||||
* @return 0 on success,
|
||||
* other error code on failure.
|
||||
*/
|
||||
int ble_hs_hci_util_set_data_len(uint16_t conn_handle, uint16_t tx_octets,
|
||||
uint16_t tx_time);
|
||||
|
||||
#if MYNEWT_VAL(BLE_EXT_ADV)
|
||||
/** @brief Extended advertising parameters */
|
||||
struct ble_gap_ext_adv_params {
|
||||
@@ -1774,6 +1791,15 @@ int ble_gap_terminate(uint16_t conn_handle, uint8_t hci_reason);
|
||||
*/
|
||||
int ble_gap_wl_set(const ble_addr_t *addrs, uint8_t white_list_count);
|
||||
|
||||
/**
|
||||
* Removes the address from controller's white list.
|
||||
*
|
||||
* @param addrs The entry to be removed from the white list.
|
||||
*
|
||||
* @return 0 on success; nonzero on failure.
|
||||
*/
|
||||
int ble_gap_wl_tx_rmv(const ble_addr_t *addrs);
|
||||
|
||||
/**
|
||||
* Initiates a connection parameter update procedure.
|
||||
*
|
||||
|
||||
@@ -2110,6 +2110,23 @@ ble_gap_wl_tx_clear(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
ble_gap_wl_tx_rmv(const ble_addr_t *addr)
|
||||
{
|
||||
struct ble_hci_le_rmv_white_list_cp cmd;
|
||||
|
||||
if (addr->type > BLE_ADDR_RANDOM) {
|
||||
return BLE_HS_EINVAL;
|
||||
}
|
||||
|
||||
memcpy(cmd.addr, addr->val, BLE_DEV_ADDR_LEN);
|
||||
cmd.addr_type = addr->type;
|
||||
|
||||
return ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE,
|
||||
BLE_HCI_OCF_LE_RMV_WHITE_LIST),
|
||||
&cmd, sizeof(cmd), NULL, 0);
|
||||
}
|
||||
|
||||
int
|
||||
ble_gap_wl_set(const ble_addr_t *addrs, uint8_t white_list_count)
|
||||
{
|
||||
|
||||
@@ -100,8 +100,6 @@ int ble_hs_hci_util_read_adv_tx_pwr(int8_t *out_pwr);
|
||||
int ble_hs_hci_util_rand(void *dst, int len);
|
||||
int ble_hs_hci_util_read_rssi(uint16_t conn_handle, int8_t *out_rssi);
|
||||
int ble_hs_hci_util_set_random_addr(const uint8_t *addr);
|
||||
int ble_hs_hci_util_set_data_len(uint16_t conn_handle, uint16_t tx_octets,
|
||||
uint16_t tx_time);
|
||||
int ble_hs_hci_util_data_hdr_strip(struct os_mbuf *om,
|
||||
struct hci_data_hdr *out_hdr);
|
||||
int ble_hs_hci_evt_process(const struct ble_hci_ev *ev);
|
||||
|
||||
Reference in New Issue
Block a user