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

Discovering problem for different 128-bit service and characteristic uuid as a central device

Hello;

I am using NRF51822 with SDK12.3 as a central device. I want to discover and connect a peripheral bluetooth device by using my NRF51822 central device.

If the service and characteristic is the same, for example service uuid is "00002234-b38d-4985-720e-0f993a68ee41" and characteristic uuid is "00002235-b38d-4985-720e-0f993a68ee41" , I can enable the notification of the characteristic and NRF51 get data from this peripheral device by using this characteristic.

However, If the service and characteristic is the different, for example service uuid is "680c21d9-c946-4c1f-9c11-baa1c21329e7" and characteristic uuid is "003bbdf2-c634-4b3d-ab56-7ec889b89a37", I can connect to this device but NRF51 discovers all characteristics as 0x00 and cannot enable the notification.

Is there a way to handle this problem?

Thanks.

Parents Reply
  • ble_app_uart_central.patch

    This is changed in your ble_app_uart_c example based on your uuid, you can try it.
    The UUID mechanism of the SDK is to add a 128bit base uuid through the sd_ble_uuid_vs_add function. After adding, it will return a UUID type. The subscript is incremented from BLE_UUID_TYPE_VENDOR_BEGIN. For example, after debugging add the characteristic base uuid, it returns uuid_type = 2. When the peripheral is connected, you can see To p_chars[i].characteristic.uuid.type = 2 in the ble_nus_c_on_db_disc_evt function
    P_chars[i].characteristic.uuid.uuid = 0xbdf2, service base uuid is the same.

Children
No Data
Related