Hi Trevor, On Mon, Dec 3, 2018 at 8:06 PM Trevor Sutter <TSutter@xxxxxxxx> wrote: > > Hello, > > I am using BlueZ 5.50 on Linux 4.12.0 running in dual mode (BR/EDR and BLE). > > I recently upgraded from Bluez 5.46 and after doing so, I noticed that the GATT (1801) and GAP (1800) UUIDs are no longer getting added to my SDP list. > I looked through the source file history and, as far as I can tell, changes made to /src/gatt-database.c for commit 109b9fa51bfcd8d15143003729cf4c730c39fe72 (gatt: Add all services as records) are responsible. > > On startup we call: > btd_gatt_database_new() , which calls register_core_services() and gatt_db_register(), respectively. > > register_core_services() needs the gatt_db_service_added() callback to be registered by gatt_db_register() in order to add the GATT/GAP services to the SDP list, since it is called first, no callback is executed. > > See the following call stack: > > register_core_services > populate_gap_service/ populate_gatt_service > gatt_db_service_set_active > notify_service_changed -> gatt db will not be in the notify_list, no callback. > > I am not very familiar with the gatt/db code in BlueZ, but as a quick test, I inverted the order of the register_core_services() and gatt_db_register() calls and I now have the GATT and GAP entries in my SDP list. > > I would like confirmation that this is actually a bug, and that I do not have something else misconfigured. > And, if it is a bug, I would appreciate input on whether or not this is the correct fix. Thanks for the report, Ive sent a fix for it, let me know if you have any feedback about it. -- Luiz Augusto von Dentz