Milan Bouchet-Valat | 1 Jan 2012 23:46
Picon

Disabling Bluetooth also kills WiFi

Hi!

With kernels 3.1 and 3.2, disabling Bluetooth via rfkill also disables
my wireless card on my HP Pavilion dm4. This didn't happen with 2.6.41
(I upgraded from Fedora 15 to 16).

My devices are set up as this (see attached output of lspci -vnn for
details about devices):
# rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
2: hp-wifi: Wireless LAN
	Soft blocked: no
	Hard blocked: no
3: hp-bluetooth: Bluetooth
	Soft blocked: no
	Hard blocked: no
11: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no

The problem is, these commands also stop the WiFi:
rfkill block bluetooth
and
rfkill block 3 [for hp-bluetooth]

But this one only kills the Bluetooth:
rfkill block 11

(Continue reading)

Luiz Augusto von Dentz | 2 Jan 2012 14:06
Picon

Re: Bluetooth audio skipping

Hi Michael,

On Fri, Dec 30, 2011 at 3:26 PM, Michael Maddern
<michael.maddern@...> wrote:
> Hello,
>
> I'm not sure I'm supposed to be posting here, but on bluez.org both
> the development and user mailings lists point here.
>
> I'm having problems getting bluetooth audio (a2dp) to work without
> stuttering, skipping, speeding up etc. I'm using bluetooth speakers
> (Creative D100). It works okay if it is right next to my laptop, but
> when I touch the speaker or move it more than about 1 meter, it starts
> stuttering.

I have the D100 and haven't noticed such a problem.

> The bluetooth adapter is a Broadcom BCM2070 (which is a class 1
> adapter). I'm using kernel 3.1.5-1.
>
> I've tested it with the Bluez 4.96, and I've also compiled 4.97 but
> it's no better. I've tried using Alsa and PulseAudio, the problem is
> the same with both.  I've tried adjusting the link mode
> (accept,master) and link policies (hold,park) as recommended but it
> makes no difference.

What version of PulseAudio are you using? This problems with audio
skips are usually related to high bitpool, but there already exist a
fix upstream which reduces the bitpool in such cases.

(Continue reading)

Luiz Augusto von Dentz | 2 Jan 2012 14:16
Picon

Re: [PATCH 2/2] Bluetooth: Remove HCI_PRIO_MAX from ctrl cdm in RFCOMM

Hi Marcel,

On Thu, Dec 29, 2011 at 7:45 PM, Marcel Holtmann <marcel@...> wrote:
>>
>> I guess you guys don't remember, but I tried to explain why the
>> priority has to be set even for RFCOMM, any frame sent by the kernel
>> with a timeout needs to be scheduled as soon as possible otherwise it
>> may timeout due to quote being consumed by other channels with higher
>> priority, so in this case if an A2DP stream in ongoing you will never
>> be able to complete a RFCOMM connection because there wont be enough
>> quote to schedule them before they timeout (usually 10 out 10 attempt
>> end up like that in my setup).
>>
>> Perhaps if we assign a dedicated queue/hci_chan per RFCOMM socket that
>> should get rid of this resetting sk_priority on every frame, but that
>> means not depending on socket API at all to pass frames from RFCOMM to
>> L2CAP, so we need an API to create L2CAP frames directly in RFCOMM
>> modules and queue them in its hci_chan.
>
> yes, we need exactly this. Not using the L2CAP socket and interfacing
> with L2CAP directly is a good idea. Same came up with A2MP as well.

Right, so I will work on this next, but in the meantime I think we
should keep the current logic (it doesn't seems to cause any problem
although the locking is pretty bad) until we got a proper solution and
at least it is able to complete connections.

--

-- 
Luiz Augusto von Dentz
(Continue reading)

Per-Henrik Lundblom | 2 Jan 2012 14:14
Picon

bluetooth-alsa: Connection fix for kernel >= 2.6.30

Hi,

After trying to get bluetooth-alsa working on Ubuntu 11.10 (kernel
3.0.0) I realized that the struct sockaddr_l2 struct was changed in
kernel 2.6.30 to include a l2_cid variable. This variable is of course
not set in the a2dpd code which results in a socket connect() call
returning -EINVAL.

Simple fix is to memset struct before use. Patch is attached.
Unfortunately I don't have any idea where to send the patch, hope this
list isn't totally wrong.

/PH

--
Per-Henrik Lundblom           epost: ph@...
telefon: 0733-20 71 26        hemsida: www.whatever.nu

Attachment (sockaddr_l2-fix.patch): text/x-diff, 531 bytes
Luiz Augusto von Dentz | 2 Jan 2012 14:52
Picon

Re: Getting sco_connect_cb(): Connection refused (111) [Bluez-Ofono-PulseAudio]

Hi,

On Mon, Jan 2, 2012 at 3:38 PM, JEETENDRA BHATTAD
<bhattad.jeetendra@...> wrote:
> Hello All,
>
> When I am trying to connect my Nokia N97 or Nokia Xpress Music 5800, Samsung
> Galaxy Note on my IMX53 board.
>
> It gets connected and disconnects immediately.
>
> Getting sco_connect_cb(): Connection refused (111)  after which phone gets
> disconnected.

Please add the hcidump log if possible, I suspect you are trying to
initiate the SCO connection which iirc is not recommended when acting
as a headset/carkit, some phones may block the connection attempt
specially if there is no active call.

--

-- 
Luiz Augusto von Dentz
Michael Maddern | 2 Jan 2012 19:22
Picon

Re: Bluetooth audio skipping

Hi Luiz,

On 2 January 2012 13:06, Luiz Augusto von Dentz
<luiz.dentz@...> wrote:
> Hi Michael,
>
> On Fri, Dec 30, 2011 at 3:26 PM, Michael Maddern
> <michael.maddern@...> wrote:
>> Hello,
>>
>> I'm not sure I'm supposed to be posting here, but on bluez.org both
>> the development and user mailings lists point here.
>>
>> I'm having problems getting bluetooth audio (a2dp) to work without
>> stuttering, skipping, speeding up etc. I'm using bluetooth speakers
>> (Creative D100). It works okay if it is right next to my laptop, but
>> when I touch the speaker or move it more than about 1 meter, it starts
>> stuttering.
>
> I have the D100 and haven't noticed such a problem.
>
>> The bluetooth adapter is a Broadcom BCM2070 (which is a class 1
>> adapter). I'm using kernel 3.1.5-1.
>>
>> I've tested it with the Bluez 4.96, and I've also compiled 4.97 but
>> it's no better. I've tried using Alsa and PulseAudio, the problem is
>> the same with both.  I've tried adjusting the link mode
>> (accept,master) and link policies (hold,park) as recommended but it
>> makes no difference.
>
(Continue reading)

Marcel Holtmann | 2 Jan 2012 19:43

Re: [PATCH 2/2] Bluetooth: Remove HCI_PRIO_MAX from ctrl cdm in RFCOMM

Hi Luiz,

> >> I guess you guys don't remember, but I tried to explain why the
> >> priority has to be set even for RFCOMM, any frame sent by the kernel
> >> with a timeout needs to be scheduled as soon as possible otherwise it
> >> may timeout due to quote being consumed by other channels with higher
> >> priority, so in this case if an A2DP stream in ongoing you will never
> >> be able to complete a RFCOMM connection because there wont be enough
> >> quote to schedule them before they timeout (usually 10 out 10 attempt
> >> end up like that in my setup).
> >>
> >> Perhaps if we assign a dedicated queue/hci_chan per RFCOMM socket that
> >> should get rid of this resetting sk_priority on every frame, but that
> >> means not depending on socket API at all to pass frames from RFCOMM to
> >> L2CAP, so we need an API to create L2CAP frames directly in RFCOMM
> >> modules and queue them in its hci_chan.
> >
> > yes, we need exactly this. Not using the L2CAP socket and interfacing
> > with L2CAP directly is a good idea. Same came up with A2MP as well.
> 
> Right, so I will work on this next, but in the meantime I think we
> should keep the current logic (it doesn't seems to cause any problem
> although the locking is pretty bad) until we got a proper solution and
> at least it is able to complete connections.

the locking is broken with the move to workqueues. So feel free to
figure out a locking that works, but right now it is screwed up.

Be my guest to set a MAX_PRIO - 1 by default for RFCOMM and see how that
works out.
(Continue reading)

Andre Guedes | 2 Jan 2012 20:50

[PATCH] Bluetooth: Fix mgmt_stop_discovery_failed()

Stop Discovery Command Status Event should use mgmt status code.

Signed-off-by: Andre Guedes <andre.guedes@...>
---
 net/bluetooth/mgmt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 2540944..fb0b15e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
 <at>  <at>  -2756,7 +2756,7  <at>  <at>  int mgmt_stop_discovery_failed(struct hci_dev *hdev, u8 status)
 	if (!cmd)
 		return -ENOENT;

-	err = cmd_status(cmd->sk, hdev->id, cmd->opcode, status);
+	err = cmd_status(cmd->sk, hdev->id, cmd->opcode, mgmt_status(status));
 	mgmt_pending_remove(cmd);

 	return err;
--

-- 
1.7.8.1

nello martuscielli | 2 Jan 2012 21:50
Picon

Re: bluez-4.97: check dependnecy

hi,
i'm trying to build bluez-4.97 on my system (CRUX PPC 32bit) and i'd
like to build it without 'check' dependency.
I patched sources using :
build: Move libcheck under TEST conditional
author	Marcel Holtmann <marcel@...>	
	Wed, 28 Dec 2011 04:09:56 +0000 (20:09 -0800)
commit	bf5d45f2fbd1b1463512f4eb8d30bffb3478ccc7

and adding --disable-test to my configure but i still receive:

[...]
checking whether yytext is a pointer... yes
checking for CHECK... configure: error: Package requirements (check >=
0.9.4) were not met:

No package 'check' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CHECK_CFLAGS
and CHECK_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

cheers,
nello
--

-- 
my blog: http://linuxpowerpc.blogspot.com/
--
(Continue reading)

nello martuscielli | 2 Jan 2012 21:58
Picon

Re: bluez-4.97: check dependnecy

well, doing an 'autoreconf -i -f' just after the patch it's the way.
Thanks for bluez!

cheers,
nello

On Mon, Jan 2, 2012 at 9:50 PM, nello martuscielli
<ppc.addon@...> wrote:
> hi,
> i'm trying to build bluez-4.97 on my system (CRUX PPC 32bit) and i'd
> like to build it without 'check' dependency.
> I patched sources using :
> build: Move libcheck under TEST conditional
> author  Marcel Holtmann <marcel@...>
>        Wed, 28 Dec 2011 04:09:56 +0000 (20:09 -0800)
> commit  bf5d45f2fbd1b1463512f4eb8d30bffb3478ccc7
>
> and adding --disable-test to my configure but i still receive:
>
> [...]
> checking whether yytext is a pointer... yes
> checking for CHECK... configure: error: Package requirements (check >=
> 0.9.4) were not met:
>
> No package 'check' found
>
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.
>
> Alternatively, you may set the environment variables CHECK_CFLAGS
(Continue reading)


Gmane