SPP#
Functions#
Set the SPP profile mode. This is a blocking API.
Initiate the SPP profile level connection. This is a blocking API. A received event rsi_bt_on_spp_connect_t indicates that the connection opened successfully.
Initiate the SPP Profile level disconnection. This is a blocking API. A received event rsi_bt_on_spp_disconnect_t indicates that the spp connection is disconnected successfully.
Transfers the data through SPP profile. This is a blocking API.
Function Documentation#
rsi_bt_spp_init#
rsi_bt_spp_init (void )
Set the SPP profile mode. This is a blocking API.
[in] |
rsi_wireless_init() API needs to be called before this API.
Returns
0 - Success Non-Zero Value - Failure
Note
Refer Error Codes section for common error codes Error Codes .
40
of file bluetooth/rsi_bt_spp_apis.c
rsi_bt_spp_connect#
int32_t rsi_bt_spp_connect (uint8_t * remote_dev_addr)
Initiate the SPP profile level connection. This is a blocking API. A received event rsi_bt_on_spp_connect_t indicates that the connection opened successfully.
[in] | remote_dev_addr | - Remote device address |
rsi_bt_spp_init() API and rsi_bt_connect() API needs to be called before this API
Returns
0 - Success Non-Zero Value - Failure 0x4501 - ERR_BT_SPP_NOT_INITIALISED 0x4046 - ERR_BT_INVALID_ARGS 0x4102 - ERR_SDP_SRV_NOT_FOUND
Note
Refer Error Codes section for common error codes Error Codes .
63
of file bluetooth/rsi_bt_spp_apis.c
rsi_bt_spp_disconnect#
int32_t rsi_bt_spp_disconnect (uint8_t * remote_dev_addr)
Initiate the SPP Profile level disconnection. This is a blocking API. A received event rsi_bt_on_spp_disconnect_t indicates that the spp connection is disconnected successfully.
[in] | remote_dev_addr | - This is the remote device address |
rsi_bt_spp_connect() API need to be called before this API
Returns
0 - Success Non-Zero Value - Failure 0x4501 - ERR_BT_SPP_NOT_INITIALISED 0x4500 - ERR_BT_SPP_NOT_CONNECTED
Note
Refer Error Codes section for common error codes Error Codes .
89
of file bluetooth/rsi_bt_spp_apis.c
rsi_bt_spp_transfer#
int32_t rsi_bt_spp_transfer (uint8_t * remote_dev_addr, uint8_t * data, uint16_t length)
Transfers the data through SPP profile. This is a blocking API.
[in] | remote_dev_addr | - This is the remote device address |
[in] | data | - This is the data for transmission |
[in] | length | - This is the data length for transfer, Max length supported upto 1000 bytes |
rsi_bt_spp_connect() API needs to be called before this API.
Returns
0 - Success Non Zero Value - Failure 0x4501 - ERR_BT_SPP_NOT_INITIALISED 0x4500 - ERR_BT_SPP_NOT_CONNECTED 0x4201 - ERR_BT_RFCOMM_DISCONNECTED 0x4049 - ERR_BT_SOCK_STATE_INVALID
Note
Refer Error Codes section for common error codes Error Codes .
121
of file bluetooth/rsi_bt_spp_apis.c