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

How to fetch peer's base uuid?

Hi experts,

I have just tried lbs example. I saw in the ble_lbs_c.h, the base uuid and service uuid are defined for the peripheral peers who are going to be connected. However, if I don't know these uuids, I would like to read them from the peripheral devices when they are discovered or connected. Is there any way to do this?

thanks.

Parents
  • As GATT Client you can do full GATT service discovery meaning read all handles and their UUIDs as soon as you connect and see GATT Server on the other side. But if you don't know it before connection then you obviously don't have it. Actually UUIDs are meant to be always known and public, that's how any application can work on top of ATT/GATT (= looks for the particular Service/Characteristic etc. all named just by UUIDs).

  • Thanks. Now, I can understand Service/Characteristic UUIDs are public and always know: the same products provide the same services.

    By the way, the nRF Connect app (called NRF Master Control Panel before) can tell the service UUID of the device after being connected, even if the base UUID is modified. How does the app find it? So I think, the BLE protocol should allow ble master (GATT client) to discover all UUIDs of peripheral (GATT server). Back to my problem, I tried to implement a ble center based on s132 to collect data from multi peripheral ble devices. However, all the peripheral ble devices own unique base UUID, and can't be probed one by one (lots of custom devices). db_discovery will fail if the base UUID is not correctly specified and passed to sd_ble_uuid_vs_add(). So I wonder if there is a way to read the UUID as the APP did.

    Thanks.

Reply
  • Thanks. Now, I can understand Service/Characteristic UUIDs are public and always know: the same products provide the same services.

    By the way, the nRF Connect app (called NRF Master Control Panel before) can tell the service UUID of the device after being connected, even if the base UUID is modified. How does the app find it? So I think, the BLE protocol should allow ble master (GATT client) to discover all UUIDs of peripheral (GATT server). Back to my problem, I tried to implement a ble center based on s132 to collect data from multi peripheral ble devices. However, all the peripheral ble devices own unique base UUID, and can't be probed one by one (lots of custom devices). db_discovery will fail if the base UUID is not correctly specified and passed to sd_ble_uuid_vs_add(). So I wonder if there is a way to read the UUID as the APP did.

    Thanks.

Children
No Data
Related