Go to file
Luiz Augusto von Dentz 006213cf4d device: Fix crashing when connecting ATT over BR/EDR
When remote connects ATT over BR/EDR the code will attempt to resolve
its attributes, but in the meantime a SDP session may be active to
resolve the services exposed over SDP which can cause a crash since ATT
may end up freeing the request causing the following trace:

bluetoothd[31069]: attrib/gattrib.c:g_attrib_unref() 0x73aae0: g_attrib_unref=0
bluetoothd[31069]: src/device.c:connect_profiles()
/org/bluez/hci0/dev_F4_5F_69_01_3D_69 (all), client :1.868
bluetoothd[31069]: src/device.c:connect_profiles() Resolving services for
/org/bluez/hci0/dev_F4_5F_69_01_3D_69
bluetoothd[31069]: src/adapter.c:connected_callback() hci0 device
F4:5F:69:01:3D:69 connected eir_len 13
bluetoothd[31069]: src/gatt-database.c:connect_cb() New incoming BR/EDR ATT
connection
bluetoothd[31069]: attrib/gattrib.c:g_attrib_ref() 0x73d280: g_attrib_ref=1
bluetoothd[31069]: src/device.c:load_gatt_db() Restoring F4:5F:69:01:3D:69 gatt
database from file
bluetoothd[31069]: No cache for F4:5F:69:01:3D:69
bluetoothd[31069]: src/gatt-client.c:btd_gatt_client_connected() Device
connected.
bluetoothd[31069]: src/device.c:gatt_debug() Primary service discovery failed.
ATT ECODE: 0x0a
bluetoothd[31069]: src/device.c:gatt_client_ready_cb() status: success, error:
0
bluetoothd[31069]: src/gatt-client.c:btd_gatt_client_ready() GATT client ready
bluetoothd[31069]: src/gatt-client.c:create_services() Exporting objects for
GATT services: F4:5F:69:01:3D:69
bluetoothd[31069]: src/device.c:device_svc_resolved()
/org/bluez/hci0/dev_F4_5F_69_01_3D_69 err 0
bluetoothd[31069]: src/device.c:connect_profiles()
/org/bluez/hci0/dev_F4_5F_69_01_3D_69 (all), client :1.868

Program received signal SIGSEGV, Segmentation fault.
0x000000000048eb8d in browse_cb ()
2017-07-07 11:12:08 +03:00
android input/hog-lib: Add support to gatt-db 2016-12-29 15:17:25 +02:00
attrib shared/att: Add ext_signed flag to be able to use external crypto 2015-05-19 16:42:43 +02:00
btio btio: Use local libbluetooth includes 2015-02-28 22:29:12 -08:00
client client: Fix memory leak due to the option to register an agent 2017-07-07 10:01:42 +03:00
doc client: Add release-notify command 2017-07-05 14:27:40 +03:00
emulator emulator: Update emulated controller HCI version from 4.2 to 5.0 2017-05-09 17:27:51 +03:00
gdbus gdbus: Fix the ordering of signals 2016-05-04 17:50:28 +03:00
gobex gobex: Make g_obex_apparam_encode NULL safe 2017-04-23 23:12:34 +03:00
lib lib: Add version number for Bluetooth 5.0 2017-01-29 21:31:33 -08:00
monitor monitor: Add missing UUID and EIR definitions 2017-06-22 23:48:28 +02:00
obexd obexd: Fix memory leak in phonebook-dummy 2017-07-07 10:01:42 +03:00
peripheral shared/gatt-client: Allow multiple ready callbacks 2017-07-04 12:30:05 +03:00
plugins policy: Fix removing reconnect flag while still connecting 2017-03-07 13:06:43 +02:00
profiles audio/avdtp: Increase timeout for Suspend request 2017-04-12 15:06:02 +03:00
src device: Fix crashing when connecting ATT over BR/EDR 2017-07-07 11:12:08 +03:00
test test/example-gatt-server: Make test service primary 2016-09-22 10:52:34 +03:00
tools shared/gatt-client: Allow multiple ready callbacks 2017-07-04 12:30:05 +03:00
unit shared/gatt-client: Allow multiple ready callbacks 2017-07-04 12:30:05 +03:00
.gitignore tools: Add testing utility for advertising 2017-06-07 14:12:54 -07:00
.mailmap Fix name in AUTHORS 2015-05-20 23:16:30 +03:00
acinclude.m4 build: Enable -Wformat -Wformat-security in maintainer mode 2015-01-02 17:59:46 +01:00
AUTHORS AUTHORS: mention Michał's contributions 2016-09-21 20:19:28 +02:00
bootstrap Add --automake option 2006-08-18 19:41:53 +00:00
bootstrap-configure build: Enable --enable-deprecated in bootstrap-configure 2017-03-01 13:57:57 +02:00
ChangeLog Release 5.45 2017-05-04 23:05:21 +02:00
configure.ac Release 5.45 2017-05-04 23:05:21 +02:00
COPYING Remove new page characters 2008-08-14 22:56:25 +02:00
COPYING.LIB Remove new page characters 2008-08-14 22:56:25 +02:00
HACKING HACKING: Fix nit in instructions 2016-04-22 15:05:03 +03:00
INSTALL Big cleanup of CVS relics 2005-10-29 19:25:42 +00:00
Makefile.am build: Update library version 2017-02-24 19:14:45 +01:00
Makefile.obexd build: Remove unneeded includes from obexd binaries 2015-03-01 00:48:41 -08:00
Makefile.plugins profiles/midi: Added MIDI over BLE profile implementation 2017-01-04 12:05:14 +02:00
Makefile.tools client: Add acquire-notify command 2017-07-05 14:27:38 +03:00
NEWS Initial revision 2002-03-08 21:10:06 +00:00
README build: Add testing config option 2017-01-17 11:27:26 +02:00
TODO TODO: Update GATT/ATT items 2016-03-14 16:42:59 +02:00

