* Re: bluetooth disabled with current 2.6.38-rc4
From: Justin Mattock @ 2011-02-16 15:34 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <20110216133411.GD14085@joana>
On Feb 16, 2011, at 5:34 AM, Gustavo F. Padovan wrote:
> Hi Justin,
>
> * Justin Mattock <justinmattock@gmail.com> [2011-02-15 19:26:12
> -0800]:
>
>>
>> On Feb 15, 2011, at 5:52 AM, Johan Hedberg wrote:
>>
>>> Hi Justin,
>>>
>>> On Sun, Feb 13, 2011, Justin Mattock wrote:
>>>> maybe I missed something, but my bluetooth is just not functioning
>>>> with
>>>> 2.6.38-rc4(works with 2.6.37-rc4)
>>>>
>>>> I've done a bisect on this, but was pointed to:
>>>> c0e45c1ca3162acb2e77b3d9e152ce6e7b6fa3f5
>>>> but doesn't look correct to me
>>>>
>>>> here is what I am seeing with the bluetooth-applet etc..:
>>>>
>>>> working correctly:
>>>> http://www.flickr.com/photos/44066293@N08/5443727238/
>>>>
>>>> not working:
>>>> http://www.flickr.com/photos/44066293@N08/5443124859/
>>>>
>>>> my /var/log/daemon.log shows:
>>>>
>>>> Feb 13 17:12:22 Linux-2 acpid: 1 client rule loaded
>>>> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: HCI dev 0 registered
>>>> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: Listening for HCI events
>>>> on hci0
>>>> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: HCI dev 0 up
>>>> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: Unable to find matching
>>>> adapter
>>>>
>>>> I can try at another bisect, but might take some time.. let me know
>>>> if there is something I can test
>>>> or do.
>>>
>>> Are you sure this is a kernel problem? There was a similar issue
>>> with
>>> BlueZ 4.86 or 4.87 which was already fixed. Could you try with 4.88?
>>>
>>> Johan
>>
>> o.k. I built 4.88 and still had the issue show up, except this time
>> no
>> icon(instead of the icon, that is not lit up)..
>>
>>
>> anyways I did do another bisect and had better results(hopefully)this
>> time..:
>>
>> 23bb57633df97ede067ea26f3cdc8a7ba2cd8109 is the first bad commit
>> commit 23bb57633df97ede067ea26f3cdc8a7ba2cd8109
>> Author: Johan Hedberg <johan.hedberg@nokia.com>
>> Date: Tue Dec 21 23:01:27 2010 +0200
>>
>> Bluetooth: Fix __hci_request synchronization for hci_open_dev
>>
>> The initialization function used by hci_open_dev (hci_init_req)
>> sends
>> many different HCI commands. The __hci_request function should
>> only
>> return when all of these commands have completed (or a timeout
>> occurs).
>> Several of these commands cause hci_req_complete to be called
>> which
>> causes __hci_request to return prematurely.
>>
>> This patch fixes the issue by adding a new hdev->req_last_cmd
>> variable
>> which is set during the initialization procedure. The
>> hci_req_complete
>> function will no longer mark the request as complete until the
>> command
>> matching hdev->req_last_cmd completes.
>>
>> Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
>> Acked-by: Marcel Holtmann <marcel@holtmann.org>
>> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
>>
>> :040000 040000 e8d8ae5fab74b2ba73d0c52e7e09b30e5df8484e
>> 8d1409e8dc2206492cb86e8848c8c23aff182e2a M include
>> :040000 040000 07fdb5f6ceadcfde12c46a3b5c82937b7dac892c
>> 8f3b08fbbc9fcd078d0f5224b8bc818eeb072dc4 M net
>
> Can you please send the hcidump output? There should be a package
> for it in
> your distribution, if not get the bluez-hcidump from git.kernel.org
>
> --
> Gustavo F. Padovan
> http://profusion.mobi
o.k...keep in mind I hve never really used that tool, but here goes:
HCI sniffer - Bluetooth packet analyzer ver 2.0
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 11 FD 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 0A FF 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 1B FC 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 22 FE 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 27 FF 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 15 FF 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 2C 00 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 2B 00 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 14 FF 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 21 FD 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 18 FB 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 09 FD 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 0C FC 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
A1 02 00 04 FE 00 00 00
> ACL data: handle 46 flags 0x02 dlen 12
L2CAP(d): cid 0x0041 len 8 [psm 0]
Justin P. Mattock
^ permalink raw reply
* [PATCH] Fix wrong header include on interactive gatttool
From: Claudio Takahasi @ 2011-02-16 15:11 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Claudio Takahasi
This wrong include is triggering compiler warning: implicit declaration
of function 'strdup'.
---
attrib/interactive.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/attrib/interactive.c b/attrib/interactive.c
index 83a0778..a98fe79 100644
--- a/attrib/interactive.c
+++ b/attrib/interactive.c
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
-#include <strings.h>
+#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH] Fix creating device object on disconnect complete event
From: Johan Hedberg @ 2011-02-16 15:03 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <1297862629-27805-1-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Wed, Feb 16, 2011, Luiz Augusto von Dentz wrote:
> There is no need to create a new object if disconnected and the device is
> not permanent/paired.
> ---
> src/event.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
Pushed upstream. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] telephony-maemo6: fix not cleaning up active calls list on exit
From: Johan Hedberg @ 2011-02-16 15:01 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
In-Reply-To: <1297861505-22296-1-git-send-email-luiz.dentz@gmail.com>
Hi Luiz,
On Wed, Feb 16, 2011, Luiz Augusto von Dentz wrote:
> This can cause problem if the adapter is reset in the middle of a call
> the indicators won't be update properly.
> ---
> audio/telephony-maemo6.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
Pushed upstream. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] Add increasing query OFFSET in phonebook_pull_read
From: Johan Hedberg @ 2011-02-16 15:00 UTC (permalink / raw)
To: Radoslaw Jablonski; +Cc: linux-bluetooth
In-Reply-To: <1297848855-29991-1-git-send-email-ext-jablonski.radoslaw@nokia.com>
Hi Radek,
On Wed, Feb 16, 2011, Radoslaw Jablonski wrote:
> It is needed to properly move starting index in tracker
> for next invocations of phonebook_pull_read - without that
> pull result for bigger queries (over one part of data) will
> be wrong (it will include duplicate vcard entries).
> ---
> plugins/phonebook-tracker.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
Pushed upstream. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH v3] Bluetooth: Use proper timer for hci command timout
From: Gustavo F. Padovan @ 2011-02-16 14:54 UTC (permalink / raw)
To: ville.tervo; +Cc: linux-bluetooth
In-Reply-To: <1297866761-11270-1-git-send-email-ville.tervo@nokia.com>
Hi Ville,
* ville.tervo@nokia.com <ville.tervo@nokia.com> [2011-02-16 16:32:41 +0200]:
> From: Ville Tervo <ville.tervo@nokia.com>
>
> Use proper timer instead of hci command flow control to timeout
> failed hci commands. Otherwise stack ends up sending commands
> when flow control is used to block new commands.
>
> 2010-09-01 18:29:41.592132 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
> bdaddr 00:16:CF:E1:C7:D7 mode 2 clkoffset 0x0000
> 2010-09-01 18:29:41.592681 > HCI Event: Command Status (0x0f) plen 4
> Remote Name Request (0x01|0x0019) status 0x00 ncmd 0
> 2010-09-01 18:29:51.022033 < HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6
> bdaddr 00:16:CF:E1:C7:D7
>
> Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
> ---
> include/net/bluetooth/hci.h | 3 +++
> include/net/bluetooth/hci_core.h | 2 +-
> net/bluetooth/hci_core.c | 22 ++++++++++++++++------
> net/bluetooth/hci_event.c | 6 ++++++
> 4 files changed, 26 insertions(+), 7 deletions(-)
Applied to bluetooth-next, thanks.
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply
* [PATCH] telephony-maemo6: fix not cleaning up network status on exit
From: Luiz Augusto von Dentz @ 2011-02-16 14:38 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
This may cause indicators to not be reported correctly when adapter is
reset.
---
audio/telephony-maemo6.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index bf1e0c4..b0f314c 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -2025,6 +2025,9 @@ void telephony_exit(void)
g_free(net.operator_name);
net.operator_name = NULL;
+ net.status = NETWORK_REG_STATUS_UNKOWN;
+ net.signal_bars = 0;
+
g_free(last_dialed_number);
last_dialed_number = NULL;
--
1.7.1
^ permalink raw reply related
* [PATCH] telephony-maemo6: fix not cleaning up active calls list on exit
From: Luiz Augusto von Dentz @ 2011-02-16 14:37 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
This can cause problem if the adapter is reset in the middle of a call
the indicators won't be update properly.
---
audio/telephony-maemo6.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index dfa06d9..bf1e0c4 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -2028,6 +2028,9 @@ void telephony_exit(void)
g_free(last_dialed_number);
last_dialed_number = NULL;
+ g_slist_free(active_calls);
+ active_calls = NULL;
+
g_slist_foreach(calls, (GFunc) csd_call_free, NULL);
g_slist_free(calls);
calls = NULL;
--
1.7.1
^ permalink raw reply related
* [PATCH v3] Bluetooth: Use proper timer for hci command timout
From: ville.tervo @ 2011-02-16 14:32 UTC (permalink / raw)
To: linux-bluetooth; +Cc: padovan, Ville Tervo
From: Ville Tervo <ville.tervo@nokia.com>
Use proper timer instead of hci command flow control to timeout
failed hci commands. Otherwise stack ends up sending commands
when flow control is used to block new commands.
2010-09-01 18:29:41.592132 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:16:CF:E1:C7:D7 mode 2 clkoffset 0x0000
2010-09-01 18:29:41.592681 > HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 0
2010-09-01 18:29:51.022033 < HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6
bdaddr 00:16:CF:E1:C7:D7
Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
---
include/net/bluetooth/hci.h | 3 +++
include/net/bluetooth/hci_core.h | 2 +-
net/bluetooth/hci_core.c | 22 ++++++++++++++++------
net/bluetooth/hci_event.c | 6 ++++++
4 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index e756f82..6d4e116 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -119,6 +119,7 @@ enum {
#define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */
#define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */
#define HCI_INIT_TIMEOUT (10000) /* 10 seconds */
+#define HCI_CMD_TIMEOUT (1000) /* 1 seconds */
/* HCI data types */
#define HCI_COMMAND_PKT 0x01
@@ -244,6 +245,8 @@ enum {
#define HCI_AT_GENERAL_BONDING_MITM 0x05
/* ----- HCI Commands ---- */
+#define HCI_OP_NOP 0x0000
+
#define HCI_OP_INQUIRY 0x0401
struct hci_cp_inquiry {
__u8 lap[3];
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index d30b93c..ecd2acf 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -132,7 +132,6 @@ struct hci_dev {
unsigned int sco_pkts;
unsigned int le_pkts;
- unsigned long cmd_last_tx;
unsigned long acl_last_tx;
unsigned long sco_last_tx;
unsigned long le_last_tx;
@@ -143,6 +142,7 @@ struct hci_dev {
struct work_struct power_off;
struct timer_list off_timer;
+ struct timer_list cmd_timer;
struct tasklet_struct cmd_task;
struct tasklet_struct rx_task;
struct tasklet_struct tx_task;
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index c01415b..702d565 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -41,6 +41,7 @@
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/rfkill.h>
+#include <linux/timer.h>
#include <net/sock.h>
#include <asm/system.h>
@@ -623,6 +624,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
/* Drop last sent command */
if (hdev->sent_cmd) {
+ del_timer_sync(&hdev->cmd_timer);
kfree_skb(hdev->sent_cmd);
hdev->sent_cmd = NULL;
}
@@ -1066,6 +1068,16 @@ int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr)
return 0;
}
+/* HCI command timer function */
+static void hci_cmd_timer(unsigned long arg)
+{
+ struct hci_dev *hdev = (void *) arg;
+
+ BT_ERR("%s command tx timeout", hdev->name);
+ atomic_set(&hdev->cmd_cnt, 1);
+ tasklet_schedule(&hdev->cmd_task);
+}
+
/* Register HCI device */
int hci_register_dev(struct hci_dev *hdev)
{
@@ -1112,6 +1124,8 @@ int hci_register_dev(struct hci_dev *hdev)
skb_queue_head_init(&hdev->cmd_q);
skb_queue_head_init(&hdev->raw_q);
+ setup_timer(&hdev->cmd_timer, hci_cmd_timer, (unsigned long) hdev);
+
for (i = 0; i < NUM_REASSEMBLY; i++)
hdev->reassembly[i] = NULL;
@@ -2004,11 +2018,6 @@ static void hci_cmd_task(unsigned long arg)
BT_DBG("%s cmd %d", hdev->name, atomic_read(&hdev->cmd_cnt));
- if (!atomic_read(&hdev->cmd_cnt) && time_after(jiffies, hdev->cmd_last_tx + HZ)) {
- BT_ERR("%s command tx timeout", hdev->name);
- atomic_set(&hdev->cmd_cnt, 1);
- }
-
/* Send queued commands */
if (atomic_read(&hdev->cmd_cnt)) {
skb = skb_dequeue(&hdev->cmd_q);
@@ -2021,7 +2030,8 @@ static void hci_cmd_task(unsigned long arg)
if (hdev->sent_cmd) {
atomic_dec(&hdev->cmd_cnt);
hci_send_frame(skb);
- hdev->cmd_last_tx = jiffies;
+ mod_timer(&hdev->cmd_timer,
+ jiffies + msecs_to_jiffies(HCI_CMD_TIMEOUT));
} else {
skb_queue_head(&hdev->cmd_q, skb);
tasklet_schedule(&hdev->cmd_task);
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 74f04a2..09cb29e 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1732,6 +1732,9 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
break;
}
+ if (ev->opcode != HCI_OP_NOP)
+ del_timer(&hdev->cmd_timer);
+
if (ev->ncmd) {
atomic_set(&hdev->cmd_cnt, 1);
if (!skb_queue_empty(&hdev->cmd_q))
@@ -1807,6 +1810,9 @@ static inline void hci_cmd_status_evt(struct hci_dev *hdev, struct sk_buff *skb)
break;
}
+ if (ev->opcode != HCI_OP_NOP)
+ del_timer(&hdev->cmd_timer);
+
if (ev->ncmd) {
atomic_set(&hdev->cmd_cnt, 1);
if (!skb_queue_empty(&hdev->cmd_q))
--
1.7.2.3
^ permalink raw reply related
* Re: [PATCH v4 1/2] HID: Documentation for hidraw
From: Jonathan Corbet @ 2011-02-16 14:12 UTC (permalink / raw)
To: Alan Ott
Cc: Randy Dunlap, linux-doc, linux-kernel, jkosina, ospite,
linux-input, linux-bluetooth, bgood
In-Reply-To: <1297829209-10511-2-git-send-email-alan@signal11.us>
On Tue, 15 Feb 2011 23:06:48 -0500
Alan Ott <alan@signal11.us> wrote:
> Documentation/hid/Makefile | 8 ++
> Documentation/hid/hid-example.c | 167 +++++++++++++++++++++++++++++++++++++++
I believe we're trying to get code - especially runnable code - out of the
Documentation tree. Should this go under samples/ or, if it's useful
enough, under tools/?
Thanks,
jon
^ permalink raw reply
* Re: [BUG] usb problems in .38-rc3+
From: Gustavo F. Padovan @ 2011-02-16 14:00 UTC (permalink / raw)
To: Ed Tomlinson; +Cc: linux-kernel, linux-bluetooth, linux-usb
In-Reply-To: <201102051417.58953.edt@aei.ca>
Hi Ed,
* Ed Tomlinson <edt@aei.ca> [2011-02-05 14:17:57 -0500]:
> Hi,
>
> My bluetooth usb dongle has stopped working in .38-rc3+
>
> Bus 002 Device 008: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
>
> and in dmesg
>
> [108495.369056] usb 5-1: new full speed USB device using ohci_hcd and address 3
> [108495.573077] usb 5-1: New USB device found, idVendor=0a12, idProduct=0001
> [108495.580099] usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> [108652.971977] usb 5-1: USB disconnect, address 3
> [108652.972718] btusb_bulk_complete: hci0 urb ffff8800684e99c0 failed to resubmit (19)
> [108652.973725] btusb_bulk_complete: hci0 urb ffff8800684e9c00 failed to resubmit (19)
> [108652.974707] btusb_intr_complete: hci0 urb ffff8800684e9840 failed to resubmit (19)
> [108653.001690] btusb_send_frame: hci0 urb ffff8800bb42a240 submission failed
> [108657.007541] usb 2-4.7: new full speed USB device using ehci_hcd and address 8
> [108657.147736] usb 2-4.7: New USB device found, idVendor=0a12, idProduct=0001
> [108657.154954] usb 2-4.7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
>
> Its been working for years here.
>
> Any ideas on what to try or additional info to gather?
What's the symptom? what do you mean by stopped to work?
Can you provide me output of "hciconfig -a"?
And if possible enable dynamic debug for your kernel, mount the debugfs
and then
echo -n "module btusb +p" > /sys/kernel/debug/dynamic_debug/control
echo -n "module bluetooth +p" > /sys/kernel/debug/dynamic_debug/control
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply
* Re: bluetooth disabled with current 2.6.38-rc4
From: Gustavo F. Padovan @ 2011-02-16 13:34 UTC (permalink / raw)
To: Justin Mattock; +Cc: Johan Hedberg, linux-bluetooth
In-Reply-To: <1ADFED1F-912D-4DF9-A3BB-795F9AB1D1F8@gmail.com>
Hi Justin,
* Justin Mattock <justinmattock@gmail.com> [2011-02-15 19:26:12 -0800]:
>
> On Feb 15, 2011, at 5:52 AM, Johan Hedberg wrote:
>
> > Hi Justin,
> >
> > On Sun, Feb 13, 2011, Justin Mattock wrote:
> >> maybe I missed something, but my bluetooth is just not functioning
> >> with
> >> 2.6.38-rc4(works with 2.6.37-rc4)
> >>
> >> I've done a bisect on this, but was pointed to:
> >> c0e45c1ca3162acb2e77b3d9e152ce6e7b6fa3f5
> >> but doesn't look correct to me
> >>
> >> here is what I am seeing with the bluetooth-applet etc..:
> >>
> >> working correctly:
> >> http://www.flickr.com/photos/44066293@N08/5443727238/
> >>
> >> not working:
> >> http://www.flickr.com/photos/44066293@N08/5443124859/
> >>
> >> my /var/log/daemon.log shows:
> >>
> >> Feb 13 17:12:22 Linux-2 acpid: 1 client rule loaded
> >> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: HCI dev 0 registered
> >> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: Listening for HCI events
> >> on hci0
> >> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: HCI dev 0 up
> >> Feb 13 17:12:23 Linux-2 bluetoothd[1950]: Unable to find matching
> >> adapter
> >>
> >> I can try at another bisect, but might take some time.. let me know
> >> if there is something I can test
> >> or do.
> >
> > Are you sure this is a kernel problem? There was a similar issue with
> > BlueZ 4.86 or 4.87 which was already fixed. Could you try with 4.88?
> >
> > Johan
>
> o.k. I built 4.88 and still had the issue show up, except this time no
> icon(instead of the icon, that is not lit up)..
>
>
> anyways I did do another bisect and had better results(hopefully)this
> time..:
>
> 23bb57633df97ede067ea26f3cdc8a7ba2cd8109 is the first bad commit
> commit 23bb57633df97ede067ea26f3cdc8a7ba2cd8109
> Author: Johan Hedberg <johan.hedberg@nokia.com>
> Date: Tue Dec 21 23:01:27 2010 +0200
>
> Bluetooth: Fix __hci_request synchronization for hci_open_dev
>
> The initialization function used by hci_open_dev (hci_init_req)
> sends
> many different HCI commands. The __hci_request function should only
> return when all of these commands have completed (or a timeout
> occurs).
> Several of these commands cause hci_req_complete to be called which
> causes __hci_request to return prematurely.
>
> This patch fixes the issue by adding a new hdev->req_last_cmd
> variable
> which is set during the initialization procedure. The
> hci_req_complete
> function will no longer mark the request as complete until the
> command
> matching hdev->req_last_cmd completes.
>
> Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
> Acked-by: Marcel Holtmann <marcel@holtmann.org>
> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
>
> :040000 040000 e8d8ae5fab74b2ba73d0c52e7e09b30e5df8484e
> 8d1409e8dc2206492cb86e8848c8c23aff182e2a M include
> :040000 040000 07fdb5f6ceadcfde12c46a3b5c82937b7dac892c
> 8f3b08fbbc9fcd078d0f5224b8bc818eeb072dc4 M net
Can you please send the hcidump output? There should be a package for it in
your distribution, if not get the bluez-hcidump from git.kernel.org
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply
* [PATCH] Fix creating device object on disconnect complete event
From: Luiz Augusto von Dentz @ 2011-02-16 13:23 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
There is no need to create a new object if disconnected and the device is
not permanent/paired.
---
src/event.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/event.c b/src/event.c
index b979a8e..ba8f84a 100644
--- a/src/event.c
+++ b/src/event.c
@@ -697,7 +697,10 @@ void btd_event_disconn_complete(bdaddr_t *local, bdaddr_t *peer)
DBG("");
- if (!get_adapter_and_device(local, peer, &adapter, &device, TRUE))
+ if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE))
+ return;
+
+ if (!device)
return;
adapter_remove_connection(adapter, device);
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] BlueZ: HCI_LDISC: Make hci a child of the corresponding tty device.
From: Gustavo F. Padovan @ 2011-02-16 13:19 UTC (permalink / raw)
To: Andrei Warkentin; +Cc: linux-bluetooth
In-Reply-To: <AANLkTi=77xywyVZmUFrDaRPNnUne+52YYJ5Zh7jAd_3W@mail.gmail.com>
Hi Andrei,
* Andrei Warkentin <andreiw@motorola.com> [2011-02-11 17:19:26 -0600]:
> Dear List,
>
> This depends on Dmitry Eremin-Solenikov's "Tty: add tty_struct->dev
> pointer to corresponding device instance" patch,
> which is in 2.6.37.
>
> Thanks,
> A
> From 3ae2156afa420f3ba5cb73295037680bdca340f1 Mon Sep 17 00:00:00 2001
> From: Andrei Warkentin <andreiw@motorola.com>
> Date: Fri, 11 Feb 2011 17:59:52 -0600
> Subject: [PATCH] BlueZ: HCI_LDISC: Make hci a child of the corresponding tty device.
>
> Makes /sys/class/bluetooth/hciX a symlink to
> path under corresponding tty.
>
> Change-Id: I297361c13c61e2ad82293030553d9f0653e1273a
> Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
> ---
> drivers/bluetooth/hci_ldisc.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Patch has been applied.
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply
* PATCH [2/2] batostr(): Replace batostr() where possible with ba2str to avoid memleaks
From: David Herrmann @ 2011-02-16 13:12 UTC (permalink / raw)
To: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]
batostr() returns a dynamically allocated string which must be freed
later, although, the function looks like the standard berkeley socket
functions that work on static buffers. Two functions inside bluez
incorrectly use batostr() and do not free the returned pointer. I
replaced the occurrence of batostr() with a ba2str().
This makes batostr() unused throughout whole bluez so it may be
removed. However, I don't know whether we should keep it to keep
backwards compatibility.
Patch is against most recent git plus PATCH [1/2]. Patch file is also
attached as x-patch file.
David
diff --git a/compat/bnep.c b/compat/bnep.c
index 9b0d8b8..3617e0e 100644
--- a/compat/bnep.c
+++ b/compat/bnep.c
@@ -128,6 +128,7 @@ int bnep_show_connections(void)
struct bnep_connlist_req req;
struct bnep_conninfo ci[48];
unsigned int i;
+ char buf[18];
req.cnum = 48;
req.ci = ci;
@@ -137,9 +138,9 @@ int bnep_show_connections(void)
}
for (i = 0; i < req.cnum; i++) {
+ ba2str((bdaddr_t*)ci[i].dst, buf);
printf("%s %s %s\n", ci[i].device,
- batostr((bdaddr_t *) ci[i].dst),
- bnep_svc2str(ci[i].role));
+ buf, bnep_svc2str(ci[i].role));
}
return 0;
}
diff --git a/test/hciemu.c b/test/hciemu.c
index ba9b89d..db7c613 100644
--- a/test/hciemu.c
+++ b/test/hciemu.c
@@ -499,8 +499,10 @@ static void accept_connection(uint8_t *data)
static void close_connection(struct vhci_conn *conn)
{
+ char buf[18];
+ ba2str(&conn->dest, buf);
syslog(LOG_INFO, "Closing connection %s handle %d",
- batostr(&conn->dest), conn->handle);
+ buf, conn->handle);
g_io_channel_shutdown(conn->chan, TRUE, NULL);
g_io_channel_unref(conn->chan);
[-- Attachment #2: bluez2.diff --]
[-- Type: text/x-patch, Size: 1080 bytes --]
diff --git a/compat/bnep.c b/compat/bnep.c
index 9b0d8b8..3617e0e 100644
--- a/compat/bnep.c
+++ b/compat/bnep.c
@@ -128,6 +128,7 @@ int bnep_show_connections(void)
struct bnep_connlist_req req;
struct bnep_conninfo ci[48];
unsigned int i;
+ char buf[18];
req.cnum = 48;
req.ci = ci;
@@ -137,9 +138,9 @@ int bnep_show_connections(void)
}
for (i = 0; i < req.cnum; i++) {
+ ba2str((bdaddr_t*)ci[i].dst, buf);
printf("%s %s %s\n", ci[i].device,
- batostr((bdaddr_t *) ci[i].dst),
- bnep_svc2str(ci[i].role));
+ buf, bnep_svc2str(ci[i].role));
}
return 0;
}
diff --git a/test/hciemu.c b/test/hciemu.c
index ba9b89d..db7c613 100644
--- a/test/hciemu.c
+++ b/test/hciemu.c
@@ -499,8 +499,10 @@ static void accept_connection(uint8_t *data)
static void close_connection(struct vhci_conn *conn)
{
+ char buf[18];
+ ba2str(&conn->dest, buf);
syslog(LOG_INFO, "Closing connection %s handle %d",
- batostr(&conn->dest), conn->handle);
+ buf, conn->handle);
g_io_channel_shutdown(conn->chan, TRUE, NULL);
g_io_channel_unref(conn->chan);
^ permalink raw reply related
* Re: [RFC 3/3] Bluetooth: Send LE Connection Update Command
From: Claudio Takahasi @ 2011-02-16 13:09 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <20110215212022.GG7219@joana>
Hi Gustavo,
On Tue, Feb 15, 2011 at 7:20 PM, Gustavo F. Padovan
<padovan@profusion.mobi> wrote:
> Hi Claudio,
>
> * Claudio Takahasi <claudio.takahasi@openbossa.org> [2011-02-11 19:28:56 -0200]:
>
>> If the new connection update parameter are accepted, the LE master
>> host sends the LE Connection Update Command to its controller informing
>> the new requested parameters.
>>
>> Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org>
>> ---
>> include/net/bluetooth/hci.h | 11 +++++++++++
>> include/net/bluetooth/hci_core.h | 2 ++
>> net/bluetooth/hci_conn.c | 20 ++++++++++++++++++++
>> net/bluetooth/l2cap_core.c | 7 ++++++-
>> 4 files changed, 39 insertions(+), 1 deletions(-)
>
> Actually it is this one that doesn't apply, not 2 of 3.
>
> --
> Gustavo F. Padovan
> http://profusion.mobi
>
I will rebase it against bluetooth-next. All patches were using
Vinicius SMP branch as baseline.
Br,
Claudio
^ permalink raw reply
* PATCH [1/2] batostr(): Switch byte order before converting
From: David Herrmann @ 2011-02-16 13:07 UTC (permalink / raw)
To: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 826 bytes --]
The library function batostr() computes incorrect results because it
does not swap byte-ordering before converting the address. This patch
fixes this behaviour. It tries to make batostr() look like ba2str() to
be consistent.
Patch is also attached as x-patch file. Patch is done against most
recent git version.
diff --git a/lib/bluetooth.c b/lib/bluetooth.c
index 4af2ef6..dd7ca06 100644
--- a/lib/bluetooth.c
+++ b/lib/bluetooth.c
@@ -50,13 +50,14 @@ void baswap(bdaddr_t *dst, const bdaddr_t *src)
char *batostr(const bdaddr_t *ba)
{
+ uint8_t b[6];
char *str = bt_malloc(18);
if (!str)
return NULL;
+ baswap((bdaddr_t *) b, ba);
sprintf(str, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
- ba->b[0], ba->b[1], ba->b[2],
- ba->b[3], ba->b[4], ba->b[5]);
+ b[0], b[1], b[2], b[3], b[4], b[5]);
return str;
}
[-- Attachment #2: bluez1.diff --]
[-- Type: text/x-patch, Size: 514 bytes --]
diff --git a/lib/bluetooth.c b/lib/bluetooth.c
index 4af2ef6..dd7ca06 100644
--- a/lib/bluetooth.c
+++ b/lib/bluetooth.c
@@ -50,13 +50,14 @@ void baswap(bdaddr_t *dst, const bdaddr_t *src)
char *batostr(const bdaddr_t *ba)
{
+ uint8_t b[6];
char *str = bt_malloc(18);
if (!str)
return NULL;
+ baswap((bdaddr_t *) b, ba);
sprintf(str, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
- ba->b[0], ba->b[1], ba->b[2],
- ba->b[3], ba->b[4], ba->b[5]);
+ b[0], b[1], b[2], b[3], b[4], b[5]);
return str;
}
^ permalink raw reply related
* [PATCH] telephony-maemo6: fix not cleaning up active calls list on exit
From: Luiz Augusto von Dentz @ 2011-02-16 13:05 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
This can cause problem if the adapter is reset in the middle of a call
the indicators won't be update properly.
---
audio/telephony-maemo6.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/audio/telephony-maemo6.c b/audio/telephony-maemo6.c
index dfa06d9..bf1e0c4 100644
--- a/audio/telephony-maemo6.c
+++ b/audio/telephony-maemo6.c
@@ -2028,6 +2028,9 @@ void telephony_exit(void)
g_free(last_dialed_number);
last_dialed_number = NULL;
+ g_slist_free(active_calls);
+ active_calls = NULL;
+
g_slist_foreach(calls, (GFunc) csd_call_free, NULL);
g_slist_free(calls);
calls = NULL;
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] Add Atheros BT AR5BBU12 fw supported
From: Gustavo F. Padovan @ 2011-02-16 13:02 UTC (permalink / raw)
To: Cho, Yu-Chen; +Cc: marcel, linux-bluetooth, linux-kernel, jlee
In-Reply-To: <967f2d5b2d6382f4aa698a549d4bfa74f35c171f.1297736230.git.acho@novell.com>
Hi Cho,
* Cho, Yu-Chen <acho@novell.com> [2011-02-15 10:20:07 +0800]:
> Add the btusb.c blacklist [0489:e02c] for Atheros AR5BBU12 BT
> and add to ath3k.c supported this device.
>
> Signed-off-by: Cho, Yu-Chen <acho@novell.com>
> ---
> drivers/bluetooth/ath3k.c | 3 +++
> drivers/bluetooth/btusb.c | 3 +++
> 2 files changed, 6 insertions(+), 0 deletions(-)
Applied to bluetooth-2.6, thanks.
--
Gustavo F. Padovan
http://profusion.mobi
^ permalink raw reply
* Re: [RFC -v3] Bluetooth: add BT_CONNINFO socketopt
From: Andrei Emeltchenko @ 2011-02-16 12:48 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <1297782328-25706-1-git-send-email-padovan@profusion.mobi>
Hi Gustavo,
On Tue, Feb 15, 2011 at 7:05 AM, Gustavo F. Padovan
<padovan@profusion.mobi> wrote:
> ATT needs to know to link key type before run some of it procedures.
> Using the socket sec_level doesn't work because the socket may not reflect
> the real sec_level of the link.
>
> Reported-by: Anderson Lizardo <anderson.lizardo@openbossa.org>
> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> ---
> include/net/bluetooth/bluetooth.h | 5 +++++
> net/bluetooth/l2cap_sock.c | 16 ++++++++++++++++
> 2 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 4375043..be7a8ee 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -66,6 +66,11 @@ struct bt_security {
>
> #define BT_FLUSHABLE 8
>
> +#define BT_CONNINFO 9
> +struct bt_conninfo {
> + __u8 sec_level;
> +};
> +
> #define BT_FLUSHABLE_OFF 0
> #define BT_FLUSHABLE_ON 1
>
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index 484e717..f09fd97 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -467,7 +467,9 @@ static int l2cap_sock_getsockopt_old(struct socket *sock, int optname, char __us
> static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen)
> {
> struct sock *sk = sock->sk;
> + struct hci_conn *hcon = l2cap_pi(sk)->conn->hcon;
This may crash if you try with not connected socket, shall we check
for (!conn) ?
Regards,
Andrei
> struct bt_security sec;
> + struct bt_conninfo conninfo;
> int len, err = 0;
>
> BT_DBG("sk %p", sk);
> @@ -516,6 +518,20 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, ch
>
> break;
>
> + case BT_CONNINFO:
> + if (sk->sk_state != BT_CONNECTED) {
> + err = -EINVAL;
> + break;
> + }
> +
> + conninfo.sec_level = hcon->sec_level;
> +
> + len = min_t(unsigned int, len, sizeof(conninfo));
> + if (copy_to_user(optval, (char *) &conninfo, len))
> + err = -EFAULT;
> +
> + break;
> +
> default:
> err = -ENOPROTOOPT;
> break;
> --
> 1.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] Move HealthManager Interface to "/" path
From: Jose Antonio Santos Cadenas @ 2011-02-16 12:32 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <AANLkTi=DeXueKxyN23jT3LNd-iqD1mTO+PB-5H4=Scr+@mail.gmail.com>
2011/2/16 Jose Antonio Santos Cadenas <santoscadenas@gmail.com>:
> Hi all,
>
> 2011/2/15 Gustavo F. Padovan <padovan@profusion.mobi>:
>> Yeah, this breaks the API, but health is still disabled by default and it
>> is not a good idea create a new path only for it. So moving it to "/"
>
> First I'd like to say that I completely agree with this patch, is
> something that I've always thought, but when we sent this patches we
> used the other path because is what we agree when we designed the
> API, I think that Marcel said something like that the path for
> applications
Sorry, I mean the path of the Manager
> will be changed or something like that, but I is possible
> that I misunderstood something. The end of this is that we register
> HealthManager in path that I'm not completely agree with.
>
> The problem is that the Health API is being alredy used in some
> devices, HDP has been quickly integrated in health systems and I don't
> know if changing the API now is a good idea. I've received many emails
> asking for the API usage from people that was integrating BlueZ on
> their systems in order to be able to use HDP.
>
> Some of the devices that integrate BlueZ are also certified, like this:
>
> http://continuaalliance.org/products/certified-products/texasinstrumentsamdm37xlinuxreferenceplatform.html
>
> But it is possible that BlueZ with HDP is integrated in many other
> devices and systems that we don't know. So even thinking that the path
> change is a good Idea I disagree with this path because it breaks the
> API and it's being already in use.
>
> Regards
>
>> ---
>> doc/health-api.txt | 2 +-
>> health/hdp.c | 4 ++--
>> test/test-health | 2 +-
>> test/test-health-sink | 2 +-
>> 4 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/doc/health-api.txt b/doc/health-api.txt
>> index 3d0a717..9d5a54d 100644
>> --- a/doc/health-api.txt
>> +++ b/doc/health-api.txt
>> @@ -10,7 +10,7 @@ Health Device Profile hierarchy
>>
>> Service org.bluez
>> Interface org.bluez.HealthManager
>> -Object path /org/bluez/
>> +Object path /
>>
>> Methods:
>>
>> diff --git a/health/hdp.c b/health/hdp.c
>> index d4a2a30..e58bd55 100644
>> --- a/health/hdp.c
>> +++ b/health/hdp.c
>> @@ -2171,7 +2171,7 @@ int hdp_manager_start(DBusConnection *conn)
>> {
>> DBG("Starting Health manager");
>>
>> - if (!g_dbus_register_interface(conn, MANAGER_PATH,
>> + if (!g_dbus_register_interface(conn, "/",
>> HEALTH_MANAGER,
>> health_manager_methods, NULL, NULL,
>> NULL, manager_path_unregister)) {
>> @@ -2186,7 +2186,7 @@ int hdp_manager_start(DBusConnection *conn)
>>
>> void hdp_manager_stop()
>> {
>> - g_dbus_unregister_interface(connection, MANAGER_PATH, HEALTH_MANAGER);
>> + g_dbus_unregister_interface(connection, "/", HEALTH_MANAGER);
>>
>> dbus_connection_unref(connection);
>> DBG("Stopped Health manager");
>> diff --git a/test/test-health b/test/test-health
>> index 28cc894..7820a24 100755
>> --- a/test/test-health
>> +++ b/test/test-health
>> @@ -47,7 +47,7 @@ def enter_mainloop():
>> finally:
>> print "Exiting, bye"
>>
>> -hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
>> +hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/"),
>> "org.bluez.HealthManager")
>>
>> role = None
>> diff --git a/test/test-health-sink b/test/test-health-sink
>> index cb9d434..50eb74c 100755
>> --- a/test/test-health-sink
>> +++ b/test/test-health-sink
>> @@ -12,7 +12,7 @@ loop = gobject.MainLoop()
>>
>> bus = dbus.SystemBus()
>>
>> -hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
>> +hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/"),
>> "org.bluez.HealthManager")
>> app_path = hdp_manager.CreateApplication({"DataType": dbus.types.UInt16(4103),
>> "Role": "sink"})
>> --
>> 1.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
^ permalink raw reply
* Re: [PATCH] Move HealthManager Interface to "/" path
From: Jose Antonio Santos Cadenas @ 2011-02-16 12:28 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth
In-Reply-To: <1297798306-32591-1-git-send-email-padovan@profusion.mobi>
Hi all,
2011/2/15 Gustavo F. Padovan <padovan@profusion.mobi>:
> Yeah, this breaks the API, but health is still disabled by default and it
> is not a good idea create a new path only for it. So moving it to "/"
First I'd like to say that I completely agree with this patch, is
something that I've always thought, but when we sent this patches we
used the other path because is what we agree when we designed the
API, I think that Marcel said something like that the path for
applications will be changed or something like that, but I is possible
that I misunderstood something. The end of this is that we register
HealthManager in path that I'm not completely agree with.
The problem is that the Health API is being alredy used in some
devices, HDP has been quickly integrated in health systems and I don't
know if changing the API now is a good idea. I've received many emails
asking for the API usage from people that was integrating BlueZ on
their systems in order to be able to use HDP.
Some of the devices that integrate BlueZ are also certified, like this:
http://continuaalliance.org/products/certified-products/texasinstrumentsamdm37xlinuxreferenceplatform.html
But it is possible that BlueZ with HDP is integrated in many other
devices and systems that we don't know. So even thinking that the path
change is a good Idea I disagree with this path because it breaks the
API and it's being already in use.
Regards
> ---
> doc/health-api.txt | 2 +-
> health/hdp.c | 4 ++--
> test/test-health | 2 +-
> test/test-health-sink | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/doc/health-api.txt b/doc/health-api.txt
> index 3d0a717..9d5a54d 100644
> --- a/doc/health-api.txt
> +++ b/doc/health-api.txt
> @@ -10,7 +10,7 @@ Health Device Profile hierarchy
>
> Service org.bluez
> Interface org.bluez.HealthManager
> -Object path /org/bluez/
> +Object path /
>
> Methods:
>
> diff --git a/health/hdp.c b/health/hdp.c
> index d4a2a30..e58bd55 100644
> --- a/health/hdp.c
> +++ b/health/hdp.c
> @@ -2171,7 +2171,7 @@ int hdp_manager_start(DBusConnection *conn)
> {
> DBG("Starting Health manager");
>
> - if (!g_dbus_register_interface(conn, MANAGER_PATH,
> + if (!g_dbus_register_interface(conn, "/",
> HEALTH_MANAGER,
> health_manager_methods, NULL, NULL,
> NULL, manager_path_unregister)) {
> @@ -2186,7 +2186,7 @@ int hdp_manager_start(DBusConnection *conn)
>
> void hdp_manager_stop()
> {
> - g_dbus_unregister_interface(connection, MANAGER_PATH, HEALTH_MANAGER);
> + g_dbus_unregister_interface(connection, "/", HEALTH_MANAGER);
>
> dbus_connection_unref(connection);
> DBG("Stopped Health manager");
> diff --git a/test/test-health b/test/test-health
> index 28cc894..7820a24 100755
> --- a/test/test-health
> +++ b/test/test-health
> @@ -47,7 +47,7 @@ def enter_mainloop():
> finally:
> print "Exiting, bye"
>
> -hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
> +hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/"),
> "org.bluez.HealthManager")
>
> role = None
> diff --git a/test/test-health-sink b/test/test-health-sink
> index cb9d434..50eb74c 100755
> --- a/test/test-health-sink
> +++ b/test/test-health-sink
> @@ -12,7 +12,7 @@ loop = gobject.MainLoop()
>
> bus = dbus.SystemBus()
>
> -hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
> +hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/"),
> "org.bluez.HealthManager")
> app_path = hdp_manager.CreateApplication({"DataType": dbus.types.UInt16(4103),
> "Role": "sink"})
> --
> 1.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] Move HealthManager Interface to "/" path
From: Jose Antonio Santos Cadenas @ 2011-02-16 12:18 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: Luiz Augusto von Dentz, linux-bluetooth
In-Reply-To: <20110215195937.GB7219@joana>
Hi all,
2011/2/15 Gustavo F. Padovan <padovan@profusion.mobi>:
> Hi Luiz,
>
> * Luiz Augusto von Dentz <luiz.dentz@gmail.com> [2011-02-15 21:35:20 +0200]:
>
>> Hi,
>>
>> On Tue, Feb 15, 2011 at 9:31 PM, Gustavo F. Padovan
>> <padovan@profusion.mobi> wrote:
>> > Yeah, this breaks the API, but health is still disabled by default and it
>> > is not a good idea create a new path only for it. So moving it to "/"
>> > ---
>> > doc/health-api.txt | 2 +-
>> > health/hdp.c | 4 ++--
>> > test/test-health | 2 +-
>> > test/test-health-sink | 2 +-
>> > 4 files changed, 5 insertions(+), 5 deletions(-)
>> >
>> > diff --git a/doc/health-api.txt b/doc/health-api.txt
>> > index 3d0a717..9d5a54d 100644
>> > --- a/doc/health-api.txt
>> > +++ b/doc/health-api.txt
>> > @@ -10,7 +10,7 @@ Health Device Profile hierarchy
>> >
>> > Service org.bluez
>> > Interface org.bluez.HealthManager
>> > -Object path /org/bluez/
>> > +Object path /
>> >
>> > Methods:
>> >
>> > diff --git a/health/hdp.c b/health/hdp.c
>> > index d4a2a30..e58bd55 100644
>> > --- a/health/hdp.c
>> > +++ b/health/hdp.c
>> > @@ -2171,7 +2171,7 @@ int hdp_manager_start(DBusConnection *conn)
>> > {
>> > DBG("Starting Health manager");
>> >
>> > - if (!g_dbus_register_interface(conn, MANAGER_PATH,
>> > + if (!g_dbus_register_interface(conn, "/",
>> > HEALTH_MANAGER,
>> > health_manager_methods, NULL, NULL,
>> > NULL, manager_path_unregister)) {
>> > @@ -2186,7 +2186,7 @@ int hdp_manager_start(DBusConnection *conn)
>> >
>> > void hdp_manager_stop()
>> > {
>> > - g_dbus_unregister_interface(connection, MANAGER_PATH, HEALTH_MANAGER);
>> > + g_dbus_unregister_interface(connection, "/", HEALTH_MANAGER);
>> >
>> > dbus_connection_unref(connection);
>> > DBG("Stopped Health manager");
>> > diff --git a/test/test-health b/test/test-health
>> > index 28cc894..7820a24 100755
>> > --- a/test/test-health
>> > +++ b/test/test-health
>> > @@ -47,7 +47,7 @@ def enter_mainloop():
>> > finally:
>> > print "Exiting, bye"
>> >
>> > -hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
>> > +hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/"),
>> > "org.bluez.HealthManager")
>> >
>> > role = None
>> > diff --git a/test/test-health-sink b/test/test-health-sink
>> > index cb9d434..50eb74c 100755
>> > --- a/test/test-health-sink
>> > +++ b/test/test-health-sink
>> > @@ -12,7 +12,7 @@ loop = gobject.MainLoop()
>> >
>> > bus = dbus.SystemBus()
>> >
>> > -hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
>> > +hdp_manager = dbus.Interface(bus.get_object("org.bluez", "/"),
>> > "org.bluez.HealthManager")
>> > app_path = hdp_manager.CreateApplication({"DataType": dbus.types.UInt16(4103),
>> > "Role": "sink"})
>> > --
>> > 1.7.4
>>
>> Any reasons why this is not per adapter? This is supposed to be very
>> similar to Media API which is used in a per adapter fashion.
>
> IIRC In the first versions of the API Marcel tried to abstract the concept of
> adapter and have the API works with Health Applications.
Just what Gustavo said the aim is to be adapter independent, you just
register an application and HDP do all the job for you. This way you
don't have to check if an adapter is removed or if a new adapter is
plugged.
> But not sure if after
>
> http://www.spinics.net/lists/linux-bluetooth/msg06788.html
>
> this is still valid.
I think that this is still valid even after this discussion.
Regards.
>
> --
> Gustavo F. Padovan
> http://profusion.mobi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* [PATCH] Add increasing query OFFSET in phonebook_pull_read
From: Radoslaw Jablonski @ 2011-02-16 9:34 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Radoslaw Jablonski
It is needed to properly move starting index in tracker
for next invocations of phonebook_pull_read - without that
pull result for bigger queries (over one part of data) will
be wrong (it will include duplicate vcard entries).
---
plugins/phonebook-tracker.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index eb38a46..28d5c7d 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -1964,6 +1964,7 @@ int phonebook_pull_read(void *request)
struct phonebook_data *data = request;
reply_list_foreach_t pull_cb;
const char *query;
+ char *offset_query;
int col_amount;
int ret;
@@ -1987,6 +1988,19 @@ int phonebook_pull_read(void *request)
if (query == NULL)
return -ENOENT;
+ if (pull_cb == pull_contacts && data->tracker_index > 0) {
+ /* Adding offset to pull query to download next parts of data
+ * from tracker (phonebook_pull_read may be called many times
+ * from PBAP core to fetch data partially) */
+ offset_query = g_strdup_printf(QUERY_OFFSET_FORMAT, query,
+ data->tracker_index);
+ ret = query_tracker(offset_query, col_amount, pull_cb, data);
+
+ g_free(offset_query);
+
+ return ret;
+ }
+
ret = query_tracker(query, col_amount, pull_cb, data);
return ret;
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 2/2] HID: Move hiddev.txt to the new Documentation/HID directory
From: Alan Ott @ 2011-02-16 4:06 UTC (permalink / raw)
To: Randy Dunlap, Alan Ott, linux-doc, linux-kernel, jkosina, ospite,
linux-input, linux-bluetooth, bgood
Cc: Alan Ott
In-Reply-To: <1297829209-10511-1-git-send-email-alan@signal11.us>
With the new Documentation/hid directory, it makes sense to have
hiddev.txt here as well.
Signed-off-by: Alan Ott <alan@signal11.us>
---
Documentation/{usb => hid}/hiddev.txt | 0
1 files changed, 0 insertions(+), 0 deletions(-)
rename Documentation/{usb => hid}/hiddev.txt (100%)
diff --git a/Documentation/usb/hiddev.txt b/Documentation/hid/hiddev.txt
similarity index 100%
rename from Documentation/usb/hiddev.txt
rename to Documentation/hid/hiddev.txt
--
1.7.0.4
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox