Go to file
Atul Rai 1c1f807c30 Mesh: Close net session on device disconnection
On device disconnection, net session is not closed. On next
attempt to provision/connect a device, net session proxy is
not updated by net_session_open() as proxy_in is not NULL.
This causes meshctl to use invalid proxy resulting in below
crash.

0  strlen () at ../sysdeps/x86_64/strlen.S:106
1  0x00007f3a3c8b1ac4 in _dbus_string_init_const () from libdbus-1.so.3
2  0x00007f3a3c89ed15 in ?? () from libdbus-1.so.3
3  0x00007f3a3c89fba0 in dbus_message_new_method_call () from libdbus-1.so.3
4  0x0000000000419880 in g_dbus_proxy_method_call at gdbus/client.c:997
5  0x000000000040ab9d in mesh_gatt_write at mesh/gatt.c:347
6  0x000000000040d761 in send_mesh_pkt at mesh/net.c:1227
7  send_seg at mesh/net.c:1325
8  0x000000000040fa60 in net_access_layer_send at mesh/net.c:2163
9  0x0000000000413c74 in config_send at mesh/config-client.c:418
10 0x0000000000414886 in cmd_composition_get at mesh/config-client.c:470
11 0x000000000041ffd9 in cmd_exec at src/shared/shell.c:356
12 menu_exec at src/shared/shell.c:383
13 0x00000000004203a5 in shell_exec at src/shared/shell.c:426
14 0x0000000000420d24 in rl_handler (input=0x2259aa0 "composition-get ")
at src/shared/shell.c:571
15 0x00007f3a3c45d6f5 in rl_callback_read_char () from libreadline.so.6
16 0x0000000000420229 in input_read at src/shared/shell.c:1034
17 0x0000000000421655 in watch_callback at src/shared/io-glib.c:170
18 0x00007f3a3cb1a04a in g_main_context_dispatch () from libglib-2.0.so.0
19 0x00007f3a3cb1a3f0 in ?? () from libglib-2.0.so.0
20 0x00007f3a3cb1a712 in g_main_loop_run () from libglib-2.0.so.0
21 0x0000000000421bf5 in mainloop_run () at src/shared/mainloop-glib.c:73
22 0x000000000042115a in bt_shell_run () at src/shared/shell.c:962
23 0x0000000000405c5d in main at mesh/main.c:1992
2018-03-18 10:43:12 +02:00
android android/tester: Fix race in discovering devices 2017-12-22 10:14:22 +01: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 lines going beyond 80 columns 2018-03-01 11:23:09 +02:00
doc adapter: Add ConnectDevice method 2018-02-21 15:05:52 +01:00
emulator emulator: Add initial LE states to btdev and API to set new one 2018-02-12 10:06:37 +01:00
gdbus gdbus: Introduce functions appending to dbus message 2018-03-01 10:49:05 +02:00
gobex gobex: Make g_obex_apparam_encode NULL safe 2017-04-23 23:12:34 +03:00
lib shared/util: Introduce bt_appear_to_str 2017-12-21 10:08:22 -02:00
mesh Mesh: Close net session on device disconnection 2018-03-18 10:43:12 +02:00
monitor monitor: Fix uuid.h includes 2017-12-26 22:47:24 +02:00
obexd obexd: Remove unused source/header files for dbus 2018-03-01 10:49:05 +02:00
peripheral shared/gatt-client: Allow multiple ready callbacks 2017-07-04 12:30:05 +03:00
plugins plugins/sixaxis: Don't ignore previously setup devices 2017-11-30 09:53:45 +01:00
profiles avctp: Fix crash when disconnecting 2018-03-09 11:31:13 +02:00
src shared/shell: Enable generator for submenus 2018-03-15 15:51:25 +02:00
test tests: Remove test-thermometer 2017-11-02 16:42:20 +02:00
tools tools/bluetooth-player: Add item-generator for change-folder 2018-03-12 10:07:01 +02:00
unit unit/test-gdbus-client: Use g_dbus_dict_append_entry() 2018-03-01 10:49:05 +02:00
.gitignore tools: Add utility for Realtek config file parsing 2018-01-05 21:46:38 +01: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: Update Grzegorz's email 2017-12-22 13:23:18 +01:00
bootstrap Add --automake option 2006-08-18 19:41:53 +00:00
bootstrap-configure mesh: Add mesh to main bluez build 2017-08-21 12:54:11 +02:00
ChangeLog Release 5.49 2018-03-10 16:35:21 +01:00
configure.ac Release 5.49 2018-03-10 16:35:21 +01: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 Remove obsolete Debian notes from HACKING 2018-03-06 09:47:47 +02:00
INSTALL Big cleanup of CVS relics 2005-10-29 19:25:42 +00:00
Makefile.am shared/mainloop: Add GLIB wrapper 2018-02-22 11:52:16 +02:00
Makefile.obexd obexd: Remove unused source/header files for dbus 2018-03-01 10:49:05 +02:00
Makefile.plugins build: Fix make distcheck 2017-11-11 12:55:42 +01:00
Makefile.tools build: Include Mesh JSON files unconditionally in EXTRA_DIST 2018-03-08 15:00:21 +02: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