GAP#

Modules#

rsi_ble_set_smp_pairing_capabilty_data

rsi_ble_resp_read_phy_s

rsi_ble_resp_read_max_data_length_s

Functions#

int32_t

Request the local device to set a random address.

int32_t

Request the local device to set a given random address.

int32_t

Request the local device to start advertising.

int32_t
rsi_ble_start_advertising_with_values(const void *rsi_ble_adv)
int32_t
rsi_ble_encrypt(const uint8_t *key, const uint8_t *data, uint8_t *resp)
int32_t

Stop advertising.

int32_t
rsi_ble_set_advertise_data(const uint8_t *data, uint16_t data_len)
int32_t
rsi_ble_set_scan_response_data(const uint8_t *data, uint16_t data_len)
int32_t

Start scanning.

int32_t
rsi_ble_start_scanning_with_values(void *rsi_ble_scan_params)

Start scanning with values.

int32_t

Stop scanning.

int32_t
rsi_ble_connect_with_params(uint8_t remote_dev_addr_type, const int8_t *remote_dev_addr, uint16_t scan_interval, uint16_t scan_window, uint16_t conn_interval_max, uint16_t conn_interval_min, uint16_t conn_latency, uint16_t supervision_tout)
int32_t
rsi_ble_connect(uint8_t remote_dev_addr_type, const int8_t *remote_dev_addr)
int32_t
rsi_ble_enhance_connect_with_params(void *ble_enhance_conn_params)

Connect to the remote BLE device with the user configured parameters.

int32_t
rsi_ble_connect_cancel(const int8_t *remote_dev_address)
int32_t
rsi_ble_disconnect(const int8_t *remote_dev_address)
int32_t

Get the local device state.

int32_t
rsi_ble_set_smp_pairing_cap_data(rsi_ble_set_smp_pairing_capabilty_data_t *smp_pair_cap_data)

Set the SMP Pairing Capability of local device.

int32_t
rsi_ble_set_local_irk_value(const uint8_t *l_irk)
int32_t
rsi_ble_conn_param_resp(const uint8_t *remote_dev_address, uint8_t status)
int32_t
rsi_ble_smp_pair_request(uint8_t *remote_dev_address, uint8_t io_capability, uint8_t mitm_req)

Request the SMP pairing process with the remote device.

int32_t
rsi_ble_smp_pair_failed(uint8_t *remote_dev_address, uint8_t reason)

Send SMP pairing failure reason to the remote device.

int32_t
rsi_ble_ltk_req_reply(uint8_t *remote_dev_address, uint8_t reply_type, const uint8_t *ltk)
int32_t
rsi_ble_smp_pair_response(uint8_t *remote_dev_address, uint8_t io_capability, uint8_t mitm_req)

Send SMP pairing response during the process of pairing with the remote device.

int32_t
rsi_ble_smp_passkey(uint8_t *remote_dev_address, uint32_t passkey)

Send SMP passkey during SMP pairing process with the remote device.

int32_t
rsi_ble_get_le_ping_timeout(uint8_t *remote_dev_address, uint16_t *time_out)

Get the timeout value of the LE ping.

int32_t
rsi_ble_set_le_ping_timeout(uint8_t *remote_dev_address, uint16_t time_out)

Set the timeout value of the LE ping.

int32_t

Clear all the BD address present in accept list.

int32_t
rsi_ble_addto_acceptlist(const int8_t *dev_address, uint8_t dev_addr_type)
int32_t
rsi_ble_deletefrom_acceptlist(const int8_t *dev_address, uint8_t dev_addr_type)
int32_t
rsi_ble_resolvlist(uint8_t process_type, uint8_t remote_dev_addr_type, uint8_t *remote_dev_address, const uint8_t *peer_irk, const uint8_t *local_irk)
int32_t

Request to get resolving list size.

int32_t
rsi_ble_set_addr_resolution_enable(uint8_t enable, uint16_t tout)

Request to enable address resolution, and to set resolvable private address timeout.

int32_t
rsi_ble_set_privacy_mode(uint8_t remote_dev_addr_type, uint8_t *remote_dev_address, uint8_t privacy_mode)

Request to set privacy mode for particular device.

int32_t
rsi_ble_readphy(const int8_t *remote_dev_address, rsi_ble_resp_read_phy_t *resp)
int32_t
rsi_ble_setphy(const int8_t *remote_dev_address, uint8_t tx_phy, uint8_t rx_phy, uint16_t coded_phy)
int32_t
rsi_ble_conn_params_update(const uint8_t *remote_dev_address, uint16_t min_int, uint16_t max_int, uint16_t latency, uint16_t timeout)
int32_t
rsi_ble_set_data_len(uint8_t *remote_dev_address, uint16_t tx_octets, uint16_t tx_time)

Sets the TX octets and the TX time of specified link (remote device connection).

