Some of the SMP event callback functions are listed below:

rsi_ble_on_smp_request_t

Prototype typedef struct rsi_bt_event_smp_req_s {  uint8_t  dev_addr[6];} rsi_bt_event_smp_req_t;

typedef void (*rsi_ble_on_smp_request_t) (rsi_bt_event_smp_req_t  *remote_dev_address);

Input Arguments rsi_bt_event_smp_req_t  *remote_dev_address : Device address of the advertising device.
Description This callback is called when SMP request is received from the remote device.

rsi_ble_on_smp_response_t

Prototype typedef struct rsi_bt_event_smp_resp_s { uint8_t  dev_addr[6];} rsi_bt_event_smp_resp_t;

typedef void (*rsi_ble_on_smp_response_t) (rsi_bt_event_smp_resp_t  *remote_dev_address);

Input Arguments rsi_bt_event_smp_resp_t  *remote_dev_address : Device address of the advertising device.
Description This callback is called when SMP response is received from the remote device.

rsi_ble_on_smp_passkey_t

Prototype typedef struct rsi_bt_event_smp_passkey_s { uint8_t  dev_addr[6];} rsi_bt_event_smp_passkey_t;

typedef void (*rsi_ble_on_smp_passkey_t) (rsi_bt_event_smp_passkey_t  *remote_dev_address);

 

Input Arguments rsi_bt_event_smp_passkey_t  *remote_dev_address: Device address of the disconnected device.
Description This callback is called when SMP passkey is received from the remote device.

rsi_ble_on_smp_failed_t

Prototype typedef struct rsi_bt_event_smp_failed_s { uint8_t  dev_addr[6];} rsi_bt_event_smp_failed_t;

typedef void (*rsi_ble_on_smp_failed_t) (uint16_t resp_status, rsi_bt_event_smp_failed_t  *remote_dev_address);

Input Arguments uint16_t resp_status: Response status whether success or ERROR

rsi_bt_event_smp_failed_t *remote_dev_address: Device address of the disconnected device.

Description This callback function will be called if the SMP process is failed with remote device.

rsi_ble_on_encrypt_started_t

Prototype typedef void (*rsi_ble_on_encrypt_started_t) (uint16_ resp_status);
Input Arguments uint16_t resp_status: Response status whether success or ERROR
Description This callback function will be called if the encryption process is started with the remote device.