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).

  • The device i want to connect is a nrf51822 device, whose app is modified from lbs example. it should be a GATT server i think. the other side is a 52832 device, running lbs_c example, so it is a GATT client. The two side should define the same service uuid, then 52832can successfully finish db discovery after connecting. if 52832 give wrong service uuid, db discovery will fail. I want to know if there is a method for 52832 to read full uuid from 51822 after connecting, then start db discovery. The reason is there are lots of custom devices with non-standard service uuid 52832 needs to connect. android app can do this, right?

Reply
  • The device i want to connect is a nrf51822 device, whose app is modified from lbs example. it should be a GATT server i think. the other side is a 52832 device, running lbs_c example, so it is a GATT client. The two side should define the same service uuid, then 52832can successfully finish db discovery after connecting. if 52832 give wrong service uuid, db discovery will fail. I want to know if there is a method for 52832 to read full uuid from 51822 after connecting, then start db discovery. The reason is there are lots of custom devices with non-standard service uuid 52832 needs to connect. android app can do this, right?

Children
No Data
Related