int32_t
rsi_ble_read_max_data_len(rsi_ble_read_max_data_length_t *blereaddatalen)

reads the max supported values of TX octets, TX time, RX octets and Rx time.

int32_t
rsi_ble_accept_list_using_adv_data(uint8_t enable, uint8_t data_compare_index, uint8_t len_for_compare_data, const uint8_t *payload)
void
BT_LE_ADPacketExtract(uint8_t *remote_name, const uint8_t *pbuf, uint8_t buf_len)
int32_t
rsi_ble_start_encryption(uint8_t *remote_dev_address, uint16_t ediv, const uint8_t *rand, const uint8_t *ltk)
int32_t
rsi_ble_set_ble_tx_power(int8_t tx_power)

Set TX power.

int32_t

Get maximum advertising data length.

int32_t

Get maximum number of advertising sets.

int32_t
rsi_ble_set_ae_set_random_address(uint8_t handle, const uint8_t *rand_addr)
int32_t
rsi_ble_set_ae_data(void *ble_ae_data)

Update AE advertiser data.

int32_t
rsi_ble_set_ae_params(void *ble_ae_params, int8_t *sel_tx_pwr)

Update AE parameters.

int32_t

Enable or disable AE advertising.

int32_t
rsi_ble_app_adv_set_clear_or_remove(uint8_t type, uint8_t handle)

Clear or remove an advertising set.

int32_t
rsi_ble_app_set_periodic_ae_params(void *periodic_adv_params)

Update periodic AE parameters.

int32_t
rsi_ble_app_set_periodic_ae_enable(uint8_t enable, uint8_t handle)

Enable or disable periodic advertising.

int32_t
rsi_ble_ae_set_scan_params(void *ae_scan_params)

Update AE scan parameters.

int32_t
rsi_ble_ae_set_scan_enable(void *ae_scan_enable)

Enable or disable legacy and extended scanning.

int32_t
rsi_ble_ae_set_periodic_sync(uint8_t type, void *periodic_sync_data)

Synchronize periodic advertising with advertiser.

int32_t

Manage a device in the periodic advertiser list.

int32_t

Get periodic advertiser list size.

int32_t

Establish ACL connection to advertiser.

int32_t

Get supported transmit power range.

Typedef Documentation#

rsi_ble_set_smp_pairing_capabilty_data_t#

typedef struct rsi_ble_set_smp_pairing_capabilty_data rsi_ble_set_smp_pairing_capabilty_data_t

Definition at line 950 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_resp_read_phy_t#

typedef struct rsi_ble_resp_read_phy_s rsi_ble_resp_read_phy_t

Definition at line 976 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_read_max_data_length_t#

typedef struct rsi_ble_resp_read_max_data_length_s rsi_ble_read_max_data_length_t

Definition at line 1000 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

Function Documentation#

rsi_ble_set_random_address#

int32_t rsi_ble_set_random_address (void )

Request the local device to set a random address.

Parameters
[in]

This is a Blocking API

  • Pre-conditions: Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • - 0 - Success

      Non-Zero Value - Failure

      If the return value is less than 0

      -4 - Buffer not available to serve the command

Note


Definition at line 1567 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_random_address_with_value#

int32_t rsi_ble_set_random_address_with_value (uint8_t * random_addr)

Request the local device to set a given random address.

Parameters
[in]random_addr

- random address of the device to be set

This is a Blocking API

  • Pre-condition:

    • Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 - Buffer not available to serve the command

Note


Definition at line 1583 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_start_advertising#

int32_t rsi_ble_start_advertising (void )

Request the local device to start advertising.

Parameters
[in]

This is a Blocking API A received event rsi_ble_on_enhance_connect_t/ rsi_ble_on_connect_t indicates remote device given ble connect command and got connected

  • Pre-condition: Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 - Buffer not available to serve the command 0x4E0C - Command disallowed 0x4046 - Invalid Arguments

Note


Definition at line 1603 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_start_advertising_with_values#

int32_t rsi_ble_start_advertising_with_values (const void * rsi_ble_adv)
Parameters
N/Arsi_ble_adv

Definition at line 1623 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_encrypt#

int32_t rsi_ble_encrypt (const uint8_t * key, const uint8_t * data, uint8_t * resp)
Parameters
N/Akey
N/Adata
N/Aresp

Definition at line 1643 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_stop_advertising#

int32_t rsi_ble_stop_advertising (void )

Stop advertising.

Parameters
[in]

This is a Blocking API

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 - Buffer not available to serve the command 0x4E0C - Command disallowed 0x4046 - Invalid Arguments

Note


Definition at line 1661 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_advertise_data#

int32_t rsi_ble_set_advertise_data (const uint8_t * data, uint16_t data_len)
Parameters
N/Adata
N/Adata_len

Definition at line 1680 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_scan_response_data#

