![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This service exposes speed,cadence and other data from a Running Speed and Cadence Sensor intended for fitness applications. More...
This service exposes speed,cadence and other data from a Running Speed and Cadence Sensor intended for fitness applications.
Data Structures | |
struct | st_ble_rscs_rsc_measurement_t |
RSC Measurement value structure. More... | |
struct | st_ble_rscs_rsc_feature_t |
RSC Feature value structure. More... | |
struct | st_ble_rscs_sc_control_point_t |
SC Control Point value structure. More... | |
Macros | |
#define | BLE_RSCS_PRV_WRITE_REQUEST_REJECTED (BLE_ERR_GROUP_GATT | 0x82) |
Write Request Rejected error code. More... | |
#define | BLE_RSCS_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN (17) |
Response Parameter length . More... | |
#define | BLE_RSCS_MAX_SENSOR_LOCATIONS_SUPPORTED (17) |
Max No of Supported Sensor Locations. More... | |
#define | BLE_RSCS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
Procedure Already in Progress error code. More... | |
#define | BLE_RSCS_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED_ERROR (BLE_ERR_GROUP_GATT | 0x81) |
Client Characteristic Configuration descriptor improperly configured error code. More... | |
Enumerations | |
enum | e_ble_rscs_sensor_location_sensor_location_t { BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_OTHER = 0, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_TOP_OF_SHOE = 1, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_IN_SHOE = 2, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_HIP = 3, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_WHEEL = 4, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_CRANK = 5, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_CRANK = 6, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_LEFT_PEDAL = 7, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_RIGHT_PEDAL = 8, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION__FRONT_HUB = 9, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_DROPOUT = 10, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_CHAINSTAY = 11, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_WHEEL = 12, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_REAR_HUB = 13, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_CHEST = 14, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_SPIDER = 15, BLE_RSCS_SENSOR_LOCATION_SENSOR_LOCATION_CHAIN_RING = 16 } |
Sensor Location Sensor Location enumeration. More... | |
enum | e_ble_rscs_sc_control_point_op_code_t { BLE_RSCS_SC_CONTROL_POINT_OP_CODE_RESERVED_FOR_FUTURE_USE = 0, BLE_RSCS_SC_CONTROL_POINT_OP_CODE_SET_CUMULATIVE_VALUE = 1, BLE_RSCS_SC_CONTROL_POINT_OP_CODE_START_SENSOR_CALIBRATION = 2, BLE_RSCS_SC_CONTROL_POINT_OP_CODE_UPDATE_SENSOR_LOCATION = 3, BLE_RSCS_SC_CONTROL_POINT_OP_CODE_REQUEST_SUPPORTED_SENSOR_LOCATIONS = 4, BLE_RSCS_SC_CONTROL_POINT_OP_CODE_RESPONSE_CODE = 16 } |
SC Control Point Op Code enumeration. More... | |
enum | e_ble_rscs_sc_control_point_response_value_t { BLE_RSCS_SC_CONTROL_POINT_RESPONSE_VALUE_RESERVED_FOR_FUTURE_USE__RESPONSE_PARAMETER__N_A_ = 0, BLE_RSCS_SC_CONTROL_POINT_RESPONSE_VALUE_SUCCESS__RESPONSE_PARAMETER__NONE_EXCEPT_FOR_OP_CODE_0X04_SEE_NOTE_BELOW_ = 1, BLE_RSCS_SC_CONTROL_POINT_RESPONSE_VALUE_OP_CODE_NOT_SUPPORTED__RESPONSE_PARAMETER__N_A_ = 2, BLE_RSCS_SC_CONTROL_POINT_RESPONSE_VALUE_INVALID_PARAMETER__RESPONSE_PARAMETER__NONE_ = 3, BLE_RSCS_SC_CONTROL_POINT_RESPONSE_VALUE_OPERATION_FAILED__RESPONSE_PARAMETER__NONE_ = 4 } |
SC Control Point Response Value enumeration. More... | |
enum | e_ble_rscs_char_idx_t { BLE_RSCS_RSC_MEASUREMENT_IDX, BLE_RSCS_RSC_MEASUREMENT_CLI_CNFG_IDX, BLE_RSCS_RSC_FEATURE_IDX, BLE_RSCS_SENSOR_LOCATION_IDX, BLE_RSCS_SC_CONTROL_POINT_IDX, BLE_RSCS_SC_CONTROL_POINT_CLI_CNFG_IDX } |
Running Speed and Cadence Service characteristic Index. More... | |
enum | e_ble_rscs_event_t { BLE_RSCS_EVENT_RSC_MEASUREMENT_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_RSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_RSCS_EVENT_RSC_MEASUREMENT_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_RSCS_RSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_RSCS_EVENT_RSC_MEASUREMENT_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_RSC_MEASUREMENT_CLI_CNFG_IDX, BLE_SERVS_READ_REQ), BLE_RSCS_EVENT_RSC_FEATURE_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_RSC_FEATURE_IDX, BLE_SERVS_READ_REQ), BLE_RSCS_EVENT_SENSOR_LOCATION_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SENSOR_LOCATION_IDX, BLE_SERVS_READ_REQ), BLE_RSCS_EVENT_SC_CONTROL_POINT_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SC_CONTROL_POINT_IDX, BLE_SERVS_WRITE_REQ), BLE_RSCS_EVENT_SC_CONTROL_POINT_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SC_CONTROL_POINT_IDX, BLE_SERVS_WRITE_COMP), BLE_RSCS_EVENT_SC_CONTROL_POINT_HDL_VAL_CNF = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SC_CONTROL_POINT_IDX, BLE_SERVS_HDL_VAL_CNF), BLE_RSCS_EVENT_SC_CONTROL_POINT_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_RSCS_EVENT_SC_CONTROL_POINT_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_RSCS_EVENT_SC_CONTROL_POINT_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_RSCS_SC_CONTROL_POINT_CLI_CNFG_IDX, BLE_SERVS_READ_REQ) } |
Running Speed and Cadence Service event type. More... | |
Functions | |
ble_status_t | R_BLE_RSCS_NotifyRscMeasurement (uint16_t conn_hdl, const st_ble_rscs_rsc_measurement_t *p_value) |
Send notificatoin of RSC Measurement characteristic value to the remote device. More... | |
ble_status_t | R_BLE_RSCS_SetRscMeasCliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Set RSC Measurement cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_GetRscMeasCliCfg (uint16_t conn_hdl, uint16_t *p_value) |
Get RSC Measurement cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_SetRscFeat (const st_ble_rscs_rsc_feature_t *p_value) |
Set RSC Feature characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_GetRscFeat (st_ble_rscs_rsc_feature_t *p_value) |
Get RSC Feature characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_SetSenLoc (const uint8_t *p_value) |
Set Sensor Location characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_GetSenLoc (uint8_t *p_value) |
Get Sensor Location characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_IndicateScCP (uint16_t conn_hdl, const st_ble_rscs_sc_control_point_t *p_value) |
Send indication of SC Control Point characteristic value to the remote device. More... | |
ble_status_t | R_BLE_RSCS_SetScCPCliCfg (uint16_t conn_hdl, const uint16_t *p_value) |
Set SC Control Point cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_GetScCPCliCfg (uint16_t conn_hdl, uint16_t *p_value) |
Get SC Control Point cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_RSCS_Init (ble_servs_app_cb_t cb) |
Initialize Running Speed and Cadence Service service. More... | |
#define BLE_RSCS_PRV_WRITE_REQUEST_REJECTED (BLE_ERR_GROUP_GATT | 0x82) |
Write Request Rejected error code.
#define BLE_RSCS_SC_CONTROL_POINT_RESPONSE_PARAMETER_LEN (17) |
Response Parameter length .
#define BLE_RSCS_MAX_SENSOR_LOCATIONS_SUPPORTED (17) |
Max No of Supported Sensor Locations.
#define BLE_RSCS_PROCEDURE_ALREADY_IN_PROGRESS_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
Procedure Already in Progress error code.
#define BLE_RSCS_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED_ERROR (BLE_ERR_GROUP_GATT | 0x81) |
Client Characteristic Configuration descriptor improperly configured error code.
Sensor Location Sensor Location enumeration.
SC Control Point Op Code enumeration.
SC Control Point Response Value enumeration.
Running Speed and Cadence Service characteristic Index.
enum e_ble_rscs_event_t |
Running Speed and Cadence Service event type.
ble_status_t R_BLE_RSCS_NotifyRscMeasurement | ( | uint16_t | conn_hdl, |
const st_ble_rscs_rsc_measurement_t * | p_value | ||
) |
Send notificatoin of RSC Measurement characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | P_value | pointer to Characteristic value to send. |
ble_status_t R_BLE_RSCS_SetRscMeasCliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Set RSC Measurement cli cnfg descriptor value to the local GATT database.
[in] | conn_hdl | Connection handle. |
[in] | P_value | pointer to Descriptor value to set. |
ble_status_t R_BLE_RSCS_GetRscMeasCliCfg | ( | uint16_t | conn_hdl, |
uint16_t * | p_value | ||
) |
Get RSC Measurement cli cnfg descriptor value from the local GATT database.
[in] | conn_hdl | Connection handle. |
[out] | P_value | pointer to Output location for the acquired descriptor value. |
ble_status_t R_BLE_RSCS_SetRscFeat | ( | const st_ble_rscs_rsc_feature_t * | p_value | ) |
Set RSC Feature characteristic value to the local GATT database.
[in] | P_value | pointer to Characteristic value to set. |
ble_status_t R_BLE_RSCS_GetRscFeat | ( | st_ble_rscs_rsc_feature_t * | p_value | ) |
Get RSC Feature characteristic value from the local GATT database.
[out] | P_value | pointer Output location for the acquired descriptor value. |
ble_status_t R_BLE_RSCS_SetSenLoc | ( | const uint8_t * | p_value | ) |
Set Sensor Location characteristic value to the local GATT database.
[in] | P_value | pointer to Characteristic value to set. |
ble_status_t R_BLE_RSCS_GetSenLoc | ( | uint8_t * | p_value | ) |
Get Sensor Location characteristic value from the local GATT database.
[out] | p_value | pointer to Output location for the acquired descriptor value. |
ble_status_t R_BLE_RSCS_IndicateScCP | ( | uint16_t | conn_hdl, |
const st_ble_rscs_sc_control_point_t * | p_value | ||
) |
Send indication of SC Control Point characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | P_value | pointer to Characteristic value to send. |
ble_status_t R_BLE_RSCS_SetScCPCliCfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Set SC Control Point cli cnfg descriptor value to the local GATT database.
[in] | conn_hdl | Connection handle. |
[in] | P_value | pointer to Descriptor value to set. |
ble_status_t R_BLE_RSCS_GetScCPCliCfg | ( | uint16_t | conn_hdl, |
uint16_t * | p_value | ||
) |
Get SC Control Point cli cnfg descriptor value from the local GATT database.
[in] | conn_hdl | Connection handle. |
[out] | P_value | pointer to Output location for the acquired descriptor value. |
ble_status_t R_BLE_RSCS_Init | ( | ble_servs_app_cb_t | cb | ) |
Initialize Running Speed and Cadence Service service.
[in] | cb | Service callback. |
Function Name: R_BLE_RSCS_Init Description : This function initializes the GATTS Server and RSC Service, registers the callback function for GATTS. Arguments : cb - cal back to the initialization parameters data Return Value : BLE_SUCCESS - Success BLE_ERR_INVALID_PTR - The p_ntf_data parameter or the value field in the value field in the p_ntf_data parameter is NULL. BLE_ERR_INVALID_ARG - The value_len field in the value field in the p_ntf_data parameter is 0 or the attr_hdl field in the p_ntf_data parameters is 0.