Steffen Becker | 1 Apr 2012 16:45
Picon
Picon
Favicon

pand-error after installing bluez4.99 & patch

Hello,

it's me again and it's pretty annoying that i don't found any forum user 
who can help me, that's why i write to the mailinglist:
Until last week i've had no problems using the pand-command (with 
BlueZ-4.98).
But after installed BlueZ-4.99 and the Patch <<Adding SSP debug mode 
configuration to hciconfig>> (March, 19th) this command doesn't work.
Two PCs with a bluetooth3.0-Dongle:
PC2 # sdptool add NAP
PC1 # sdptool add NAP
PC2 # pand -s -r NAP -M
PC1 # pand -c <bluetooth-address>
-> no error message, but the connection failed, as seen in 
/var/lib/messages (of PC1):

Mar 29 16:12:29 localhost kernel: usb 2-1.1: new full-speed USB device numb
er 4 using ehci_hcd
Mar 29 16:12:29 localhost kernel: usb 2-1.1: New USB device found, idVendor
=0a5c, idProduct=2198
Mar 29 16:12:29 localhost kernel: usb 2-1.1: New USB device strings: 
Mfr=1, Product=2, SerialNumber=3
Mar 29 16:12:29 localhost kernel: usb 2-1.1: Product: Broadcom Bluetooth 
3.0 Device
Mar 29 16:12:29 localhost kernel: usb 2-1.1: Manufacturer: Broadcom Corp
Mar 29 16:12:29 localhost kernel: usb 2-1.1: SerialNumber: 000272240204
Mar 29 16:12:29 localhost bluetoothd[2208]: HCI dev 0 registered
Mar 29 16:12:29 localhost bluetoothd[2208]: Listening for HCI events on hci0
Mar 29 16:12:29 localhost /etc/init.d/bluetooth[3063]: status: inactive
Mar 29 16:12:29 localhost bluetoothd[2208]: HCI dev 0 up
(Continue reading)

Arik Nemtsov | 2 Apr 2012 09:03

Re: [PATCH v6 0/6] Implement ProximityReporter profiles

ping?

On Tue, Mar 27, 2012 at 22:24, Arik Nemtsov <arik@...> wrote:
> This patch-set implements the Link loss and Immediate Alert GATT
> server profiles.
>
> A few API calls are added/changed in preparation, the most notable of
> which is the addition of the remote-device to each GATT read/write callback.
>
> The new profiles are separated into their own files for clarity.
>
> A ProximityReporter D-Bus interface is registered for each remote device.
> Property queries and PropertyChanged notifications are implemented, in
> accordance to doc/proximity-api.txt.
>
> v5->6: Fix immalert bug on unregister path. Rename att-bluez.h to
> att-database.h. Rebase on latest master (Makefile.am changes).
>
> Arik Nemtsov (6):
>  att: add remote btd_device to ATT read/write callbacks
>  proximity: reporter: save global D-Bus connection
>  proximity: reporter: move definitions to .h and add util function
>  proximity: link loss: implement link loss server
>  proximity: immediate alert: implement immediate alert server
>  proximity: reporter: implement D-Bus API
>
>  Makefile.am            |    4 +-
>  attrib/att-database.h  |   44 +++++++
>  attrib/att.h           |   20 ---
>  attrib/gatt-service.c  |    1 +
(Continue reading)

Siarhei Siamashka | 2 Apr 2012 11:44
Picon

Re: [PATCH] Re: A2DP quality (bluetooth-alsa)

On Wed, Mar 28, 2012 at 2:28 AM, qduaty <qduaty@...> wrote:
> ALSA bitpool patch is attached.
>
> 2012/3/27 Siarhei Siamashka <siarhei.siamashka@...>:
>> The first patch adds debug prints to syslog from sbc encoder, just to
>> clearly confirm the real bitpool used by the encoder.
>
> It obviously worked:
>
> Mar 27 17:49:41 machina-turbo pulseaudio[2355]: sbc_encode: bitpool set to 138
>
>> The second patch removes default_bitpool() limitation, and this boosts
>> bitpool from 53 to 64 for me.
>
> I found it was my device that prevented Bluez from using higher
> bitpools. Bluez assumes that requesting a wider range of bitpools from
> a device will cause an error, and indeed, my device cannot be
> configured with a bitpool range wider than 2-53. So the only way to
> achieve higher bitrates is to force them.