int32_t rsi_ble_set_scan_response_data (const uint8_t * data, uint16_t data_len)
Parameters
N/Adata
N/Adata_len

Definition at line 1697 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_start_scanning#

int32_t rsi_ble_start_scanning (void )

Start scanning.

Parameters
[in]

This is a Blocking API A received event rsi_ble_on_adv_report_event_t indicates advertise report of remote device received.

  • Pre-condition: Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 - Buffer not available to serve the command 0x4E0C - Command disallowed 0x4046 - Invalid Arguments

Note


Definition at line 1716 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_start_scanning_with_values#

int32_t rsi_ble_start_scanning_with_values (void * rsi_ble_scan_params)

Start scanning with values.

Parameters
[in]rsi_ble_scan_params

- BLE scan parameters structure please refer rsi_ble_req_scan_s structure for more info

This is a Blocking API A received event rsi_ble_on_adv_report_event_t indicates advertise report of remote device received.

  • Pre-condition:

    • Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure 0x4E0C - Command disallowed 0x4046 - Invalid Arguments

Note


Definition at line 1734 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_stop_scanning#

int32_t rsi_ble_stop_scanning (void )

Stop scanning.

Parameters
[in]

This is a Blocking API

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 - Buffer not available to serve the command 0x4E0C - Command disallowed

Note


Definition at line 1751 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_connect_with_params#

int32_t rsi_ble_connect_with_params (uint8_t remote_dev_addr_type, const int8_t * remote_dev_addr, uint16_t scan_interval, uint16_t scan_window, uint16_t conn_interval_max, uint16_t conn_interval_min, uint16_t conn_latency, uint16_t supervision_tout)
Parameters
N/Aremote_dev_addr_type
N/Aremote_dev_addr
N/Ascan_interval
N/Ascan_window
N/Aconn_interval_max
N/Aconn_interval_min
N/Aconn_latency
N/Asupervision_tout

Definition at line 1818 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_connect#

int32_t rsi_ble_connect (uint8_t remote_dev_addr_type, const int8_t * remote_dev_addr)
Parameters
N/Aremote_dev_addr_type
N/Aremote_dev_addr

Definition at line 1848 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_enhance_connect_with_params#

int32_t rsi_ble_enhance_connect_with_params (void * ble_enhance_conn_params)

Connect to the remote BLE device with the user configured parameters.

Parameters
[in]ble_enhance_conn_params

- BLE enhance connection parameter structure. See notes for the fields in this structure.

  • Pre-conditions: Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • - 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 - Buffer not available to serve the command 0x4E0C - Command disallowed 0x4046 - Invalid Arguments

Note

  • Refer to the Status Codes section for the above error codes at additional-status-codes.

  • The following fields are included in the ble_enhance_conn_params parameter structure:

    • dev_addr_type - Address type of the device to connect.

      • 0 - Public Address

      • 1 - Random Address

    • dev_addr - Address of the device to connect.

    • filter_policy - Policy used to determine whether the filter accept list is used.

      • 0 - Filter accept list is not used to determine which advertiser to connect to.

      • 1 - Filter accept list is used to determine which advertiser to connect to.

    • own_addr_type - Own address type

    • le_scan_interval - The time interval from when the Controller started its last LE scan until it begins the subsequent LE scan.

      • Range: 0x0004 to 0x4000

      • Time = le_scan_interval * 0.625 msec

      • Time Range: 2.5 msec to 10 . 24 seconds

    • le_scan_window - Amount of time for the duration of the LE scan. This must be less than or equal to le_scan_interval.

      • Range: 0x0004 to 0x4000

      • Time = le_scan_window * 0.625 msec

      • Time Range: 2.5 msec to 10 . 24 seconds

    • conn_interval_min - Minimum value for the connection event interval. This must be greater than or equal to conn_interval_max.

      • Range: 0x0006 to 0x0C80

      • Time = conn_interval_min * 1.25 msec

      • Time Range: 7.5 msec to 4 seconds.

      • 0x0000 - 0x0005 and 0x0C81 - 0xFFFF - Reserved for future use

    • conn_interval_max - Maximum value for the connection event interval. This must be greater than or equal to conn_interval_min.

      • Range: 0x0006 to 0x0C80

      • Time = conn_interval_max * 1.25 msec

      • Time Range: 7.5 msec to 4 seconds.

      • 0x0000 - 0x0005 and 0x0C81 - 0xFFFF - Reserved for future use

    • conn_latency - Peripheral latency for the connection in number of connection events.

      • Range: 0x0000 to 0x01F4

    • supervision_tout - Supervision timeout for the LE Link.

      • Range: 0x000A to 0x0C80

      • Time = N * 10 msec

      • Time Range: 100 msec to 32 seconds

      • 0x0000 - 0x0009 and 0x0C81 - 0xFFFF - Reserved for future use

    • min_ce_length - Minimum length of connection event recommended for this LE connection.

      • Range: 0x0000 to 0xFFFF

      • Time = N * 0.625 msec

    • max_ce_length - Maximum length of connection event recommended for this LE connection.

      • Range: 0x0000 to 0xFFFF

      • Time = N * 0.625 msec


