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

How to get the 128-bit UUID of a peer device characteristic

I want to get the 128 characteristic UUID of the peer device during the connection phase. Now I use SDK is 15.3, the softdevice is 6.1, and only 16-bit UUIDs are obtained in the "discovery_start ()" code during the connection phase. How can I get the customization on the peer device Or SIG's 128-bit characteristic UUID?

  • Hi,

    What kind of characteristics are you trying to discover, Is it a vendor specific one? Could you try calling sd_ble_gattc_attr_info_discover()?

    regards

    Jared

  • 您好,我需要在连接设备时进行服务发现期间获取对等设备的128位服务UUID。在不知道对方拥有什么服务UUID的情况下,请确认这是一个128位服务UUID。您说了sd_ble_gattc_attr_info_discover(),该如何使用?我发现p_attr_info_disc_rsp_evt中没有数据,何时应该使用sd_ble_gattc_attr_info_discover()来获取数据。我什么时候应该提取数据并期待您的答复。

    问候

  • Hi,

    Google translate of your reply: 

    "Hi, I need to get the 128-bit service UUID of the peer device during service discovery when 
    connecting the device. Without knowing what service UUID the other party has, make sure it is a
    128-bit service UUID. You said sd_ble_gattc_attr_info_discover (), how to use it? I found no data in
    p_attr_info_disc_rsp_evt, when should I use sd_ble_gattc_attr_info_discover () to get the data.
    When should I extract the data and look forward to your reply".
    BLE_GATTC_EVT_ATTR_INFO_DISC_RSP event will be generated when the attributes have been received, the event structure will contain a ble_gattc_evt_attr_info_disc_rsp_t that contains your 128-bit UUID. You only need to pass the handle of your connection.
    regards
    Jared 
  • Hi Jared 

    I have the same problem and tried to call sd_ble_gattc_attr_info_discover for the unknown services.

    The response I got did not include a 128bit UUID but the 16bit UUID 2800, which is the GATT declaration for "Primary Service". 

    If I do a full sd_ble_gattc_attr_info_discover for the Nordic Blinky example I get this:

    handle=0x0001 uuid=[ 00002800-0000-1000-8000-00805f9b34fb ]
    handle=0x0003 uuid=[ 00002a00-0000-1000-8000-00805f9b34fb ]
    handle=0x0002 uuid=[ 00002803-0000-1000-8000-00805f9b34fb ]
    handle=0x0004 uuid=[ 00002803-0000-1000-8000-00805f9b34fb ]
    handle=0x0005 uuid=[ 00002a01-0000-1000-8000-00805f9b34fb ]
    handle=0x0006 uuid=[ 00002803-0000-1000-8000-00805f9b34fb ]
    handle=0x0007 uuid=[ 00002a04-0000-1000-8000-00805f9b34fb ]
    handle=0x0008 uuid=[ 00002803-0000-1000-8000-00805f9b34fb ]
    handle=0x0009 uuid=[ 00002aa6-0000-1000-8000-00805f9b34fb ]
    handle=0x000A uuid=[ 00002800-0000-1000-8000-00805f9b34fb ]
    handle=0x000B uuid=[ 00002800-0000-1000-8000-00805f9b34fb ]
    handle=0x000C uuid=[ 00002803-0000-1000-8000-00805f9b34fb ]
    handle=0x000D uuid=[ 00001524-1212-efde-1523-785feabcd123 ]
    handle=0x000E uuid=[ 00002902-0000-1000-8000-00805f9b34fb ]
    handle=0x000F uuid=[ 00002803-0000-1000-8000-00805f9b34fb ]
    handle=0x0010 uuid=[ 00001525-1212-efde-1523-785feabcd123 ]

    But not the correct 128bit UUID for the LED Button Service, which has the handle 0x000B.

    The characteristics assigned to this service (0x000D, 0x0010) although have the correct UUID.

    Is there another way to discover the service UUID if it is unknown?

    I use nRF5 SDK v15.3.0 and the Softdevice 6.1.1.

    Thanks, for your help.

    Regards

    Michael

Related