I guess this depends on the headset. Your patch hacks around and
allows you to use higher bitpool with your Nokia BH-503 headset. With
my Logitech FreePulse headset, your patch does not seem to break audio
playback, but on the other hand such radical changes are not needed
(just removing default_bitpool() is enough to be able to set bitpool
to 128 via ./asoundrc). For somebody else your patch might possibly
even break audio playback if their headset does not like to be forced.

> There is (was) a rather serious problem in the ALSA module, when it
> tried to set bitpool exceding device capabilities, it ended with an
(Continue reading)

Johan Hedberg | 2 Apr 2012 11:46
Picon
Gravatar

Re: [PATCH v6 0/6] Implement ProximityReporter profiles

Hi Arik,

On Mon, Apr 02, 2012, Arik Nemtsov wrote:
> ping?

Don't top post please.

> On Tue, Mar 27, 2012 at 22:24, Arik Nemtsov <arik@...> wrote:
> > This patch-set implements the Link loss and Immediate Alert GATT
> > server profiles.
> >
> > A few API calls are added/changed in preparation, the most notable of
> > which is the addition of the remote-device to each GATT read/write callback.
> >
> > The new profiles are separated into their own files for clarity.
> >
> > A ProximityReporter D-Bus interface is registered for each remote device.
> > Property queries and PropertyChanged notifications are implemented, in
> > accordance to doc/proximity-api.txt.
> >
> > v5->6: Fix immalert bug on unregister path. Rename att-bluez.h to
> > att-database.h. Rebase on latest master (Makefile.am changes).
> >
> > Arik Nemtsov (6):
> >  att: add remote btd_device to ATT read/write callbacks
> >  proximity: reporter: save global D-Bus connection
> >  proximity: reporter: move definitions to .h and add util function
> >  proximity: link loss: implement link loss server
> >  proximity: immediate alert: implement immediate alert server
> >  proximity: reporter: implement D-Bus API
(Continue reading)

Arik Nemtsov | 2 Apr 2012 13:12

Re: [PATCH v6 0/6] Implement ProximityReporter profiles

On Mon, Apr 2, 2012 at 12:46, Johan Hedberg <johan.hedberg@...> wrote:
>> On Tue, Mar 27, 2012 at 22:24, Arik Nemtsov <arik@...> wrote:
> Firstly the patches do not apply:
>
> Applying: att: add remote btd_device to ATT read/write callbacks
> /home/jh/src/bluez/.git/rebase-apply/patch:61: new blank line at EOF.
> +
> fatal: 1 line adds whitespace errors.
> Patch failed at 0001 att: add remote btd_device to ATT read/write callbacks

Ah there's an extra blank line at the end of the
"attrib/att-database.h" file I added. I'll remove it.

>
> And secondly you haven't replied anything to Lizardos mail yet.

Lizardo's only comment seems to be related to indentations of multiple
lines. I'll make some corrections and resubmit shortly.

Arik
Arik Nemtsov | 2 Apr 2012 13:17

[PATCH v7 2/6] proximity: reporter: save global D-Bus connection

This connection will be used by reporter GATT sub-profiles.
---
 proximity/reporter.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/proximity/reporter.c b/proximity/reporter.c
index bbb97ea..87242d2 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
 <at>  <at>  -40,6 +40,7  <at>  <at> 
 #include "attrib-server.h"
 #include "reporter.h"

+static DBusConnection *connection;
 #define IMMEDIATE_ALERT_SVC_UUID	0x1802
 #define LINK_LOSS_SVC_UUID		0x1803
 #define TX_POWER_SVC_UUID		0x1804
 <at>  <at>  -179,6 +180,9  <at>  <at>  int reporter_init(struct btd_adapter *adapter)
 		return -ENOTSUP;
 	}

+	connection = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
+	if (connection == NULL)
+		return -EIO;
 	DBG("Proximity Reporter for adapter %p", adapter);

 	register_link_loss(adapter);
 <at>  <at>  -190,4 +194,5  <at>  <at>  int reporter_init(struct btd_adapter *adapter)

 void reporter_exit(struct btd_adapter *adapter)
(Continue reading)

Arik Nemtsov | 2 Apr 2012 13:17

[PATCH v7 1/6] att: add remote btd_device to ATT read/write callbacks

