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
  • FormerMember
    0 FormerMember

    The problem can be that the event BLE_GATTS_EVT_SYS_ATTR_MISSING is not being handled. If the application doesn't support boding, it can for example be handled the following way in on_ble_evt(..) in main.c:

    case BLE_GATTS_EVT_SYS_ATTR_MISSING:
            err_code = sd_ble_gatts_sys_attr_set(m_peripheral_conn_handle, NULL, 0);
            APP_ERROR_CHECK(err_code);
            break;
    

    Update 14.03.16: After a little thinking I see that adding BLE_GATTS_EVT_SYS_ATTR_MISSING will not help, because it requires the device to be a GATT server and not a GATT client.

    Could you try the ANCS example in SDK 8.1 with S110 v.8.0.0? Or SDK 6.1.0 and S110 v.7.3.0?

    Do you have a nRF51-DK or a nRF51-Dongle? If so, could you use the sniffer to track what is being transferred over the air? And upload the sniffer trace here?

    The sniffer should be used with Wireshark, and it works best with version 1.10, not one of the newer versions, this answer links to older version of wireshark.

    What do you mean by access the 128 bit UUID? This thread explains storing of a UUID added using sd_ble_uuid_vs_add(..). S110 v. 6.0.0 does support adding a custom UUID.

Reply
  • FormerMember
    0 FormerMember

    The problem can be that the event BLE_GATTS_EVT_SYS_ATTR_MISSING is not being handled. If the application doesn't support boding, it can for example be handled the following way in on_ble_evt(..) in main.c:

    case BLE_GATTS_EVT_SYS_ATTR_MISSING:
            err_code = sd_ble_gatts_sys_attr_set(m_peripheral_conn_handle, NULL, 0);
            APP_ERROR_CHECK(err_code);
            break;
    

    Update 14.03.16: After a little thinking I see that adding BLE_GATTS_EVT_SYS_ATTR_MISSING will not help, because it requires the device to be a GATT server and not a GATT client.

    Could you try the ANCS example in SDK 8.1 with S110 v.8.0.0? Or SDK 6.1.0 and S110 v.7.3.0?

    Do you have a nRF51-DK or a nRF51-Dongle? If so, could you use the sniffer to track what is being transferred over the air? And upload the sniffer trace here?

    The sniffer should be used with Wireshark, and it works best with version 1.10, not one of the newer versions, this answer links to older version of wireshark.

    What do you mean by access the 128 bit UUID? This thread explains storing of a UUID added using sd_ble_uuid_vs_add(..). S110 v. 6.0.0 does support adding a custom UUID.

Children
Related