Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to discover ble services at connected ble peripheral without adding services to softdevice

hi,

i am doing a project where i am using a pca10040 board as central device and a another pca10040 board as peripheral device.

i am able to connect peripheral device using device address and found available primary or secondary services on connected device using "find_adv_uuid()" from "ble_app_hrs_c" example of sdk 14.2.  now if peripheral device has custom service (128-bit uuid) or both custom services and primary services i will only get 128bit base uuid. now how to find available services on connected node and start receiving notification.

thanks.

Parents
  • Hi,

     

    When you connect to a peripheral, you do a service discovery, which provides you the whole list of available services and characteristics.

    If a peripheral has any CCCDs (client characteristic configuration descriptor), then it means that the peripheral supports notification/indication, meaning that it can send data to the central once permissions for this is granted. Please see our tutorials for more information: https://devzone.nordicsemi.com/tutorials/, more specifically this section: https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy

     

    Best regards,

    Håkon

  • hi, 

    thanks for your response,

    actually i am trying to replicate nrf connect mobile app in ble centeal device so that my central device can discoer all the services available in peripheral device.

    so i did service discovery in sdk14.2.0  ble_app_uart_c example.and ble_app_hrs_c example.

    so first in ble_app_hrs_c example i have put a break-point at "BLE_HRS_C_EVT_DISCOVERY_COMPLETE"

    and in "m_db_disc" i am able to see only heart rate service (0x180d) and battery service(0x180f) but not device info service (0x180A) and other flags with in m_db_disc like discovery in progrss is true and discovery pendi is false.

    in second ble_app_uart_c i have used for costom service dscovery.

    so i added costom base uuid of nordic thingy 52 and started service discovery again i only recived forst service 0x0100 not any other service.

    please let me know where i am getting wrong.

    thanks

Reply
  • hi, 

    thanks for your response,

    actually i am trying to replicate nrf connect mobile app in ble centeal device so that my central device can discoer all the services available in peripheral device.

    so i did service discovery in sdk14.2.0  ble_app_uart_c example.and ble_app_hrs_c example.

    so first in ble_app_hrs_c example i have put a break-point at "BLE_HRS_C_EVT_DISCOVERY_COMPLETE"

    and in "m_db_disc" i am able to see only heart rate service (0x180d) and battery service(0x180f) but not device info service (0x180A) and other flags with in m_db_disc like discovery in progrss is true and discovery pendi is false.

    in second ble_app_uart_c i have used for costom service dscovery.

    so i added costom base uuid of nordic thingy 52 and started service discovery again i only recived forst service 0x0100 not any other service.

    please let me know where i am getting wrong.

    thanks

Children
No Data
Related