Hello!
I am trying to implement the Cycling Power from https://devzone.nordicsemi.com/f/nordic-q-a/9169/cycling-power-service-0x1818
Please, could you show how we need to configure the service?
This way is not working:
memset(&cp_init, 0, sizeof(cp_init));
cp_init.ctrlpt_evt_handler = NULL;
cp_init.feature = BLE_CPS_FEATURE_WHEEL_REV_BIT | BLE_CPS_FEATURE_CRANK_REV_BIT | BLE_CPS_FEATURE_MULTIPLE_SENSORS_BIT;
// Here the sec level for the Cycling Speed and Cadence Service can be changed/increased.
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cp_init.cp_meas_attr_md.cccd_write_perm); // for the measurement characteristic, only the CCCD write permission can be set by the application, others are mandated by service specification
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cp_init.cp_feature_attr_md.read_perm); // for the feature characteristic, only the read permission can be set by the application, others are mandated by service specification
//cp_init.ctrlpt_evt_handler = sc_ctrlpt_event_handler;
err_code = ble_cps_init(&m_cp, &cp_init);
APP_ERROR_CHECK(err_code);