Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
Reconnection Configuration Service Server

This GATT-based service enables the control of certain communication parameters of a Bluetooth Low Energy peripheral device. More...

Detailed Description

This GATT-based service enables the control of certain communication parameters of a Bluetooth Low Energy peripheral device.

Data Structures

struct  e_ble_rcs_cleint_param_indctn_t
 Reconnection Configuration cleint parameter indication. More...
 
struct  st_ble_rcs_feat_t
 RC Feature value structure. More...
 
struct  st_ble_rcs_setting_t
 RC Settings value structure. More...
 
struct  st_ble_rcs_rccp_t
 Reconnection Configuration Control Point value structure. More...
 

Macros

#define BLE_RCS_RC_TIMEOUT_MAX_RANGE   (20000)
 RC control point Operand Ranges for client indication. More...
 
#define BLE_RCS_MIN_CON_INTERVAL_MIN   (0X0006)
 
#define BLE_RCS_MIN_CON_INTERVAL_MAX   (0X0C80)
 
#define BLE_RCS_MAX_CON_INTERVAL_MIN   (0X0006)
 
#define BLE_RCS_MAX_CON_INTERVAL_MAX   (0X0C80)
 
#define BLE_RCS_SLAVE_LATENCY_MAX   (499)
 
#define BLE_RCS_SUPVSN_TIMOUT_MULTPLR_MIN   (10)
 
#define BLE_RCS_SUPVSN_TIMOUT_MULTPLR_MAX   (3200)
 
#define BLE_RCS_ADVT_INTERVAL_MIN   (0X0020)
 
#define BLE_RCS_ADVT_INTERVAL_MAX   (0X4000)
 
#define BLE_RCS_ADVT_COUNT_MIN   (1)
 
#define BLE_RCS_ADVT_COUNT_MAX   (1000)
 
#define BLE_RCS_ADVT_REPTTN_TIME_MAX   (10000)
 
#define BLE_RCS_MISSING_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x80)
 If E2E-CRC is supported and a Write procedure is processed without CRC attached. More...
 
#define BLE_RCS_MISSING_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x80)
 If E2E-CRC is supported and a Write procedure is processed without CRC attached. More...
 
#define BLE_RCS_INVALID_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x81)
 If E2E-CRC is supported and a Write procedure is processed with invalid CRC value attached. More...
 
#define BLE_RCS_INVALID_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x81)
 If E2E-CRC is supported and a Write procedure is processed with invalid CRC value attached. More...
 

Enumerations

enum  e_ble_rcs_advt_config_t {
  BLE_RCS_ADV_IND = 0,
  BLE_RCS_ADV_SCAN_IND = 1,
  BLE_RCS_ADV_NONCONN_IND = 2,
  BLE_RCS_ADV_DIRECT_IND = 3
}
 RC control point Operand for set advt config opcode. More...
 
enum  e_ble_rcs_rccp_op_code_t {
  BLE_RCS_RCCP_OP_CODE_ENABLE_DISCONNECT = 0,
  BLE_RCS_RCCP_OP_CODE_GET_ACTUAL_COMMUNICATION_PARAMETERS = 1,
  BLE_RCS_RCCP_OP_CODE_PROPOSE_SETTINGS = 2,
  BLE_RCS_RCCP_OP_CODE_ACTIVATE_STORED_SETTINGS = 3,
  BLE_RCS_RCCP_OP_CODE_GET_MAX_VALUES = 4,
  BLE_RCS_RCCP_OP_CODE_GET_MIN_VALUES = 5,
  BLE_RCS_RCCP_OP_CODE_GET_STORED_VALUES = 6,
  BLE_RCS_RCCP_OP_CODE_SET_WHITE_LIST_TIMER = 7,
  BLE_RCS_RCCP_OP_CODE_GET_WHITE_LIST_TIMER = 8,
  BLE_RCS_RCCP_OP_CODE_SET_ADVERTISEMENT_CONFIGURATION = 9,
  BLE_RCS_RCCP_OP_CODE_UPGRADE_TO_LESC_ONLY = 10,
  BLE_RCS_RCCP_OP_CODE_SWITCH_OOB_PAIRING = 11,
  BLE_RCS_RCCP_OP_CODE_LIMITED_ACCESS = 12,
  BLE_RCS_RCCP_OP_CODE_PROCEDURE_RESPONSE = 14,
  BLE_RCS_RCCP_OP_CODE_COMMUNICATION_PARAMETER_RESPONSE = 15,
  BLE_RCS_RCCP_OP_CODE_WHITE_LIST_TIMER_RESPONSE = 16,
  BLE_RCS_RCCP_OP_CODE_CLIENT_PARAMETER_INDICATION = 17
}
 Reconnection Configuration Control Point Op Code enumeration. More...
 
