Bluetooth fails to connect to Phone

Bug #403293 reported by kylea
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: bluez

Jaunty 64bit

2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 22:12:12 UTC 2009 x86_64 GNU/Linux
Bluez 4.41.0ubuntu1

To get Bluetooth to work, after most restarts of my Jaunty 64 I have to force a connection from my phone to the PC.

I do this via the remote control program "anyremote". anyremote "talks" via Bluetooth Channel 19. The PC "anyremote" component does NOT have to be running. Just making the attempt seems to "wake up" the Bluetooth service on the PC.

I have a new phone Nokia 5800 and the behaviour is the same as with the 6233.

When the "connection" is made everything works ok. Its very consistent, although sometimes after a restart Bluetooth connection works without intervention.

I have reported this behaviour in 268502, https://bugs.launchpad.net/ubuntu/intrepid/+source/linux/+bug/268502

"Now bluetooth mostly only works (ie can send files or use Gnome Phone Manager) if I connect from the Phone to the Laptop (Dell using 370 Minicard) via anyremote first. So what I have to do it start anyremote via ganyremote - then I start Anyremote on my Nokia 6233 and then I can disconnect if I want too (don't have to) and then the Laptop can successfully communicate with the phone.

I updated to latest Blues 4.36 from 4.32 no change"

I assume its bluez - but I suspect it might be kernel related.

kylea (kylea)
description: updated
Revision history for this message
Ulisses Furquim (ulissesf) wrote :

From the other bug you mentioned it seems to be a problem with the driver in the kernel. Have you seen any error messages in your logs? Or have you captured any hcidump logs (run as root "hcidump -X -V") when it doesn't work?

Revision history for this message
kylea (kylea) wrote :

Hi Ulisses

Nothing in logs...

- see output from "hcidump -X -V"

HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:24:7C:31:78:C8 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x04 handle 12 bdaddr 00:24:7C:31:78:C8 type ACL encrypt 0x00
    Error: Page Timeout

Revision history for this message
Ulisses Furquim (ulissesf) wrote :

Hi kylea,

Nothing in logs, hmm. I was kinda expecting some kernel message like in the other bug. Maybe dmesg tell us anything?

From the hcidump we can only see it tried to initiate a connection but for some reason it didn't find the remote device and so we received a Page Timeout from the local adapter. I would ask if your phone was in discoverable mode but I'm pretty sure it is because you tried to pair using the bluetooth applet, right? OTOH It does seem like your phone is not accepting any connections and thus not answering any Page Scan.

Do you mind trying a Karmic live CD? I'm interested to see if a newer kernel solves your problem. Thanks.

Revision history for this message
kylea (kylea) wrote :

Hi - Ok I'll download Karmic and try it out

Revision history for this message
kylea (kylea) wrote :

BTW - it worked out on the last restart - here is the output

See attached file for the log

Revision history for this message
kylea (kylea) wrote :

Ok Have downloaded Karmic Alpha-3 - 64bit

Ran it from CD image - Bluetooth worked flawlessly.

I have a spare 250GB 7200rpm Hard Disk - will install and run some re-boot tests and see if I can repeat Jaunty behaviour.

Standby...

Revision history for this message
Ulisses Furquim (ulissesf) wrote :

That's great news. I'm guessing your problem is really fixed in the kernel. Both the btusb driver and the whole stack went through a lot of bug fixing lately.

Revision history for this message
kylea (kylea) wrote :

OK more good news - so far after several re-boots can connect from PC to 5800 Nokia.

However one small point - First time after re-boot I have to select 'Browse Files on Device' twice.

First time reports an error - host down.

Second time it finds the phone and I can browse it.

And gnome-phone-manager connects and send an SMS - very cool.

Revision history for this message
kylea (kylea) wrote :

Further update - working flawlessly -

Revision history for this message
kylea (kylea) wrote :

Further - sorry to report have managed to totally break Bluetooth - not sure but here are the output from dmesg etc

>>> uname - a

2.6.31-3-generic #19-Ubuntu SMP Tue Jul 14 16:07:02 UTC 2009 x86_64 GNU/Linux

First there is no device created:

>>> hcitool dev

Devices:

>>> hciconfig hci0 reset

Can't get device info: No such device

>>> lsusb:

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 009: ID 03f0:3312 Hewlett-Packard
Bus 001 Device 008: ID 04fc:0c15 Sunplus Technology Co., Ltd
Bus 001 Device 007: ID 413c:2513 Dell Computer Corp.
Bus 001 Device 006: ID 413c:2513 Dell Computer Corp.
Bus 001 Device 004: ID 0c45:63f8 Microdia
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 0a5c:5802 Broadcom Corp.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 413c:8158 Dell Computer Corp.
Bus 003 Device 003: ID 413c:8157 Dell Computer Corp.
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg >> see attached

Revision history for this message
Ulisses Furquim (ulissesf) wrote :

Hi kylea,

That's very unfortunate. I saw this in your dmesg:

[ 1828.947668] hub 1-0:1.0: unable to enumerate USB device on port 3

and then some ACPI parsing errors. Not sure though it's your bluetooth adapter there.

Could you give us the output of lsusb -v, please?

Revision history for this message
kylea (kylea) wrote :

Hi Ulisses - bluetooth adapter is internal Del E6500 laptop

It was working fine then a few updates came thru and I tried to get my #g Mobile Broadband working, then something broke.

I am sure we can fix it.

Otherwise I'll start again and see if I can pin point when it fails - after whatever update

see attached lsusb.txt file for output

Revision history for this message
Ulisses Furquim (ulissesf) wrote :

Hi kylea,

I saw the file and indeed there's no bluetooth adapter there. Some update must have caused the kernel not recognize your bluetooth adapter. It can be a change to either USB or bluetooth stack/driver (btusb).

Revision history for this message
kylea (kylea) wrote :

I did a total re-install of Alpha-3 - and bluetooth worked fine.

However have had few problems with inconsistent connection problems. I have had to unpair and re-pair a few times to get the phone and bluetooth headset to connect cleanly.

I'll keep a log and see if I can spot a pattern.

Revision history for this message
kylea (kylea) wrote :

I have noticed that the phone will sometimes not respond to a sdptool query from Ubuntu. The Bluetooth headset will be working.

If I re-start the phone usually Ubuntu will find the SDP Server. So there is some issues generally with the Nokia phone not behaving consistently.

Revision history for this message
kylea (kylea) wrote :

Bad news - Bluetooth is behaving very badly

Cannot make a connection and hold it, this is a new error:

bluetoothd[5475]: HUP or ERR on socket

2.6.31-020631rc5-generic #020631rc5 SMP Sat Aug 1 09:04:48 UTC 2009 x86_64 GNU/Linux
------------------
Description: Ubuntu karmic (development branch)
Release: 9.10

Now I'll try a few other kernels and see if I get the same result

Revision history for this message
kylea (kylea) wrote :

My Karmic installation has gone very unstable - Bluetooth is not working properly, can pair but nothing else works.

I am building another Alpha3 and will take a back up of the filesystem before each major update.

Something I am installing after the base install is really mucking things up.

Revision history for this message
kylea (kylea) wrote :

Initial Re-install - bluetooth works perfectly.

Revision history for this message
kylea (kylea) wrote :

An update.

Bluetooth will connect to a headset device automatically without any trouble. (disconnecting via the Bluetooth-applet causes the applet to crash - I'll submit a new bug for that)

However the Nokia phone is more problematic. 25% of the time the PC will connect to the phone without any trouble. 75% of the time I have to connect from the Phone to the PC using anyremote and then I can connect from the PC to the Phone, eg use gnome-phone-manager or browse the Phones file system.

This behaviour has been consistent since 8.10 with my 6233 and now the 5800.

Its better as one way or another I can connect.

Maybe its a Nokia issue. I run SDPtool to query the phone and when it will not connect SDPtool times out.

Revision history for this message
kylea (kylea) wrote :

I am attaching a file of output from HCIDump.

It has output from several re-boot and sometimes connections work fine - other times not

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

This is reported against an old version of Ubuntu and many things has changed since then. Because of that we won't fix this issue however if this behavior repeats on a modern version please fill a bug report against it and we will take it from there.

Changed in bluez (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.