Definition at line 1906 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_connect_cancel#

int32_t rsi_ble_connect_cancel (const int8_t * remote_dev_address)
Parameters
N/Aremote_dev_address

Definition at line 1924 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_disconnect#

int32_t rsi_ble_disconnect (const int8_t * remote_dev_address)
Parameters
N/Aremote_dev_address

Definition at line 1942 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_get_device_state#

int32_t rsi_ble_get_device_state (uint8_t * resp)

Get the local device state.

Parameters
[out]resp

- This is an output parameter which consists of local device state. This is a 1-byte value. The possible states are described below: BIT(0) Advertising state BIT(1) Scanning state BIT(2) Initiating state BIT(3) Connected state BIT(4) Extended Advertising state BIT(5) Extended Scanning state BIT(6) Extended Initiating state

This is a Blocking API. The state value is filled in "resp".

  • Pre-conditions:

    • Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command

Note


Definition at line 1966 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_smp_pairing_cap_data#

int32_t rsi_ble_set_smp_pairing_cap_data (rsi_ble_set_smp_pairing_capabilty_data_t * smp_pair_cap_data)

Set the SMP Pairing Capability of local device.

Parameters
[in]smp_pair_cap_data

- This structure pointer holds the information of the SMP capability data values please refer rsi_ble_set_smp_pairing_capabilty_data structure for more info

This is a Blocking API

  • Pre-conditions: Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command

Note


Definition at line 1983 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_local_irk_value#

int32_t rsi_ble_set_local_irk_value (const uint8_t * l_irk)
Parameters
N/Al_irk

Definition at line 1997 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_conn_param_resp#

int32_t rsi_ble_conn_param_resp (const uint8_t * remote_dev_address, uint8_t status)
Parameters
N/Aremote_dev_address
N/Astatus

Definition at line 2018 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_smp_pair_request#

int32_t rsi_ble_smp_pair_request (uint8_t * remote_dev_address, uint8_t io_capability, uint8_t mitm_req)

Request the SMP pairing process with the remote device.

Parameters
[in]remote_dev_address

- MITM enable/disable

  • 0 - Disable

  • 1 - Enable

[in]io_capability

- This is the device input output capability

N/Amitm_req

This is a Blocking API

  • A received event rsi_ble_on_smp_request_t indicated remote device is given Security Request and need to respond back with rsi_ble_smp_pair_request

  • A received event rsi_ble_on_smp_response_t indicated remote device is given SMP Pair Request and need to respond back with rsi_ble_smp_pair_response

  • A received event rsi_ble_on_smp_failed_t indicated SMP procedure have failed

    • Pre-conditions:

      • rsi_ble_connect() API needs to be called before this API.

  • 0x00 - Display Only

  • 0x01 - Display Yes/No

  • 0x02 - Keyboard Only

  • 0x03 - No Input No Output Returns

    • The following values are returned:

  • 0 - Success

  • Non-Zero Value - Failure

  • If the return value is less than 0

  • -4 - Buffer not available to serve the command

  • 0x4D05 BLE socket not available

  • 0x4E62 Invalid Parameters

  • 0x4D04 BLE not connected Note


Definition at line 2048 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_smp_pair_failed#

int32_t rsi_ble_smp_pair_failed (uint8_t * remote_dev_address, uint8_t reason)

Send SMP pairing failure reason to the remote device.

Parameters
[in]remote_dev_address

- This is the remote device address

[in]reason

- This is the reason for SMP Pairing Failure

  • 0x05 - Pairing Not Supported

  • 0x08 - Unspecified Reason

  • 0x09 - Repeated Attempts

  • Pre-conditions: rsi_ble_connect() API needs to be called before this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command


Definition at line 2067 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_ltk_req_reply#

int32_t rsi_ble_ltk_req_reply (uint8_t * remote_dev_address, uint8_t reply_type, const uint8_t * ltk)
Parameters
N/Aremote_dev_address
N/Areply_type
N/Altk

Definition at line 2095 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_smp_pair_response#

int32_t rsi_ble_smp_pair_response (uint8_t * remote_dev_address, uint8_t io_capability, uint8_t mitm_req)

Send SMP pairing response during the process of pairing with the remote device.

Parameters
[in]remote_dev_address

- This is the remote device address

[in]io_capability

- This is the device input output capability 0x00 - Display Only 0x01 - Display Yes/No 0x02 - Keyboard Only 0x03 - No Input No Output

[in]mitm_req

- MITM Request info

  • 0 - Disable

  • 1 - Enable

