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

I can't search 128bits UUID service

I use the S110-6.0.0 to find the iphone ANCS service,return attr missing. The 16bits UUID is xF431.I have added the long UUID ble_uuid128_t ans_base_uuid = {0xD0, 0x00, 0x2D, 0x12, 0x1E, 0x4B, 0x0F, 0xA4, 0x99, 0x4E, 0xCE, 0xB5, 0x31, 0xf4, 0x05, 0x79} ,using sd_ble_uuid_vs_add(ble_uuid128_t const * const p_vs_uuid, uint8_t * const p_uuid_type)) function before sending service search requset. I found that p_vs_uuid pointe to a 16-octet (128-bit) little endian Vendor Specific UUID disregarding bytes 12 and 13.So how the SD know the short UUID 0xF4310 is the ANSC's short UUID ?My confusion come from follow the example of the ble_ans_c.c

BLE_UUID_BLE_ASSIGN(ans_uuid,BLE_ANCS_SERVICE_UUID ); err_code = sd_ble_gattc_primary_services_discover(p_ans->conn_handle, handle, &ans_uuid);

Here BLE_UUID_BLE_ASSIGN use 16bits UUID. the sd_ble_gattc_primary_services_discover() descript as : /* If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with type BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event.*/ I can't find where the "ble_vs_uuids_assign" defined,it means that the function using 128bits UUID?

Furthermore I change UUID to 0x1800 service,the GATTC run correct ,I don't know why? I have tried to debug the S110-8.0.0 ANSC example,unfortunately,the device go to HardFault after sending security request.

Parents Reply Children
No Data
Related