Merge lp:~kzapalowicz/bluez/feature-bluez-5.40-ble-fix into lp:~bluetooth/bluez/ubuntu

Proposed by Konrad Zapałowicz
Status: Work in progress
Proposed branch: lp:~kzapalowicz/bluez/feature-bluez-5.40-ble-fix
Merge into: lp:~bluetooth/bluez/ubuntu
Diff against target: 250 lines (+110/-90)
7 files modified
debian/50-bluetooth-hci-auto-poweron.rules (+0/-2)
debian/bluez.install (+1/-2)
debian/changelog (+20/-0)
debian/main.conf (+89/-0)
debian/patches/0001-profiles-audio-add-big-endian-structure-definition-f.patch (+0/-29)
debian/patches/0005-audio-media-return-empty-string-when-player-name-is-.patch (+0/-55)
debian/patches/series (+0/-2)
To merge this branch: bzr merge lp:~kzapalowicz/bluez/feature-bluez-5.40-ble-fix
Reviewer Review Type Date Requested Status
Simon Fels Pending
Review via email: mp+299297@code.launchpad.net

Commit message

New upstream version and drop of legacy hci init

This commit fixes the issues with BLE keyboards by first
upgrading the BlueZ version to the newest upstream which
is 5.40; second by dropping the legacy udev rules for hci
initialization in favor of auto discovery.

Description of the change

New upstream version and drop of legacy hci init

This commit fixes the issues with BLE keyboards by first
upgrading the BlueZ version to the newest upstream which
is 5.40; second by dropping the legacy udev rules for hci
initialization in favor of auto discovery.

To post a comment you must log in.

Unmerged revisions

21. By Konrad Zapałowicz

New upstream version
  - bluez 5.40
  - remove patches that are now upstream

20. By Simon Fels

* debian/50-bluetooth-hci-auto-poweron.rules:
  - Get rid of legacy udev rule to power on bluetooth controllers on
    startup. Using hciconfig for that is the legacy way and will lead
    to different problems as the kernel side stack wont initialize
    all needed subsystems when used. BlueZ introduced a replacement
    for this with 5.36 which basically tells the bluetoothd through
    a config option to turn on all found Bluetooth controllers by
    default. With changing this there should be no change in terms
    of functionality.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'debian/50-bluetooth-hci-auto-poweron.rules'
