Hi Marcel, > I do not like the fact of _new() an object and have to call _init() to use. Actually calling _new() should trigger all needed transaction. We might want to just do this: > > client = bt_gatt_client_new(att, mtu); > > And it will start the service discovery right away. As I said, it is fine to start the service discovery and set the ready handler later. Since we are main loop and single threaded this is totally fine. > Sounds good to me. >> My idea here was that each profile/plugin can register its own handler >> for the handles that they are interested in and get notified of a >> changed service. We could also have a single service changed handler >> here and the daemon code can then use that to go and probe each >> plugin/profile based on that. > > I am not sure about this. The services changed should be handled centrally in the client itself. It might be better than allow to register a changed notifier on the bt_gatt_service that we get. > What I meant here is that the client, as you said, will handle the change internally by rediscovering the involved services, updating its cache, and so on. It's nice to then notify the upper layer about the changes that occurred so that they can perform any necessary updates in their state. > Lets not bring handles into the game right here. It might be better to push this detail to later when the code is more complete. > I will add code for this handler when I add the service change handling later then. For now, I'll go ahead and remove the register/unregister functions that I introduced. -Arman -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html