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

How to get thingy data on nRF52840?

Hi.

I want to get thingy's sensor data on nRF52840.

I found that 'ble_app_multi_link_multi_role' example, but there are only get button and led state.

By using that project, i wrote sd_ble_gattc_char_value_by_uuid_read funtion to get data. But i get NRF_ERROR_BUSY and NRF_ERROR_INVALID_PARAM errors.

Could you help me to get thingy's sensor data? Thank you for reading.

    ble_thingy_tes_c_evt_t ble_thingy_tes_c_evt;
    uint32_t err_code;

    ble_gattc_handle_range_t   t_range;
    t_range.start_handle=0x0001;
    t_range.end_handle=0xffff;

    ble_uuid_t t_uuid;
    t_uuid.type = THINGY_TES_UUID_SERVICE;
    t_uuid.uuid = THINGY_TES_UUID_TEMPERATURE_CHAR;
    
    ble_thingy_tes_c_evt.conn_handle                  =   p_ble_thingy_tes_c->conn_handle;
    err_code   =   sd_ble_gattc_char_value_by_uuid_read(p_ble_thingy_tes_c->conn_handle , &t_uuid, &t_range);

Related