This is a Blocking API

  • A received event rsi_ble_on_smp_passkey_t indicated Legacy SMP passkey is received and need to respond back with rsi_ble_smp_passkey()

  • A received event rsi_ble_on_sc_passkey_t indicated BLE SC passkey is received and need to respond back with rsi_ble_smp_passkey()

  • A received event rsi_ble_on_smp_passkey_display_t indicates SMP passkey display is received from the module

  • A received event rsi_ble_on_smp_failed_t indicated SMP Failed event is received

    • Pre-condition: rsi_ble_connect() API needs to be called before this API.

    Returns

    • The following values are returned:

      • 0 - Success

      • Non-Zero Value - Failure

      • If the return value is less than 0

      • -4 - Buffer not available to serve the command

      • 0x4D05 BLE socket not available

      • 0x4E62 Invalid Parameters

      • 0x4D04 BLE not connected

    Note


Definition at line 2126 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_smp_passkey#

int32_t rsi_ble_smp_passkey (uint8_t * remote_dev_address, uint32_t passkey)

Send SMP passkey during SMP pairing process with the remote device.

Parameters
[in]remote_dev_address

- This is the remote device address

[in]passkey

- This is the key required in pairing process

This is a Blocking API A received event rsi_ble_on_encrypt_started_t indicated encrypted event is received from module A received event rsi_ble_on_le_security_keys_t indicates exchange of security keys completed after encryption A received event rsi_ble_on_smp_failed_t indicated SMP procedure have failed

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command

    • 0x4D05 BLE socket not available

    • 0x4E62 Invalid Parameters

    • 0x4D04 BLE not connected

Note


Definition at line 2150 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_get_le_ping_timeout#

int32_t rsi_ble_get_le_ping_timeout (uint8_t * remote_dev_address, uint16_t * time_out)

Get the timeout value of the LE ping.

Parameters
[in]remote_dev_address

- This is the remote device address

[out]time_out

- This a response parameter which holds timeout value for authentication payload command.

This is a Blocking API

  • Pre-conditions: rsi_ble_connect() API needs to be called before this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command

    • 0x4D05 BLE socket not available

    • 0x4E62 Invalid Parameters

    • 0x4D04 BLE not connected

Note

  • Refer to the Status Codes section for the above error codes at additional-status-codes .

  • Currently Get ping is not supported.


Definition at line 2172 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_le_ping_timeout#

int32_t rsi_ble_set_le_ping_timeout (uint8_t * remote_dev_address, uint16_t time_out)

Set the timeout value of the LE ping.

Parameters
[in]remote_dev_address

- This is the remote device address

[out]time_out

- This input parameter sets timeout value for authentication payload command.(in milliseconds)

This is a Blocking API A received event of rsi_ble_on_le_ping_payload_timeout_t indicates LE ping payload timeout expired

  • Pre-conditions:

    • rsi_ble_connect() API needs to be called before this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command

    • 0x4D05 BLE socket not available

    • 0x4E62 Invalid Parameters

    • 0x4D04 BLE not connected

Note


Definition at line 2194 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_clear_acceptlist#

int32_t rsi_ble_clear_acceptlist (void )

Clear all the BD address present in accept list.

Parameters
[in]

This is a Blocking API

  • Pre-conditions: Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 - Buffer not available to serve the command

Note


Definition at line 2210 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_addto_acceptlist#

int32_t rsi_ble_addto_acceptlist (const int8_t * dev_address, uint8_t dev_addr_type)
Parameters
N/Adev_address
N/Adev_addr_type

Definition at line 2228 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_deletefrom_acceptlist#

int32_t rsi_ble_deletefrom_acceptlist (const int8_t * dev_address, uint8_t dev_addr_type)
Parameters
N/Adev_address
N/Adev_addr_type

Definition at line 2245 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_resolvlist#

int32_t rsi_ble_resolvlist (uint8_t process_type, uint8_t remote_dev_addr_type, uint8_t * remote_dev_address, const uint8_t * peer_irk, const uint8_t * local_irk)
Parameters
N/Aprocess_type
N/Aremote_dev_addr_type
N/Aremote_dev_address
N/Apeer_irk
N/Alocal_irk

Definition at line 2273 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_get_resolving_list_size#

int32_t rsi_ble_get_resolving_list_size (uint8_t * resp)

Request to get resolving list size.

Parameters
[out]resp

- output parameter which consists of supported resolving the list size.

This is a Blocking API

  • Pre-conditions:

    • Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • If the return value is less than 0

    • -4 : Buffer not available to serve the command

Note


Definition at line 2293 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_addr_resolution_enable#

int32_t rsi_ble_set_addr_resolution_enable (uint8_t enable, uint16_t tout)

Request to enable address resolution, and to set resolvable private address timeout.

Parameters
[in]enable

