Hi, I use nRF51422 in Dual mode(SD310) with SDK10 Version. The profile is CSCS. I want to ask How to just show Speed Sensor or Cadence Sensor. Here is what I did just show Speed Sensor to Phone side in cscs example code
static void csc_sim_measurement(ble_cscs_meas_t * p_measurement)
{
// Calculate simulated wheel revolution values.
p_measurement->is_wheel_rev_data_present = true;
p_measurement->cumulative_wheel_revs = 100;
p_measurement->last_wheel_event_time = 100;
// Calculate simulated cadence values.
p_measurement->is_crank_rev_data_present = false;
p_measurement->cumulative_crank_revs = 0;
p_measurement->last_crank_event_time = 0;
}
static void services_init(void)
{
uint32_t err_code;
ble_cscs_init_t cscs_init;
ble_bas_init_t bas_init;
ble_dis_init_t dis_init;
ble_sensor_location_t sensor_location;
// Initialize Cycling Speed and Cadence Service.
memset(&cscs_init, 0, sizeof(cscs_init));
cscs_init.evt_handler = NULL;
/*
cscs_init.feature = BLE_CSCS_FEATURE_WHEEL_REV_BIT | BLE_CSCS_FEATURE_CRANK_REV_BIT |BLE_CSCS_FEATURE_MULTIPLE_SENSORS_BIT;
*/
cscs_init.feature = BLE_CSCS_FEATURE_WHEEL_REV_BIT;
...............
}
static void gap_params_init(void)
{
uint32_t err_code;
ble_gap_conn_params_t gap_conn_params;
ble_gap_conn_sec_mode_t sec_mode;
.....
err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_CYCLING_SPEED_SENSOR);
APP_ERROR_CHECK(err_code);
.....
}
I use Phone App "Wahoo" to add this device still show up this is CYCLING_SPEED_AND_CADENCE not just Speed Sensor.
So what can I do. Thanks.