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

GATT service start and end handles

hello,

i am working on nrf52 dk board .NUS sdk 16

 I'd like to know the start/end characteristic handle values for each service. Is the 32-bit service handle encoded as two 16-bit characteristic start/end handles? If not, is there a way to determine the start and end handles for a discovered service? 

please help this topic service start and end handles..

Parents
  • Hi,

    I am not sure I understand the question.

    There are only two characteristics for the NUS service, and their UUD is defined like this (from SDK code):

    #define NUS_BASE_UUID                  {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */
    #define BLE_UUID_NUS_SERVICE 0x0001                         /**< The UUID of the Nordic UART Service. */
    #define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0003               /**< The UUID of the TX Characteristic. */
    #define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0002               /**< The UUID of the RX Characteristic. */

    So you will only discover two handles for the NUS service. In theory the only way to determine those is to do service discovery, but if you know that it will never  change then you could in fact hard code the handles on the peer (see for instance this post). I am not sure if that is what you want, though.

Reply
  • Hi,

    I am not sure I understand the question.

    There are only two characteristics for the NUS service, and their UUD is defined like this (from SDK code):

    #define NUS_BASE_UUID                  {{0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}} /**< Used vendor specific UUID. */
    #define BLE_UUID_NUS_SERVICE 0x0001                         /**< The UUID of the Nordic UART Service. */
    #define BLE_UUID_NUS_TX_CHARACTERISTIC 0x0003               /**< The UUID of the TX Characteristic. */
    #define BLE_UUID_NUS_RX_CHARACTERISTIC 0x0002               /**< The UUID of the RX Characteristic. */

    So you will only discover two handles for the NUS service. In theory the only way to determine those is to do service discovery, but if you know that it will never  change then you could in fact hard code the handles on the peer (see for instance this post). I am not sure if that is what you want, though.

Children
No Data
Related