- the period for changing address of our local device in seconds Value ranges from 0x0001 to 0xA1B8 (1 s to approximately 11.5 hours)

N/Atout

This is a Blocking API

  • Pre-conditions:

    • Device should be initialized before calling this API.

  • 0 - disables address resolution Returns

    • The following values are returned:

      • 0 - Success

      • Non-Zero Value - Failure

      • If the return value is less than 0

      • -4 : Buffer not available to serve the command


Definition at line 2311 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_privacy_mode#

int32_t rsi_ble_set_privacy_mode (uint8_t remote_dev_addr_type, uint8_t * remote_dev_address, uint8_t privacy_mode)

Request to set privacy mode for particular device.

Parameters
[in]remote_dev_addr_type

- type of the remote device address 0 - Public Identity Address 1 - Random (static) Identity Address

[in]remote_dev_address

- remote device address

[in]privacy_mode

- type of the privacy mode 0 - Network privacy mode 1 - Device privacy mode

This is a Blocking API

  • Pre-conditions: Device should be initialized before calling this API.

Returns

  • The following values are returned: 0 - Success Non-Zero Value - Failure If the return value is less than 0 -4 : Buffer not available to serve the command

Note


Definition at line 2333 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_readphy#

int32_t rsi_ble_readphy (const int8_t * remote_dev_address, rsi_ble_resp_read_phy_t * resp)
Parameters
N/Aremote_dev_address
N/Aresp

Definition at line 2348 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_setphy#

int32_t rsi_ble_setphy (const int8_t * remote_dev_address, uint8_t tx_phy, uint8_t rx_phy, uint16_t coded_phy)
Parameters
N/Aremote_dev_address
N/Atx_phy
N/Arx_phy
N/Acoded_phy

Definition at line 2382 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_conn_params_update#

int32_t rsi_ble_conn_params_update (const uint8_t * remote_dev_address, uint16_t min_int, uint16_t max_int, uint16_t latency, uint16_t timeout)
Parameters
N/Aremote_dev_address
N/Amin_int
N/Amax_int
N/Alatency
N/Atimeout

Definition at line 2418 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_data_len#

int32_t rsi_ble_set_data_len (uint8_t * remote_dev_address, uint16_t tx_octets, uint16_t tx_time)

Sets the TX octets and the TX time of specified link (remote device connection).

Parameters
[in]remote_dev_address

- remote device device

[in]tx_octets

- preferred maximum number of payload octets that the local Controller should include in a single Link Layer packet on this connection.

[in]tx_time

- preferred maximum number of microseconds that the local Controller should use to transmit a single Link Layer packet on this connection.

This is a Blocking API. A received event rsi_ble_on_data_length_update_t indicates data length update complete.

  • Pre-conditions:

    • rsi_ble_connect() API needs to be called before this API.

Returns

  • The following values are returned:

    • 0 - LE_Set_Data_Length command succeeded.

    • Non-Zero Value - Failure

    • 0x4D05 BLE socket not available

    • 0x4E62 Invalid Parameters

    • 0x4D04 BLE not connected

Note


Definition at line 2444 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_read_max_data_len#

int32_t rsi_ble_read_max_data_len (rsi_ble_read_max_data_length_t * blereaddatalen)

reads the max supported values of TX octets, TX time, RX octets and Rx time.

Parameters
[out]blereaddatalen

- pointer to structure variable, Please refer rsi_ble_resp_read_max_data_length_s structure for more info.

This is a Blocking API

  • Pre-conditions:

    • rsi_ble_connect() API needs to be called before this API.

Returns

  • The following values are returned:

    • 0 - command success

    • Non-Zero Value - Failure

Note


Definition at line 2459 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_accept_list_using_adv_data#

int32_t rsi_ble_accept_list_using_adv_data (uint8_t enable, uint8_t data_compare_index, uint8_t len_for_compare_data, const uint8_t * payload)
Parameters
N/Aenable
N/Adata_compare_index
N/Alen_for_compare_data
N/Apayload

Definition at line 2583 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

BT_LE_ADPacketExtract#

void BT_LE_ADPacketExtract (uint8_t * remote_name, const uint8_t * pbuf, uint8_t buf_len)
Parameters
N/Aremote_name
N/Apbuf
N/Abuf_len

Definition at line 2600 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_start_encryption#

int32_t rsi_ble_start_encryption (uint8_t * remote_dev_address, uint16_t ediv, const uint8_t * rand, const uint8_t * ltk)
Parameters
N/Aremote_dev_address
N/Aediv
N/Arand
N/Altk

Definition at line 2626 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_ble_tx_power#

int32_t rsi_ble_set_ble_tx_power (int8_t tx_power)

Set TX power.

Parameters
[in]tx_power

Power value

