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

SDK15.2 sd_ble_gattc_char_value_by_uuid_read

Good day!

In SDK 12 I read values using this code:

                    ble_uuid_t m_uuid;
    				m_uuid.type = BLE_UUID_TYPE_VENDOR_BEGIN;
    				m_uuid.uuid = LGS_UUID_TYPE_CHAR;

    				ble_gattc_handle_range_t handle_range;
    				handle_range.start_handle = 0x0001;
    				handle_range.end_handle = 0xFFFF;

    				NRF_LOG_INFO("Reading....\n");
    				ret_code_t err_code = sd_ble_gattc_char_value_by_uuid_read(m_ble_lgs_c.conn_handle,
    						&m_uuid, &handle_range);
    				APP_ERROR_CHECK(err_code);

and handle value in ble_evt_handler:

case BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP: {

		
		uint8_t * ble_data_ptr =
				p_ble_evt->evt.gattc_evt.params.char_val_by_uuid_read_rsp.handle_value->p_value;
		printf("0x%x\t", *ble_data_ptr);
		printf("0x%x\r\n", *(ble_data_ptr + 1));

	}

This works fine, but using SDK 15 this code crashes with fatal error even with empty case BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP

Parents Reply Children
Related