This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE CSCS Appearance Question

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.

Parents
  • I have the same question.But I think it's not our fault,otherwise app's. Firstly, use nRF Connect ,you can see that wahoo's cadence sensor use UUID 0x1816, and appearance is 1157. When connected with wahoo's cadence sensor (called "RPM ODCE"), I also see two unknown services ,and do not know their function. I think that ,wahoo's app can recognize wahoo's cadence or speed,because they have private message. Strava also recognize wahoo's cadence sensor as speed & sensor. So it's up to apps to recognize and display related mode.image description

Reply
  • I have the same question.But I think it's not our fault,otherwise app's. Firstly, use nRF Connect ,you can see that wahoo's cadence sensor use UUID 0x1816, and appearance is 1157. When connected with wahoo's cadence sensor (called "RPM ODCE"), I also see two unknown services ,and do not know their function. I think that ,wahoo's app can recognize wahoo's cadence or speed,because they have private message. Strava also recognize wahoo's cadence sensor as speed & sensor. So it's up to apps to recognize and display related mode.image description

Children
Related