Common#

Modules#

rsi_bt_resp_get_bt_stack_version_s

rsi_bt_per_stats_s

Typedefs#

Structure representing the Bluetooth response to get the BT stack version.

typedef struct rsi_bt_per_stats_s

Structure representing the Bluetooth Packet Error Rate (PER) statistics.

Functions#

int32_t
rsi_bt_set_bd_addr(const uint8_t *dev_addr)

Set the device BD address.

int32_t
rsi_bt_set_local_name(const uint8_t *local_name)

Set the given name to local device.

int32_t
rsi_bt_cmd_update_gain_table_offset_or_max_pwr(uint8_t node_id, uint8_t payload_len, uint8_t *payload, uint8_t req_type)

Update gain table offset/max power.

int32_t
rsi_bt_get_local_name(rsi_bt_resp_get_local_name_t *bt_resp_get_local_name)

Get the local device name.

int32_t
rsi_bt_get_rssi(uint8_t *dev_addr, int8_t *resp)

Get the RSSI of the remote device.

int32_t

Get the local device address.

int32_t
rsi_bt_get_bt_stack_version(rsi_bt_resp_get_bt_stack_version_t *bt_resp_get_bt_stack_version)

Get the BT stack version.

int32_t

Initialize the BT device.

int32_t

Deinitialize the BT device.

int32_t
rsi_bt_set_antenna(uint8_t antenna_value)

Select either internal / external antenna on the chip.

int32_t
rsi_bt_power_save_profile(uint8_t psp_mode, uint8_t psp_type)

Select the power save profile mode for BT / BLE.

int32_t
rsi_bt_per_stats(uint8_t cmd_type, struct rsi_bt_per_stats_s *per_stats)

Request the local device for BT PER operation.

Typedef Documentation#

rsi_bt_resp_get_bt_stack_version_t#

typedef struct rsi_bt_resp_get_bt_stack_version_s rsi_bt_resp_get_bt_stack_version_t

Structure representing the Bluetooth response to get the BT stack version.

This structure is used to define the parameters for the response that includes the Bluetooth stack version.


Definition at line 373 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h

rsi_bt_per_stats_t#

typedef struct rsi_bt_per_stats_s rsi_bt_per_stats_t

Structure representing the Bluetooth Packet Error Rate (PER) statistics.

This structure is used to define the parameters for collecting Bluetooth PER statistics, including counts of CRC fails, successful transmissions, and other relevant metrics.


Definition at line 473 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h

Function Documentation#

rsi_bt_set_bd_addr#

int32_t rsi_bt_set_bd_addr (const uint8_t * dev_addr)

Set the device BD address.

Parameters
[in]dev_addr

- public address of the device to be set

This is a blocking API.

  • Pre-conditions:

    • needs to be called immediately after device initialization.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

    • 3 - Command is given in wrong state (i.e., not immediate after opermode)

Note


Definition at line 74 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_set_local_name#

int32_t rsi_bt_set_local_name (const uint8_t * local_name)

Set the given name to local device.

Parameters
[in]local_name

- Name to be set to the local device.

This is a blocking API.

  • Pre-conditions:

    • Device should be initialized before calling this API.

Note

  • For BLE alone Opermode : When the name of the local device is set to a value with length more than 16 bytes then error is returned with an error code 0x4E66.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

Note


Definition at line 89 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_cmd_update_gain_table_offset_or_max_pwr#

int32_t rsi_bt_cmd_update_gain_table_offset_or_max_pwr (uint8_t node_id, uint8_t payload_len, uint8_t * payload, uint8_t req_type)

Update gain table offset/max power.

Parameters
[in]node_id

- Node ID (0 - BLE, 1 - BT).

[in]payload_len

- Length of the payload.

[in]payload

- Payload containing table data of gain table offset/max power

[in]req_type

- Update gain table request type

  • 0 - Max power update

  • 1 - Max power offset update

  • 2 - LP_Chain 0dBm offset update

  • 3 - LP_chain 10dBm offset update.

This is blocking API.

  • Pre-conditions:

    • Device should be initialized before calling this API.

Returns

  • The following values are returned:

    • 0 - Success

    • 0x4F01 - Invalid gain table payload length

    • 0x4F02 - Invalid region.

    • 0x4F03 - Invalid gain table offset request type

    • 0x4F04 - Invalid node id.

Note


Definition at line 113 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_get_local_name#

int32_t rsi_bt_get_local_name (rsi_bt_resp_get_local_name_t * bt_resp_get_local_name)

Get the local device name.

Parameters
[out]bt_resp_get_local_name

- This parameter is the response buffer to hold the response of this API. Please refer rsi_bt_resp_get_local_name_s 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

Note


Definition at line 130 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_get_rssi#

