Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

How to get data from Unknown Service

Hello. I am trying to get data from BLE sensors. Sensors work like Nordic uart service. Main problem is that every BLE sensor has different 128-bit UUID of that service. If i use central nus example from nRF5 SDK and change NUS_BASE_UUID to  128-bit UUID of one sensor - it works well. But if take another sensor it doesnot work, because it has another 128 bit UUID. How can i handle that case if i dont know 128-bit UUID of the service?

Parents
  • Hello Dima,

    Thanks for your query.

    Central needs performing service discovery after connecting to the BLE device to know which service is available ( which should provides the UUID). And the central device needs to have information of the BLE service in order to read it. 

    From the SoftDevice v.7.2.0, this feature has been improved. You have to enable the BLE_GATTC_OPT_UUID_DISC option to discover 128 bit UUIDS more efficiently. This option enables the automatic insertion of discovered 128 bit UUIDs to the vendor specific UUID table. 

    You can find this here: sdk_17_2.0_folder\ components\softdevice\s140\doc

    Hope it helps.

    Best Regards,

    Kazi Afroza Sultana

  • I dont know how to use your information. What example should i see or what tutorial should i read to understand what you are talking about?

Reply Children
No Data
Related