Returns

  • The following values are returned:

    • 0 - Success

    • Non-zero value - Failure

    • 0x4E02 - Unknown connection identifier

    • 0x4E01 - Unknown HCI command

    • 0x4E0C - Command disallowed

    • 0x4046 - Invalid arguments

    • 0x4D04 - BLE not connected

    • 0x4D14 - BLE parameter out of mandatory range

Note

  • This is a Blocking API.

  • Refer to the Status Codes section for the above error codes at additional-status-codes.

  • The higher power will be backed off based on country region.

  • Use the following setting to indicate tx_power as an index: #define RSI_BLE_PWR_INX_DBM 0 Default value for power index is 31. Valid values for power index range from 1 to 31 and 33 to 127:

    • 1 to 31: BLE - 0dBm mode.

    • 33 to 63: BLE - 10dBm mode.

    • 64 to 82: BLE - 1dBm - 18dBm HP mode in the resolution of 1dBm.

    • 104 to 126: BLE - 0.5dBm - 11dBm HP mode in the resolution of 0.5dbm.

    • 127: BLE HP Mode, max power supported.

  • Use the following setting to indicate tx_power in dBm (-8dBm to 18dBm): #define RSI_BLE_PWR_INX_DBM 1

  • When switching between HP mode and LP mode, please ensure that no protocol activity is running.

  • For the LP Chain - Power index vs output power in dBm in E2E mode:

    Power Index

    Output Power in dBm

    1

    -22.3054959

    2

    -16.59332574

    3

    -13.38278365

    4

    -11.19804718

    5

    -9.576522466

    6

    -8.312070432

    7

    -7.294640362

    8

    -6.458448154

    9

    -5.760963318

    10

    -5.173042366

    11

    -4.673788189

    12

    -4.247653993

    13

    -3.882708784

    14

    -3.569545894

    15

    -3.300567503

    16

    -3.069499167

    17

    -2.871050592

    18

    -2.700672503

    19

    -2.554378603

    20

    -2.428612817

    21

    -2.32014891

    22

    -2.226013876

    23

    -2.143429275

    24

    -2.069766557

    25

    -2.002513642

    26

    -1.939250859

    27

    -1.87763493

    28

    -1.815390046

    29

    -1.750305305

    30

    -1.680237892

    31

    -1.603121401

    32

    N/A

    33

    -10.4822997

    34

    -4.9531679

    35

    -1.931961022

    36

    0.057132993

    37

    1.476764101

    38

    2.5332116

    39

    3.336771823

    40

    3.953605265

    41

    4.426779615

    42

    4.786171523

    43

    5.053647759

    44

    5.246007208

    45

    5.37676618

    46

    5.457304255

    47

    5.497635316

    48

    5.506945838

    49

    5.493978354

    50

    5.467302132

    51

    5.435491631

    52

    5.407220119

    53

    5.391268248

    54

    5.396444507

    55

    5.431416481

    56

    5.504458826

    57

    5.62313521

    58

    5.793945208

    59

    6.02197959

    60

    6.310634089

    61

    6.661428559

    62

    7.073964236

    63

    7.546029076

  • For the HP Chain - Power index vs output power in dBm in E2E mode:

    Power Index

    Output Power in dBm

    64

    1

    65

    2

    66

    3

    67

    4

    68

    5

    69

    6

    70

    7

    71

    8

    72

    9

    73

    10

    74

    11

    75

    12

    76

    13

    77

    14

    78

    15

    -

    -

    -

    -

    104

    0.5

    105

    1

    106

    1.5

    107

    2

    108

    2.5

    109

    3

    110

    3.5

    111

    4

    -

    -

    126

    10.5

    127

    Max Power Supported by Country region


Definition at line 2753 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_get_max_adv_data_len#

int32_t rsi_ble_get_max_adv_data_len (uint8_t * resp)

Get maximum advertising data length.

Parameters
[out]resp

Maximum supported advertising data length returned by the controller. Possible values range from 0x001F to 0x0672.

Returns

  • The following values are returned:

    • 0 = success

  • The following values are returned:

    • !0 = failure

Note

  • This function requests the controller to return the maximum supported advertising data length.


Definition at line 3531 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_get_max_no_of_supp_adv_sets#

int32_t rsi_ble_get_max_no_of_supp_adv_sets (uint8_t * resp)

Get maximum number of advertising sets.

Parameters
[out]resp

Number of supported advertising sets returned by the controller. Possible values range from 0x01 to 0xF0.

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function requests the controller to return the maximum number of supporting advertising sets.

  • The number of supported advertising sets can be configured through the operating modes.


Definition at line 3545 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_ae_set_random_address#

int32_t rsi_ble_set_ae_set_random_address (uint8_t handle, const uint8_t * rand_addr)
Parameters
N/Ahandle
N/Arand_addr

Definition at line 3558 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_ae_data#

int32_t rsi_ble_set_ae_data (void * ble_ae_data)

Update AE advertiser data.