enum  e_ble_rcs_rccp_operand_t {
  BLE_RCS_RCCP_OPERAND_SUCCESS = 1,
  BLE_RCS_RCCP_OPERAND_OPCODE_NOT_SUPPORTED = 2,
  BLE_RCS_RCCP_OPERAND_INVALID_OPERAND = 3,
  BLE_RCS_RCCP_OPERAND_OPERATION_FAILED = 4,
  BLE_RCS_RCCP_OPERAND_COMMUNICATION_PARAMETER_OUT_OF_RANGE = 5,
  BLE_RCS_RCCP_OPERAND_INVALID_PARAMETER_COMBINATION = 6,
  BLE_RCS_RCCP_OPERAND_DEVICE_BUSY = 7,
  BLE_RCS_RCCP_OPERAND_COMMUNICATION_PARAMETERS_REJECTED = 8,
  BLE_RCS_RCCP_OPERAND_PROPOSAL_ACCEPTED = 9
}
 Reconnection Configuration Control Point Operand enumeration. More...
 
enum  e_ble_rcs_char_idx_t {
  BLE_RCS_FEAT_IDX,
  BLE_RCS_SETTING_IDX,
  BLE_RCS_SETTING_CLI_CNFG_IDX,
  BLE_RCS_RCCP_IDX,
  BLE_RCS_RCCP_CLI_CNFG_IDX
}
 Reconnection Configuration characteristic Index. More...
 
enum  e_ble_rcs_event_t {
  BLE_RCS_EVENT_FEAT_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_FEAT_IDX, BLE_SERVS_READ_REQ),
  BLE_RCS_EVENT_SETTING_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_SETTING_IDX, BLE_SERVS_READ_REQ),
  BLE_RCS_EVENT_SETTING_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_SETTING_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ),
  BLE_RCS_EVENT_SETTING_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_RCS_SETTING_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP),
  BLE_RCS_EVENT_SETTING_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_SETTING_CLI_CNFG_IDX, BLE_SERVS_READ_REQ),
  BLE_RCS_EVENT_RCCP_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_RCCP_IDX, BLE_SERVS_WRITE_REQ),
  BLE_RCS_EVENT_RCCP_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_RCS_RCCP_IDX, BLE_SERVS_WRITE_COMP),
  BLE_RCS_EVENT_RCCP_HDL_VAL_CNF = BLE_SERVS_ATTR_EVENT(BLE_RCS_RCCP_IDX, BLE_SERVS_HDL_VAL_CNF),
  BLE_RCS_EVENT_RCCP_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_RCCP_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ),
  BLE_RCS_EVENT_RCCP_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_RCS_RCCP_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP),
  BLE_RCS_EVENT_RCCP_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RCS_RCCP_CLI_CNFG_IDX, BLE_SERVS_READ_REQ)
}
 Reconnection Configuration event type. More...
 

Functions

ble_status_t R_BLE_RCS_SetFeat (const st_ble_rcs_feat_t *p_value)
 Set RC Feature characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_RCS_GetFeat (st_ble_rcs_feat_t *p_value)
 Get RC Feature characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_RCS_SetSetting (const st_ble_rcs_setting_t *p_value)
 Set RC Settings characteristic value to the local GATT database. More...
 
ble_status_t R_BLE_RCS_GetSetting (st_ble_rcs_setting_t *p_value)
 Get RC Settings characteristic value from the local GATT database. More...
 
ble_status_t R_BLE_RCS_NotifySetting (uint16_t conn_hdl, const st_ble_rcs_setting_t *p_value)
 Send notification of RC Settings characteristic value to the remote device. More...
 
ble_status_t R_BLE_RCS_SetSettingCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set RC Settings cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_RCS_GetSettingCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get RC Settings cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_RCS_IndicateRccp (uint16_t conn_hdl, const st_ble_rcs_rccp_t *p_value)
 Send indication of Reconnection Configuration Control Point characteristic value to the remote device. More...
 
