0

I am developing custom profile with GATT service server (acting as peripheral). I define profile via structure btd_profile, and there are function pointers to adapter_probe, device_probe, connect ... When bluez deamon started adapter_probe is called and there I create GATT service.

After I connect to server via gatttool I see my services and characteristics, but device_probe function is not called. How can I then get nofication about device connection/disconnection, when some device is connected/disconnected to my server? And how works this device_probe and connect callback functions? When are they called then?

Thanks for help

Yanny
  • 178
  • 12

1 Answers1

0

While registering profile if we pass Role as "server" then only server related function will be called i.e adapter_probe etc. if we pass Role as "client" then device_probe will be called. By default bluez enables both the thing but if you pass role as "server" or "client" then it will change accordingly. While registering profile pass role as NULL then both will be enabled

ASB
  • 324
  • 1
  • 2
  • 7