Common#
Modules#
rsi_bt_resp_get_bt_stack_version_s
rsi_bt_set_antenna_tx_power_level_s
rsi_bt_cmd_update_gain_table_offset_or_maxpower_s
Typedefs#
Structure represents the Bluetooth response to get the BT stack version.
Structure represents the BLE set antenna request.
Structure represents the Bluetooth set feature bitmap.
Structure represents the BLE operation mode.
Structure represents the BLE power mode.
Structure represents the Bluetooth set antenna transmit power level.
Structure represents the Bluetooth Packet Error Rate (PER) statistics.
Structure represents the Bluetooth set local Bluetooth Device (BD) address.
Structure for updating gain table offset or max power in Bluetooth commands.
Functions#
Set TX power.
Set the device BD address. This is a blocking API.
Set the given name to local device. This is a blocking API.
Update gain table offset/max power. This is blocking API.
Get the local device name. This is a blocking API.
Get the RSSI of the remote device. This is a blocking API.
Get the local device address. This is a blocking API.
Get the BT stack version. This is a blocking API.
Initialize the BT device. This is a blocking API.
Deinitialize the BT device. This is a blocking API.
Select either internal / external antenna on the chip. This is a blocking API.
Select the power save profile mode for BT / BLE. This is a blocking API.
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 represents 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.
395
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_ble_set_antenna_t#
typedef struct rsi_ble_set_antenna_s rsi_ble_set_antenna_t
Structure represents the BLE set antenna request.
This structure is used to define the parameters for setting the BLE antenna, that includes the antenna value which, can be internal or external.
407
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_bt_set_feature_bitmap_t#
typedef struct rsi_bt_set_feature_bitmap_s rsi_bt_set_feature_bitmap_t
Structure represents the Bluetooth set feature bitmap.
This structure is used to define the parameters for setting the Bluetooth feature bitmap, which includes feature bits in a bit map format.
418
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_ble_oper_mode_t#
typedef struct rsi_ble_oper_mode_s rsi_ble_oper_mode_t
Structure represents the BLE operation mode.
This structure is used to define the parameters for the BLE operation mode, that includes Bluetooth features, and the module type.
431
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_ble_power_mode_t#
typedef struct rsi_ble_power_mode_s rsi_ble_power_mode_t
Structure represents the BLE power mode.
This structure is used to define the parameters for setting the BLE power mode, that includes the power mode and Ultra-Low-Power (ULP) mode enable settings.
444
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_bt_set_antenna_tx_power_level_t#
typedef struct rsi_bt_set_antenna_tx_power_level_s rsi_bt_set_antenna_tx_power_level_t
Structure represents the Bluetooth set antenna transmit power level.
This structure is used to define the parameters for setting the antenna transmit power level, which includes the protocol mode and transmit power.
459
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 represents the Bluetooth Packet Error Rate (PER) statistics.
This structure is used to define the parameters for collecting Bluetooth PER statistics, that includes counts of CRC fails, successful transmissions, and other relevant metrics.
491
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_bt_set_local_bd_addr_t#
typedef struct rsi_bt_set_local_bd_addr_s rsi_bt_set_local_bd_addr_t
Structure represents the Bluetooth set local Bluetooth Device (BD) address.
This structure is used to define the parameters for setting the local Bluetooth device address.
501
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
rsi_bt_cmd_update_gain_table_offset_or_maxpower_t#
typedef struct rsi_bt_cmd_update_gain_table_offset_or_maxpower_s rsi_bt_cmd_update_gain_table_offset_or_maxpower_t
Structure for updating gain table offset or max power in Bluetooth commands.
515
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common.h
Function Documentation#
rsi_ble_set_ble_tx_power#
int32_t rsi_ble_set_ble_tx_power (int8_t tx_power)
Set TX power.
[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
0x4D15 - Unsuported power index for 915
Note
This is a Blocking API.
Refer to the Status Codes section for the above error codes at wiseconnect-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 30
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 - 0 dBm mode.
33 to 63 : BLE - 10 dBm mode.
64 to 82 : BLE - 1 dBm - 18 dBm HP mode in the resolution of 1 dBm.
104 to 126: BLE - 0.5 dBm - 11 dBm HP mode in the resolution of 0.5 dBm.
127 : BLE HP Mode, maximum power supported.
Use the following setting to indicate tx_power in dBm (-8 to 18 dBm):
#define RSI_BLE_PWR_INX_DBM 1
When switching between HP mode and LP mode, 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
3146
of file components/device/silabs/si91x/wireless/ble/inc/rsi_ble_apis.h
rsi_bt_set_bd_addr#
int32_t rsi_bt_set_bd_addr (const uint8_t * dev_addr)
Set the device BD address. This is a blocking API.
[in] | dev_addr | - Public address of the device to be set. |
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 (that is, not immediate after opermode)
Note
This is a blocking API. Refer to the Status Codes section for the above error codes at wiseconnect-status-codes .
91
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. This is a blocking API.
[in] | local_name | - Name to be set to the local device. |
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
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
106
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. This is blocking API.
[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
|
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
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
130
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. This is a blocking API.
[out] | bt_resp_get_local_name | - This parameter is the response buffer to hold the response of this API. Refer to rsi_bt_resp_get_local_name_s structure for more information. |
Pre-conditions:
Device should be initialized before calling this API.
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
Note
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
147
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. This is a blocking API.
[in] | dev_addr | - Remote device address. |
[out] | resp | - Parameter to hold the response of this API, RSSI is filled in this resp parameter. |
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
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
162
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. This is a blocking API.
[out] | resp | - Parameter to hold the response of this API, local bd_addr is filled in this resp parameter. |
Pre-conditions:
Device should be initialized before calling this API.
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
Note
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
176
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. This is a blocking API.
[out] | bt_resp_get_bt_stack_version | - Response buffer to hold the response of this API. Refer to rsi_bt_resp_get_bt_stack_version_s structure for more info |
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
Note
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
188
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. This is a blocking API.
N/A |
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
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
202
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. This is a blocking API.
N/A |
Pre-conditions:
Device should be initialized before this API.
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
Note
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
215
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. This is a blocking API.
[in] | antenna_value | - Parameter is used to select either internal or external antenna. Possible values:
|
Pre-conditions:
Device should be initialized before calling this API.
Returns
The following values are returned:
0 - Success
Non-Zero Value - Failure
Note
Refer to the Status Codes section for the above error codes at wiseconnect-status-codes.
231
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. This is a blocking API.
[in] | psp_mode | Following psp_mode is defined.
|
[in] | psp_type | Following psp_type is defined.
|
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 wiseconnect-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.
262
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.
[in] | cmd_type | - Parameter to define the command id type as per operation.
|
[in] | rsi_bt_per_stats | - reference to the response structure. Refer to rsi_bt_per_stats_s structure for more information. |
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 to Error Codes section for common error codes.
280
of file components/device/silabs/si91x/wireless/ble/inc/rsi_bt_common_apis.h