Parameters
[in]ble_ae_data

Extended Advertising data to be updated

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function sets the AE advertiser data used in advertising PDUs.

  • Refer to Bluetooth specification 5.3 for possible combinations ae_adv/scanresp data can be set for .


Definition at line 3572 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_set_ae_params#

int32_t rsi_ble_set_ae_params (void * ble_ae_params, int8_t * sel_tx_pwr)

Update AE parameters.

Parameters
[in]ble_ae_params

Extended Advertising parameters to be updated

[out]sel_tx_pwr

Output transmit power in dBm, ranging from -127 to +20.

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure


Definition at line 3585 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_start_ae_advertising#

int32_t rsi_ble_start_ae_advertising (void * adv_enable)

Enable or disable AE advertising.

Parameters
[in]adv_enable

Parameters to enable or disable specific advertising sets identified by advertising handle

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure


Definition at line 3597 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_app_adv_set_clear_or_remove#

int32_t rsi_ble_app_adv_set_clear_or_remove (uint8_t type, uint8_t handle)

Clear or remove an advertising set.

Parameters
[in]type

Set to 1 to clear, or 2 to remove an advertising set

[in]handle

Advertising handle identifying the advertising set to remove or clear. Possible values range from 0x00 to 0xEF.

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure


Definition at line 3610 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_app_set_periodic_ae_params#

int32_t rsi_ble_app_set_periodic_ae_params (void * periodic_adv_params)

Update periodic AE parameters.

Parameters
[in]periodic_adv_params

Periodic advertising parameters to be updated

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure


Definition at line 3622 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_app_set_periodic_ae_enable#

int32_t rsi_ble_app_set_periodic_ae_enable (uint8_t enable, uint8_t handle)

Enable or disable periodic advertising.

Parameters
[in]enable

Set to 0 to enable, or 1 to include the ADI field in AUX_SYNC_IND PDUs

[in]handle

Advertising handle of the advertising set to enable or disable

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function requests the controller to enable or disable periodic advertising for the specified advertising set.


Definition at line 3637 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_ae_set_scan_params#

int32_t rsi_ble_ae_set_scan_params (void * ae_scan_params)

Update AE scan parameters.

Parameters
[in]ae_scan_params

Extended scan parameters to be updated

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function sets the extended scan parameters to be used on the physical advertising channels.


Definition at line 3651 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_ae_set_scan_enable#

int32_t rsi_ble_ae_set_scan_enable (void * ae_scan_enable)

Enable or disable legacy and extended scanning.

Parameters
[in]ae_scan_enable

Parameters specify whether to enable or disable both legacy and extended advertising PDUs

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure


Definition at line 3663 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_ae_set_periodic_sync#

int32_t rsi_ble_ae_set_periodic_sync (uint8_t type, void * periodic_sync_data)

Synchronize periodic advertising with advertiser.

Parameters
[in]type

Set to 1 to begin, 2 to cancel, or 3 to terminate the periodic advertising sync

[in]periodic_sync_data

Parameters for starting a perodic advertising sync operation

Returns

  • The following values are returned: 0 = success

  • The following values are returned: 0x4E42 = unknown advertising identifier

  • The following values are returned: 0x4E0C = command not permitted

Note

  • This function performs an operation to synchronize with a periodic advertising train from an advertiser and begin receiving periodic advertising packets.

  • The operation is either started, cancelled or terminated depending on the type parameter.


Definition at line 3682 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_ae_dev_to_periodic_list#

int32_t rsi_ble_ae_dev_to_periodic_list (void * dev_to_list)

Manage a device in the periodic advertiser list.

Parameters
[in]dev_to_list

Details of a device to be added to the periodic advertiser list

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function adds, removes, or clears a device from the periodic advertiser list.


Definition at line 3696 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_ae_read_periodic_adv_list_size#

int32_t rsi_ble_ae_read_periodic_adv_list_size (uint8_t * resp)

Get periodic advertiser list size.

Parameters
[out]resp

Periodic advertiser list size returned by the controller

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure


Definition at line 3708 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_extended_connect_with_params#

int32_t rsi_ble_extended_connect_with_params (void * ble_extended_conn_params)

Establish ACL connection to advertiser.

Parameters
[in]ble_extended_conn_params

Connection parameters

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function establishes an ACL connection to an advertiser, with the local device in the BLE central role.


Definition at line 3722 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h

rsi_ble_read_transmit_power#

int32_t rsi_ble_read_transmit_power (void * resp)

Get supported transmit power range.

Parameters
[out]resp

Minimum and maximum supported transmit power, returned by the controller. Power ranges from -127 dBm to +20 dBm.

Returns

  • The following values are returned: 0 = success

  • The following values are returned: !0 = failure

Note

  • This function requests the controller to return the minimum and maximum supported transmit power.


Definition at line 3736 of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h