ble_status_t R_BLE_RCS_SetRccpCliCnfg (uint16_t conn_hdl, const uint16_t *p_value)
 Set Reconnection Configuration Control Point cli cnfg descriptor value to the local GATT database. More...
 
ble_status_t R_BLE_RCS_GetRccpCliCnfg (uint16_t conn_hdl, uint16_t *p_value)
 Get Reconnection Configuration Control Point cli cnfg descriptor value from the local GATT database. More...
 
ble_status_t R_BLE_RCS_Init (ble_servs_app_cb_t cb)
 Initialize Reconnection Configuration service. More...
 

Macro Definition Documentation

◆ BLE_RCS_RC_TIMEOUT_MAX_RANGE

#define BLE_RCS_RC_TIMEOUT_MAX_RANGE   (20000)

RC control point Operand Ranges for client indication.

◆ BLE_RCS_MISSING_CRC_ERROR [1/2]

#define BLE_RCS_MISSING_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x80)

If E2E-CRC is supported and a Write procedure is processed without CRC attached.

◆ BLE_RCS_MISSING_CRC_ERROR [2/2]

#define BLE_RCS_MISSING_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x80)

If E2E-CRC is supported and a Write procedure is processed without CRC attached.

◆ BLE_RCS_INVALID_CRC_ERROR [1/2]

#define BLE_RCS_INVALID_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x81)

If E2E-CRC is supported and a Write procedure is processed with invalid CRC value attached.

◆ BLE_RCS_INVALID_CRC_ERROR [2/2]

#define BLE_RCS_INVALID_CRC_ERROR   (BLE_ERR_GROUP_GATT | 0x81)

If E2E-CRC is supported and a Write procedure is processed with invalid CRC value attached.

Enumeration Type Documentation

◆ e_ble_rcs_advt_config_t

RC control point Operand for set advt config opcode.

◆ e_ble_rcs_rccp_op_code_t

Reconnection Configuration Control Point Op Code enumeration.

Enumerator
BLE_RCS_RCCP_OP_CODE_ENABLE_DISCONNECT 

Enable Disconnect

BLE_RCS_RCCP_OP_CODE_GET_ACTUAL_COMMUNICATION_PARAMETERS 

Get Actual Communication Parameters

BLE_RCS_RCCP_OP_CODE_PROPOSE_SETTINGS 

Propose Settings

BLE_RCS_RCCP_OP_CODE_ACTIVATE_STORED_SETTINGS 

Activate Stored Settings

BLE_RCS_RCCP_OP_CODE_GET_MAX_VALUES 

Get Max Values

BLE_RCS_RCCP_OP_CODE_GET_MIN_VALUES 

Get Min Values

BLE_RCS_RCCP_OP_CODE_GET_STORED_VALUES 

Get Stored Values

BLE_RCS_RCCP_OP_CODE_SET_WHITE_LIST_TIMER 

Set White List Timer

BLE_RCS_RCCP_OP_CODE_GET_WHITE_LIST_TIMER 

Get White List Timer

BLE_RCS_RCCP_OP_CODE_SET_ADVERTISEMENT_CONFIGURATION 

Set Advertisement Configuration

BLE_RCS_RCCP_OP_CODE_UPGRADE_TO_LESC_ONLY 

Upgrade to LESC Only

BLE_RCS_RCCP_OP_CODE_SWITCH_OOB_PAIRING 

Switch OOB Pairing

BLE_RCS_RCCP_OP_CODE_LIMITED_ACCESS 

Limited Access

BLE_RCS_RCCP_OP_CODE_PROCEDURE_RESPONSE 

Procedure Response

BLE_RCS_RCCP_OP_CODE_COMMUNICATION_PARAMETER_RESPONSE 

Communication Parameter Response

BLE_RCS_RCCP_OP_CODE_WHITE_LIST_TIMER_RESPONSE 

White List Timer Response

BLE_RCS_RCCP_OP_CODE_CLIENT_PARAMETER_INDICATION 

Client Parameter Indication

◆ e_ble_rcs_rccp_operand_t

Reconnection Configuration Control Point Operand enumeration.

Enumerator
BLE_RCS_RCCP_OPERAND_SUCCESS 

Response for successful operation

