Linux-Bluetooth Archive on lore.kernel.org
 help / Atom feed
* BlueZ 5.50 not including GATT and GAP UUIDs in SDP list
@ 2018-12-03 18:03 Trevor Sutter
  2018-12-04 19:51 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Trevor Sutter @ 2018-12-03 18:03 UTC (permalink / raw)
  To: linux-bluetooth

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.

Thank you,
Trevor Sutter
This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: BlueZ 5.50 not including GATT and GAP UUIDs in SDP list
  2018-12-03 18:03 BlueZ 5.50 not including GATT and GAP UUIDs in SDP list Trevor Sutter
@ 2018-12-04 19:51 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2018-12-04 19:51 UTC (permalink / raw)
  To: TSutter; +Cc: linux-bluetooth

Hi Trevor,
On Mon, Dec 3, 2018 at 8:06 PM Trevor Sutter <TSutter@efji.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 18:03 BlueZ 5.50 not including GATT and GAP UUIDs in SDP list Trevor Sutter
2018-12-04 19:51 ` Luiz Augusto von Dentz

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable: git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox