Hallo comunnity
I have a sensor which is working is sending data via BLE and it has a 128 UUID bit service [0x 000000-000000-1000-8000-0080-5F9B34FB]
In order to do the discovery i should add it using sd_ble_uuid_vs_add () But I´ve problem there, in my code, the ble_uuid_t is not accepting me the .uuid, it gives me the follwing error: aggregate value used where an integer was expected.
static ble_uuid128_t quatServ128uuidd= {{0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00,
0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
static ble_uuid_t const QUAT_UUID_SERVICE =
{
.uuid = (uint16_t) quatServ128uuidd,
.type = BLE_UUID_TYPE_VENDOR_BEGIN
};
err_code = sd_ble_gattc_primary_services_discover(m_conn_handle, start_handle, &QUAT_UUID_SERVICE);
But In the ble_uuid_t I've problems to set it up.
Other questions it is about the ble_gattc_write_params_t, I have problem in the handle and p_value. When I compile ,it says: initializer element is not constant.
static uint16_t handle = 0x0022; /**<Quaternios handle>*/
static uint8_t* const p_value = {0x01, 0x01}; /**<Activiation for the
notifications>*/
/**<Parameters for notifications>*/
static ble_gattc_write_params_t const write_params =
{
.write_op = BLE_GATT_OP_WRITE_CMD,
.flags = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_WRITE,
.handle = handle,
.offset = 0,
.len = sizeof(p_value),
.p_value = p_value
}
Regards,
David Caraveo