BLE_RCS_RCCP_OPERAND_OPCODE_NOT_SUPPORTED 

Response if unsupported opcode is received

BLE_RCS_RCCP_OPERAND_INVALID_OPERAND 

Response if operand received does not meet the requirements of the service

BLE_RCS_RCCP_OPERAND_OPERATION_FAILED 

Response if unable to complete a procedure for any reason

BLE_RCS_RCCP_OPERAND_COMMUNICATION_PARAMETER_OUT_OF_RANGE 

Response if operand received does not meet the range requirements

BLE_RCS_RCCP_OPERAND_INVALID_PARAMETER_COMBINATION 

Normal response if the combination of parameters received does not meet the requirements of the device

BLE_RCS_RCCP_OPERAND_DEVICE_BUSY 

Normal response if unable to start the disconnect procedure, e.g., if a measurement is pending

BLE_RCS_RCCP_OPERAND_COMMUNICATION_PARAMETERS_REJECTED 

Response when Reconnection Configuration client does not accept the request

BLE_RCS_RCCP_OPERAND_PROPOSAL_ACCEPTED 

Response when the Reconnection Configuration server accepts the parameters of the Propose Settings and the Activate Stored Settings procedure

◆ e_ble_rcs_char_idx_t

Reconnection Configuration characteristic Index.

◆ e_ble_rcs_event_t

Reconnection Configuration event type.

Function Documentation

◆ R_BLE_RCS_SetFeat()

ble_status_t R_BLE_RCS_SetFeat ( const st_ble_rcs_feat_t p_value)

Set RC Feature characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_RCS_GetFeat()

ble_status_t R_BLE_RCS_GetFeat ( st_ble_rcs_feat_t p_value)

Get RC Feature characteristic value from the local GATT database.

Parameters
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_RCS_SetSetting()

ble_status_t R_BLE_RCS_SetSetting ( const st_ble_rcs_setting_t p_value)

Set RC Settings characteristic value to the local GATT database.

Parameters
[in]p_valueCharacteristic value to set.
Returns
ble_status_t

◆ R_BLE_RCS_GetSetting()

ble_status_t R_BLE_RCS_GetSetting ( st_ble_rcs_setting_t p_value)

Get RC Settings characteristic value from the local GATT database.

Parameters
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_RCS_NotifySetting()

ble_status_t R_BLE_RCS_NotifySetting ( uint16_t  conn_hdl,
const st_ble_rcs_setting_t p_value 
)

Send notification of RC Settings characteristic value to the remote device.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueCharacteristic value to send.
Returns
ble_status_t

◆ R_BLE_RCS_SetSettingCliCnfg()

ble_status_t R_BLE_RCS_SetSettingCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Set RC Settings cli cnfg descriptor value to the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_RCS_GetSettingCliCnfg()

ble_status_t R_BLE_RCS_GetSettingCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

Get RC Settings cli cnfg descriptor value from the local GATT database.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_RCS_IndicateRccp()

ble_status_t R_BLE_RCS_IndicateRccp ( uint16_t  conn_hdl,
const st_ble_rcs_rccp_t p_value 
)

Send indication of Reconnection Configuration Control Point characteristic value to the remote device.

Parameters
[in]conn_hdlConnection handle.
[in]p_valueCharacteristic value to send.
Returns
ble_status_t

◆ R_BLE_RCS_SetRccpCliCnfg()

ble_status_t R_BLE_RCS_SetRccpCliCnfg ( uint16_t  conn_hdl,
const uint16_t *  p_value 
)

Set Reconnection Configuration Control Point cli cnfg descriptor value to the local GATT database.

Parameters
[in]p_valueDescriptor value to set.
Returns
ble_status_t

◆ R_BLE_RCS_GetRccpCliCnfg()

ble_status_t R_BLE_RCS_GetRccpCliCnfg ( uint16_t  conn_hdl,
uint16_t *  p_value 
)

Get Reconnection Configuration Control Point cli cnfg descriptor value from the local GATT database.

Parameters
[in]p_valueOutput location for the acquired descriptor value.
Returns
ble_status_t

◆ R_BLE_RCS_Init()

ble_status_t R_BLE_RCS_Init ( ble_servs_app_cb_t  cb)

Initialize Reconnection Configuration service.

Parameters
[in]cbService callback.
Returns
ble_status_t