int32_t rsi_bt_get_rssi (uint8_t * dev_addr, int8_t * resp)

Get the RSSI of the remote device.

Parameters
[in]dev_addr

- Remote device address.

[out]resp

- Parameter to hold the response of this API, RSSI is filled in this resp parameter.

This is a blocking API.

  • Pre-conditions:

    • rsi_bt_connect() API need to be called before this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

Note


Definition at line 145 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_get_local_device_address#

int32_t rsi_bt_get_local_device_address (uint8_t * resp)

Get the local device address.

Parameters
[out]resp

- Parameter to hold the response of this API, local bd_addr is filled in this resp parameter.

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

Note


Definition at line 159 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_get_bt_stack_version#

int32_t rsi_bt_get_bt_stack_version (rsi_bt_resp_get_bt_stack_version_t * bt_resp_get_bt_stack_version)

Get the BT stack version.

Parameters
[out]bt_resp_get_bt_stack_version

- Response buffer to hold the response of this API. Please refer rsi_bt_resp_get_bt_stack_version_s structure for more info

This is a blocking API. Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

Note


Definition at line 171 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_init#

int32_t rsi_bt_init (void )

Initialize the BT device.

Parameters
N/A

This is a blocking API.

  • Pre-conditions:

    • Device should be initialized before calling this API.

    • If the device is in powersave, get back the device to ACTIVE MODE by using rsi_bt_power_save_profile()

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

Note


Definition at line 185 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_deinit#

int32_t rsi_bt_deinit (void )

Deinitialize the BT device.

Parameters
N/A

This is a blocking API.

  • Pre-conditions:

    • Device should be initialized before this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

Note


Definition at line 198 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_set_antenna#

int32_t rsi_bt_set_antenna (uint8_t antenna_value)

Select either internal / external antenna on the chip.

Parameters
[in]antenna_value

- Parameter is used to select either internal or external antenna. Possible values:

  • 0x00 RSI_SEL_INTERNAL_ANTENNA

  • 0x01 RSI_SEL_EXTERNAL_ANTENNA

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

Note


Definition at line 214 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_power_save_profile#

int32_t rsi_bt_power_save_profile (uint8_t psp_mode, uint8_t psp_type)

Select the power save profile mode for BT / BLE.

Parameters
[in]psp_mode

Following psp_mode is defined.

  • 0 - RSI_ACTIVE. In this mode module is active and power save is disabled.

  • 1 - RSI_SLEEP_MODE_1. On mode. In this sleep mode, SoC will never turn off, therefore no handshake is required before sending data to the module. BT/BLE does not support this mode.

  • 2 - RSI_SLEEP_MODE_2. Connected sleep mode. In this sleep mode, SoC will go to sleep based on GPIO or Message, therefore handshake is required before sending data to the module.

  • 8 - RSI_SLEEP_MODE_8 :Deep sleep mode with RAM RETENTION.

  • 10- RSI_SLEEP_MODE_10 : Deep sleep mode without RAM RETENTION. In this sleep mode, module will turn off the SoC. Since SoC is turn off, therefore handshake is required before sending data to the module.

[in]psp_type

Following psp_type is defined.

  • 0 - RSI_MAX_PSP. This psp_type will be used for max power saving

  • 1 - Fast PSP

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

Note

  • If the user wants to enable power save in CoEx mode (WLAN + BT LE) mode - It is mandatory to enable WLAN power save along with BT LE power save.

  • The device will enter into power save if and only if both protocol (WLAN, BLE) power save modes are enabled.

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

  • psp_type is only valid in psp_mode 2.

    • BT/BLE does not support in RSI_SLEEP_MODE_1.

    • BT/BLE supports only RSI_MAX_PSP mode. Remaining modes are not supported.


Definition at line 245 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h

rsi_bt_per_stats#

int32_t rsi_bt_per_stats (uint8_t cmd_type, struct rsi_bt_per_stats_s * rsi_bt_per_stats)

Request the local device for BT PER operation.

Parameters
[in]cmd_type

- Parameter to define the command id type for PER operation.

  • BT_PER_STATS_CMD_ID (0x08) - Command id enables PER statistics

  • BT_TRANSMIT_CMD_ID (0x15) - Command id enables PER transmit

  • BT_RECEIVE_CMD_ID (0x16) - Command id enables PER receive

[in]rsi_bt_per_stats

- reference to the response structure. Please refer to rsi_bt_per_stats_s structure for more info.

  • Pre-conditions:

    • Call rsi_bt_per_tx() or rsi_bt_per_rx() before calling this API.

Returns

  • The following values are returned:

    • 0 - Success

    • Non-Zero Value - Failure

Note

  • Refer Error Codes section for common error codes error-codes.


Definition at line 263 of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h