2--- debian/50-bluetooth-hci-auto-poweron.rules 2015-08-14 10:04:55 +0000
3+++ debian/50-bluetooth-hci-auto-poweron.rules 1970-01-01 00:00:00 +0000
4@@ -1,2 +0,0 @@
5-# Set bluetooth power up
6-ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/bin/hciconfig %k up"
7
8=== modified file 'debian/bluez.install'
9--- debian/bluez.install 2016-02-02 17:16:14 +0000
10+++ debian/bluez.install 2016-07-06 10:47:25 +0000
11@@ -1,4 +1,4 @@
12-src/main.conf etc/bluetooth
13+debian/main.conf etc/bluetooth
14 profiles/input/input.conf etc/bluetooth
15 # profiles/audio/audio.conf etc/bluetooth
16 profiles/network/network.conf etc/bluetooth
17@@ -25,7 +25,6 @@
18 lib/udev/hid2hci
19 lib/udev/rules.d/97-hid2hci.rules
20 attrib/gatttool usr/bin
21-debian/50-bluetooth-hci-auto-poweron.rules lib/udev/rules.d
22 #-- for systemd
23 lib/systemd/system/bluetooth.service
24 etc/dbus-1/system.d/bluetooth.conf
25
26=== modified file 'debian/changelog'
27--- debian/changelog 2016-03-01 15:19:16 +0000
28+++ debian/changelog 2016-07-06 10:47:25 +0000
29@@ -1,3 +1,23 @@
30+bluez (5.40-0ubuntu1) UNRELEASED; urgency=medium
31+
32+ * New upstream version
33+
34+ -- Konrad Zapałowicz <konrad.zapalowicz@canonical.com> Wed, 06 Jul 2016 12:11:00 +0200
35+
36+bluez (5.37-0ubuntu6) UNRELEASED; urgency=medium
37+
38+ * debian/50-bluetooth-hci-auto-poweron.rules:
39+ - Get rid of legacy udev rule to power on bluetooth controllers on
40+ startup. Using hciconfig for that is the legacy way and will lead
41+ to different problems as the kernel side stack wont initialize
42+ all needed subsystems when used. BlueZ introduced a replacement
43+ for this with 5.36 which basically tells the bluetoothd through
44+ a config option to turn on all found Bluetooth controllers by
45+ default. With changing this there should be no change in terms
46+ of functionality.
47+
48+ -- Simon Fels <simon.fels@canonical.com> Wed, 02 Mar 2016 08:20:11 +0100
49+
50 bluez (5.37-0ubuntu5) xenial; urgency=medium
51
52 [Tony Espy ]
53
54=== added file 'debian/main.conf'
55--- debian/main.conf 1970-01-01 00:00:00 +0000
56+++ debian/main.conf 2016-07-06 10:47:25 +0000
57@@ -0,0 +1,89 @@
58+[General]
59+
60+# Default adaper name
61+# Defaults to 'BlueZ X.YZ'
62+#Name = BlueZ
63+
64+# Default device class. Only the major and minor device class bits are
65+# considered. Defaults to '0x000000'.
66+#Class = 0x000100
67+
68+# How long to stay in discoverable mode before going back to non-discoverable
69+# The value is in seconds. Default is 180, i.e. 3 minutes.
70+# 0 = disable timer, i.e. stay discoverable forever
71+#DiscoverableTimeout = 0
72+
73+# How long to stay in pairable mode before going back to non-discoverable
74+# The value is in seconds. Default is 0.
75+# 0 = disable timer, i.e. stay pairable forever
76+#PairableTimeout = 0
77+
78+# Automatic connection for bonded devices driven by platform/user events.
79+# If a platform plugin uses this mechanism, automatic connections will be
80+# enabled during the interval defined below. Initially, this feature
81+# intends to be used to establish connections to ATT channels. Default is 60.
82+#AutoConnectTimeout = 60
83+
84+# Use vendor id source (assigner), vendor, product and version information for
85+# DID profile support. The values are separated by ":" and assigner, VID, PID
86+# and version.
87+# Possible vendor id source values: bluetooth, usb (defaults to usb)
88+#DeviceID = bluetooth:1234:5678:abcd
89+
90+# Do reverse service discovery for previously unknown devices that connect to
91+# us. This option is really only needed for qualification since the BITE tester
92+# doesn't like us doing reverse SDP for some test cases (though there could in
93+# theory be other useful purposes for this too). Defaults to 'true'.
94+#ReverseServiceDiscovery = true
95+
96+# Enable name resolving after inquiry. Set it to 'false' if you don't need
97+# remote devices name and want shorter discovery cycle. Defaults to 'true'.
98+#NameResolving = true
99+
100+# Enable runtime persistency of debug link keys. Default is false which
101+# makes debug link keys valid only for the duration of the connection
102+# that they were created for.
103+#DebugKeys = false
104+
105+# Restricts all controllers to the specified transport. Default value
106+# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
107+# Possible values: "dual", "bredr", "le"
108+#ControllerMode = dual
109+
110+# Enables Multi Profile Specification support. This allows to specify if
111+# system supports only Multiple Profiles Single Device (MPSD) configuration
112+# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
113+# Devices (MPMD) configurations.
114+# Possible values: "off", "single", "multiple"
115+#MultiProfile = off
116+
117+# Permanently enables the Fast Connectable setting for adapters that
118+# support it. When enabled other devices can connect faster to us,
119+# however the tradeoff is increased power consumptions. This feature
120+# will fully work only on kernel version 4.1 and newer. Defaults to
121+# 'false'.
122+#FastConnectable = false
123+
124+[Policy]
125+
126+# The ReconnectUUIDs defines the set of remote services that should try
127+# to be reconnected to in case of a link loss (link supervision
128+# timeout). The policy plugin should contain a sane set of values by
129+# default, but this list can be overridden here. By setting the list to
130+# empty the reconnection feature gets disabled.
131+#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb, 0000111f-0000-1000-8000-00805f9b34fb, 0000110a-0000-1000-8000-00805f9b34fb
132+
133+# ReconnectAttempts define the number of attempts to reconnect after a link
134+# lost. Setting the value to 0 disables reconnecting feature.
135+#ReconnectAttempts=7
136+
137+# ReconnectIntervals define the set of intervals in seconds to use in between
138+# attempts.
139+# If the number of attempts defined in ReconnectAttempts is bigger than the
140+# set of intervals the last interval is repeated until the last attempt.
141+#ReconnectIntervals=1, 2, 4, 8, 16, 32, 64
142+
143+# AutoEnable defines option to enable all controllers when they are found.
144+# This includes adapters present on start as well as adapters that are plugged
145+# in later on. Defaults to 'false'.
146+AutoEnable=true
147
148=== removed file 'debian/patches/0001-profiles-audio-add-big-endian-structure-definition-f.patch'
149--- debian/patches/0001-profiles-audio-add-big-endian-structure-definition-f.patch 2016-02-11 13:46:45 +0000
150+++ debian/patches/0001-profiles-audio-add-big-endian-structure-definition-f.patch 1970-01-01 00:00:00 +0000
151@@ -1,29 +0,0 @@
152-From d3056811f75aa788382f56848e3a871ae3cbbf33 Mon Sep 17 00:00:00 2001
153-From: Simon Fels <simon.fels@canonical.com>
154-Date: Thu, 11 Feb 2016 14:45:19 +0100
155-Subject: [PATCH] profiles: audio: add big endian structure definition for LDAC
156- codec
157-
158----
159- profiles/audio/a2dp-codecs.h | 5 +++++
160- 1 file changed, 5 insertions(+)
161-
162-diff --git a/profiles/audio/a2dp-codecs.h b/profiles/audio/a2dp-codecs.h
163-index e9da0bf..4fb5c0c 100644
164---- a/profiles/audio/a2dp-codecs.h
165-+++ b/profiles/audio/a2dp-codecs.h
166-@@ -234,6 +234,11 @@ typedef struct {
167- uint8_t channel_mode:4;
168- } __attribute__ ((packed)) a2dp_aptx_t;
169-
170-+typedef struct {
171-+ a2dp_vendor_codec_t info;
172-+ uint8_t unknown[2];
173-+} __attribute__ ((packed)) a2dp_ldac_t;
174-+
175- #else
176- #error "Unknown byte order"
177- #endif
178---
179-2.5.0
180-
181
182=== removed file 'debian/patches/0005-audio-media-return-empty-string-when-player-name-is-.patch'
183--- debian/patches/0005-audio-media-return-empty-string-when-player-name-is-.patch 2016-01-24 00:07:20 +0000
184+++ debian/patches/0005-audio-media-return-empty-string-when-player-name-is-.patch 1970-01-01 00:00:00 +0000
185@@ -1,55 +0,0 @@
186-From c9055958af1dec734b66bf4c941ee7392034c958 Mon Sep 17 00:00:00 2001
187-From: Simon Fels <simon.fels@canonical.com>
188-Date: Wed, 2 Dec 2015 11:58:54 +0100
189-Subject: [PATCH 5/5] audio/media: return empty string when player name is not
190- available
191-
192-If the name for the player is set as NULL we will crash later on
193-so taking a valid default is required.
194-
195-Crash observed without this:
196-
197-Program terminated with signal SIGSEGV, Segmentation fault.
198-0 strlen () at ../sysdeps/arm/armv6t2/strlen.S:85
199-85 ../sysdeps/arm/armv6t2/strlen.S: No such file or directory.
200-(gdb) bt
201-0 strlen () at ../sysdeps/arm/armv6t2/strlen.S:85
202-1 0xb6f13ebc in avrcp_handle_media_player_list (session=0xb8f339c0,
203- session=0xb8f339c0, end_item=<optimized out>, start_item=<optimized out>,
204- pdu=0xb8f43283) at profiles/audio/avrcp.c:1917
205-2 avrcp_handle_get_folder_items (session=0xb8f339c0, pdu=0xb8f43283,
206- transaction=<optimized out>) at profiles/audio/avrcp.c:1968
207-3 0xb6f13fb8 in handle_browsing_pdu (conn=<optimized out>,
208- transaction=<optimized out>, operands=0xb8f43283 "q\b",
209- operand_count=<optimized out>, user_data=0xb8f339c0)
210- at profiles/audio/avrcp.c:2028
211-4 0xb6f0f088 in session_browsing_cb (chan=<optimized out>,
212- cond=<optimized out>, data=0xb8f3ba28) at profiles/audio/avctp.c:930
213-5 0xb6e19e90 in g_main_dispatch (context=0xb8f28100)
214- at /build/buildd/glib2.0-2.44.1/./glib/gmain.c:3122
215-6 g_main_context_dispatch (context=context@entry=0xb8f28100)
216- at /build/buildd/glib2.0-2.44.1/./glib/gmain.c:3737
217-7 0xb6e1a114 in g_main_context_iterate (context=0xb8f28100,
218- block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
219- at /build/buildd/glib2.0-2.44.1/./glib/gmain.c:3808
220-8 0xb6e1a3b0 in g_main_loop_run (loop=0xb8f28030)
221- at /build/buildd/glib2.0-2.44.1/./glib/gmain.c:4002
222-9 0xb6efef3e in main (argc=1, argv=0xbebdde04) at src/main.c:661
223----
224- profiles/audio/media.c | 3 +++
225- 1 file changed, 3 insertions(+)
226-
227-Index: bluez-5.37/profiles/audio/media.c
228-===================================================================
229---- bluez-5.37.orig/profiles/audio/media.c
230-+++ bluez-5.37/profiles/audio/media.c
231-@@ -1018,6 +1018,9 @@ static const char *get_player_name(void
232- {
233- struct media_player *mp = user_data;
234-
235-+ if (!mp->name)
236-+ return "";
237-+
238- return mp->name;
239- }
240-
241
242=== modified file 'debian/patches/series'
243--- debian/patches/series 2016-02-11 13:46:45 +0000
244+++ debian/patches/series 2016-07-06 10:47:25 +0000
245@@ -14,5 +14,3 @@
246 # dropped with one of the next releases
247 0003-tools-mpris-proxy-allow-user-to-specify-different-mp.patch
248 0004-obexd-enable-ebook-backend-conditionally.patch
249-0005-audio-media-return-empty-string-when-player-name-is-.patch
250-0001-profiles-audio-add-big-endian-structure-definition-f.patch

Subscribers

People subscribed via source and target branches

to all changes: