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
  • thanks for reply 

    actually, my doubt is I am working on AT command project  it's like structured command is there

    is like (AT+UBTGDCS=<conn_handle>,<start><end>, - this command for  Discovers all characteristics of a service)

    conn_handle - Handle of the connected device.

    start           - Start handle of the service.

    end   -End handle of the service

    I need to pass this parameter through UART terminal like (putty) this response back from the server 

    Discovers all characteristics of a service...

  • I see. The handle values are not necessarily the same for all devices that use NUS, and will be different if you change configuration (order of adding other services compared to NUS etc). When I printed the handle values for the unmodified NUS example in SDK 17.0.2 I got the following (two normal characteristics plus the CCCD):

    <info> ble_nus_c: NUS RX characteristic handle value: 13
    <info> ble_nus_c: NUS TX characteristic handle value: 15
    <info> ble_nus_c: NUS TX CCCD handle value: 16

    So if you pick numbers <= 13 and >= 16 when you do service discovery, you would find all in this case.

Reply
  • I see. The handle values are not necessarily the same for all devices that use NUS, and will be different if you change configuration (order of adding other services compared to NUS etc). When I printed the handle values for the unmodified NUS example in SDK 17.0.2 I got the following (two normal characteristics plus the CCCD):

    <info> ble_nus_c: NUS RX characteristic handle value: 13
    <info> ble_nus_c: NUS TX characteristic handle value: 15
    <info> ble_nus_c: NUS TX CCCD handle value: 16

    So if you pick numbers <= 13 and >= 16 when you do service discovery, you would find all in this case.

Children
No Data
Related