SPP#

Functions#

int32_t

Set the SPP profile mode. This is a blocking API.

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.

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.

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.

Function Documentation#

rsi_bt_spp_init#

rsi_bt_spp_init (void )

Set the SPP profile mode. This is a blocking API.

Parameters
[in]

Returns

  • 0 - Success Non-Zero Value - Failure

Note

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


Definition at line 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.

Parameters
[in]remote_dev_addr

- Remote device address

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 .


Definition at line 64 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.

Parameters
[in]remote_dev_addr

- This is the remote device address

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 .


Definition at line 91 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.

Parameters
[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

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 .


Definition at line 124 of file bluetooth/rsi_bt_spp_apis.c