BlueZ - Bluetooth protocol stack for Linux
******************************************

Copyright (C) 2000-2001  Qualcomm Incorporated
Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com>
Copyright (C) 2002-2010  Marcel Holtmann <marcel@holtmann.org>


Compilation and installation
============================

In order to compile Bluetooth utilities you need following software packages:
	- GCC compiler
	- GLib library
	- D-Bus library
	- udev library (optional)
	- readline (command line clients)

To configure run:
	./configure --prefix=/usr --mandir=/usr/share/man \
				--sysconfdir=/etc --localstatedir=/var

Configure automatically searches for all required components and packages.

To compile and install run:
	make && make install


Configuration and options
=========================

For a working system, certain configuration options need to be enabled:

	--enable-library

		Enable installation of Bluetooth library

		By default the Bluetooth library is no longer installed.

		The user interfaces or command line utilities do not
		require an installed Bluetooth library anymore. This
		option is provided for legacy third party applications
		that still depend on the library.

		When the library installation is enabled, it is a good
		idea to use a separate bluez-library or libbluetooth
		package for it.

	--disable-tools

		Disable support for Bluetooth utilities

		By default the Bluetooth utilities are built and also
		installed. For production systems the tools are not
		needed and this option allows to disable them to save
		build time and disk space.

		When the tools are selected, it is a good idea to
		use a separate bluez-tools package for them.

	--disable-cups

		Disable support for CUPS printer backend

		By default the printer backend for CUPS is build and
		also installed. For systems that do not require printing
		over Bluetooth, this options allows to disable it.

		When the CUPS backend is selected, it is a good idea to
		use a separate bluez-cups package for it.

	--disable-monitor

		Disable support for the Bluetooth monitor utility

		By default the monitor utility is enabled. It provides
		support for HCI level tracing and debugging. For systems
		that don't require any kind of tracing or debugging
		capabilities, this options allows to disable it.

		The monitor utility should be placed in the main package
		along with the daemons. It is universally useful.

	--disable-client

		Disable support for the command line client

		By default the command line client is enabled and uses the
		readline library. For specific systems where BlueZ is
		configured by other means, the command line client can be
		disabled and the dependency on readline is removed.

		The client should be placed in the main package along
		with the daemons. It is universally useful.

	--disable-systemd

		Disable integration with systemd

		By default the integration with systemd is enabled and
		installed. This gives the best integration into all
		distributions based on systemd.

		This option is provided for distributions that do not
		support systemd. In that case all integration with the
		init system is up to the package.

	--disable-a2dp

		Disable A2DP profile

		By default bluetoothd supports A2DP profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		audio capabilities.

	--disable-avrcp

		Disable AVRCP profile

		By default bluetoothd supports AVRCP profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		audio capabilities.

	--disable-network

		Disable PANU, NAP, GN profiles

		By default bluetoothd supports PANU, NAP and GN profile using a
		built-in plugin, this option disables it.

		This option is provided for distributions that do not have any
		network capabilities.

	--disable-hid

		Disable HID profile

		By default bluetoothd supports HID profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		input capabilities.

	--disable-hog

		Disable HoG profile

		By default bluetoothd supports HoG profile using a built-in
		plugin, this option disables it.

		This option is provided for distributions that do not have any
		input capabilities.

	--enable-testing

		Enable testing tools

		By default tools used only for testing emulation are disabled.
		This option can be used to enable them.

		It is not recommended to enable this option for production
		systems. These tools may contain tests that depend on specific
		environment or kernel features in development.

	--enable-experimental

		Enable experimental tools

		By default all tools that are still in development
		are disabled. This option can be used to enable them.

		It is not recommended to enable this option for production
		systems. The behavior of the experimental tools is unstable
		and might still change.

	--enable-deprecated

		Enable deprecated tools

		By defauld all tools that are no longer maintained are
		disabled. This option can be used to enable them.

		It is not recommended to enable this option for production
		systems. The behavior of the deprecated tools may be unstable
		or simply don't work anymore.

	--enable-nfc

		This option enable NFC pairing support.

		By default the integration with neard is disabled, this gives
		the option to enable it in system where neard is supported.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

	--enable-sap

		This option enable SAP profile using sap plugin.

		By default sap plugin is disabled since it requires tight
		integration with systems and is very rarely required.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

	--enable-health

		This option enable health profiles.

		By default health plugin is disabled since its profiles are
		target for the health industry.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

	--enable-midi

		This option enable MIDI support via ALSA Sequencer.

		By default midi plugin is disabled since it still considered
		experimental. When bluetoothd will create a new ALSA Sequencer
		client and port for each device connected that supports the
		MIDI GATT primary service.

		The plugin is built into bluetoothd therefore it does not need
		to be package separately.

Information
===========

Mailing lists:
	linux-bluetooth@vger.kernel.org

For additional information about the project visit BlueZ web site:
	http://www.bluez.org