This allows us to identify the remote device that made the ATT
read/write.
---
 attrib/att-database.h  |   43 +++++++++++++++++++++++++++++++++++++++++++
 attrib/att.h           |   20 --------------------
 attrib/gatt-service.c  |    1 +
 plugins/gatt-example.c |    4 +++-
 proximity/reporter.c   |    1 +
 src/attrib-server.c    |   20 +++++++++++++++-----
 time/server.c          |    7 +++++--
 7 files changed, 68 insertions(+), 28 deletions(-)
 create mode 100644 attrib/att-database.h

diff --git a/attrib/att-database.h b/attrib/att-database.h
new file mode 100644
index 0000000..bbd87ff
--- /dev/null
+++ b/attrib/att-database.h
 <at>  <at>  -0,0 +1,43  <at>  <at> 
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012 Texas Instruments Corporation
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
(Continue reading)

Arik Nemtsov | 2 Apr 2012 13:17

[PATCH v7 3/6] proximity: reporter: move definitions to .h and add util function

This allows us to re-use these definitions in GATT sub-profiles.
---
 proximity/reporter.c |   23 +++++++++++++----------
 proximity/reporter.h |   16 ++++++++++++++++
 2 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/proximity/reporter.c b/proximity/reporter.c
index 87242d2..2474fea 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
 <at>  <at>  -41,17 +41,20  <at>  <at> 
 #include "reporter.h"

 static DBusConnection *connection;
-#define IMMEDIATE_ALERT_SVC_UUID	0x1802
-#define LINK_LOSS_SVC_UUID		0x1803
-#define TX_POWER_SVC_UUID		0x1804
-#define ALERT_LEVEL_CHR_UUID		0x2A06
-#define POWER_LEVEL_CHR_UUID		0x2A07
-
-enum {
-	NO_ALERT = 0x00,
-	MILD_ALERT = 0x01,
-	HIGH_ALERT = 0x02,
-};
+
+const char *get_alert_level_string(uint8_t level)
+{
+	switch (level) {
+	case NO_ALERT:
(Continue reading)

Arik Nemtsov | 2 Apr 2012 13:17

[PATCH v7 6/6] proximity: reporter: implement D-Bus API

Use a device driver to track all GATT supporting devices and register
a D-Bus interface per remote device.

Implement the "GetProperties" method of the D-Bus interface by querying
the alert level of the remote device in the link-loss and
immediate-alert proximity profiles. The default alert level values for
non-connected devices are "none".
---
 proximity/reporter.c |  191 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 183 insertions(+), 8 deletions(-)

diff --git a/proximity/reporter.c b/proximity/reporter.c
index 4768e5f..01649b3 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
 <at>  <at>  -31,8 +31,14  <at>  <at> 
 #include <adapter.h>
 #include <errno.h>

+#include <dbus/dbus.h>
+#include <gdbus.h>
+
 #include "log.h"

+#include "dbus-common.h"
+#include "error.h"
+#include "device.h"
 #include "hcid.h"
 #include "att.h"
 #include "att-database.h"
(Continue reading)

Arik Nemtsov | 2 Apr 2012 13:17

[PATCH v7 4/6] proximity: link loss: implement link loss server

The profile is implemented in linkloss.[ch]. A GATT service is
registered with read/write callbacks on the link-loss alert level
attribute. The alert level is maintained per device. It is returned
on read and updated on write.

When the alert level is non-zero, a callback is registered on the
disconnection of the remote device. If a device with non-zero alert
state is disconnected, an appropriate PropertyChanged signal is emitted
with the alert level previously set by the device. We avoid emitting
a signal when the disconnection was requested by us.
---
 Makefile.am          |    3 +-
 proximity/linkloss.c |  337 ++++++++++++++++++++++++++++++++++++++++++++++++++
 proximity/linkloss.h |   26 ++++
 proximity/reporter.c |   42 +------
 4 files changed, 368 insertions(+), 40 deletions(-)
 create mode 100644 proximity/linkloss.c
 create mode 100644 proximity/linkloss.h

diff --git a/Makefile.am b/Makefile.am
index ddc28d2..12b3d81 100644
--- a/Makefile.am
+++ b/Makefile.am
 <at>  <at>  -222,7 +222,8  <at>  <at>  builtin_sources += thermometer/main.c \
             plugins/gatt-example.c \
             proximity/main.c proximity/manager.h proximity/manager.c \
 			proximity/monitor.h proximity/monitor.c \
-			proximity/reporter.h proximity/reporter.c
+			proximity/reporter.h proximity/reporter.c \
+			proximity/linkloss.h proximity/linkloss.c
(Continue reading)


Gmane