Some of the SPP event callback functions are listed below:

rsi_bt_on_spp_connect_t

Prototype                           typedef struct rsi_bt_event_spp_connect_s

{

uint8_t  dev_addr[RSI_DEV_ADDR_LEN];

} rsi_bt_event_spp_connect_t;

typedef void (*rsi_bt_on_spp_connect_t) (uint16_t resp_status, rsi_bt_event_spp_connect_t *spp_connect);

Input Arguments uint16_t resp_status  : Response status whether success or failure

uint8_t *remote_dev_addr : Remote device address

Description This callback is called when SPP connected event is raised from module. This event will be given by module when spp profile level connection happens from either side.

 

rsi_bt_on_spp_disconnect_t

Prototype                           typedef struct rsi_bt_event_spp_disconnect_s

{

uint8_t  dev_addr[RSI_DEV_ADDR_LEN];

} rsi_bt_event_spp_disconnect_t;

typedef void (*rsi_bt_on_spp_disconnect_t) (uint16_t resp_status, rsi_bt_event_spp_disconnect_t *spp_disconnect);

Input Arguments uint16_t resp_status  : Response status whether success or failure

uint8_t *remote_dev_addr : Remote device address

Description This callback is called when SPP disconnected event is raised from module. This event will be given by module when spp profile level disconnection happens from either side.

 

rsi_bt_on_spp_rx_data_t

Prototype                           typedef struct rsi_bt_event_spp_receive_s

{

uint16_t  data_len;

uint8_t   data[200];

} rsi_bt_event_spp_receive_t;

typedef void (*rsi_bt_on_spp_rx_data_t) (uint16_t resp_status, rsi_bt_event_spp_receive_t *spp_receive)

Input Arguments uint16_t resp_status  : Data receive status

rsi_bt_event_spp_receive_t *spp_receive: SPP profile received data structure

Description This callback is called when SPP receive event is raised from module. This event will be given by local device when it receives data from remote device.