# Very strange bluetooth problems

## sman

I have some very strange bluetooth problems and would be very grateful if somebody can help me. I have compiled my kernel according to the Gentoo bluetooth guide and USB guide and I have followed the mobile phone howto on gentoo-wiki.com and right now I can get my phone (a SonyEricsson K700i) to detect my computer and vice versa. My dongle (Prodigi) was very cheap but it works in Windows so it should be ok. When I've started bluetooth (/etc/init.d/bluetooth start) hcitool gives the same output as it does in the guide so that should be fine and "bluetooth:/" in Konqueror does show my phone (and two of my neighbours' and one other computer) and I can open my phone to list the services but that's about it. OBEX File transfers or object push usually don't work at all (Connection details in kdebluetoothd briefly show a signal, though) and when they work it's incredibly slow and stops at some point (kbtobexclient hangs and konqueror stalls then) - but even stranger is that my dongle makes quite a lot of noise (some high-pitch buzzing) when I use it Linux but not in Windows and the transfer speed is higher in Windows than in Linux whenever it has worked for a short while - approximately a steady 30 KB/s in Windows and 100 KB/s at first in Linux but then decreasing within a few seconds to less than 10 KB/s and quite quickly stalling and then either stopping or a repeat of the fast decrease from 100KB/s to stalling (it is of course possible that there's a similar variation but no stalling in Windows and thus the speed shown can be different if it's a less frequently calculated average than that of Konqueror). When I try to open OBEX File Transfer in Konqueror I usually only get an error message saying "Could not connect to host 00:(my phone)" and thus I've tried obexftp to get a more elaborate one but "obexftp -b" usually only results in "Failed to connect to SDP server: Operation already in progress" and "obexftp -b 00:(my phone) -l" gives me 

Browsing 00:(my phone)...

Channel: 7

No custom transport

Connecting...bt: -1

failed: connect

Still trying to connect

Connecting...bt: -1

failed: connect

Still trying to connect

Connecting...bt: -1

failed: connect

Still trying to connect

My phone sometimes detects my computer with its name in hcid.conf and sometimes just as "ISSC Bluetooth adapt" - but it doesn't detect it as a computer. kdebluetoothd does, however, request me for the pin I enter in my phone then. When I start kdebluetoothd it gives me a message (only the relevant portions here): "...some other devices might require a modified class number for your bluetooth adapter in /etc/bluetooth/hcid.conf Currently the class is set to 0x0. We suggest you change this to something like 0x100000 instead and restart BlueZ hcid."  My hcid.conf, however, states:

        # Local device class

        class 0x3e0100;

and I've tried changing it to 0x100000 but kbluetoothd still gives me the same message (so I'm not quite sure that I've changed the correct setting but that's the only mention of "class" in hcid.conf). "rfcomm connect 0 00:(my phone)" results in

"Can't connect RFCOMM socket: Connection refused"

Additional details:

l2ping works fine (quite steady 35 ms)

lsusb:

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 003: ID 1131:1001 Integrated System Solution Corp.

Bus 001 Device 001: ID 0000:0000

(Note: I don't have any other USB devices)

lsmod:

Module                  Size  Used by

rfcomm                 34780  0

l2cap                  22148  5 rfcomm

uhci_hcd               29648  0

hci_usb                13128  2

ehci_hcd               28936  0

ohci_hcd               19012  0

nvidia               3916924  12

(rmmod ohci_hcd stops the annoying noise but nothing works if I do that)

hcidump eventually ends with this when I try to open OBEX File Transfer:

> HCI Event: Command Complete (0x0e) plen 7

< HCI Command: Role Discovery (0x02|0x0009) plen 2

    handle 1

> HCI Event: Command Complete (0x0e) plen 7

< HCI Command: Disconnect (0x01|0x0006) plen 3

    handle 1 reason 0x13

    Reason: Remote User Terminated Connection

> HCI Event: Command Status (0x0f) plen 4

> HCI Event: Disconn Complete (0x05) plen 4

hciconfig:

hci0:   Type: USB

        BD Address: 00:11:67:03:DD:C3 ACL MTU: 678:8 SCO MTU: 48:5

        UP RUNNING PSCAN ISCAN INQUIRY

        RX bytes:388323 acl:7601 sco:0 events:36114 errors:0

        TX bytes:7609477 acl:35752 sco:0 commands:249 errors:0

So my problem is that I can't get anything useful to work and I don't know how to investigate this problem further.

----------

## sman

No replies at all so I bump this once.

----------

## vishnja

Hi sman,

have you solved your problems yet?

I'm struggeling as well with obex file transfer profile, but you might improve your situation by configuring the class number of your device with hciconfig or khciconfig.

Kbluetooth will accept their input more than of the /etc/bluetooth/hcid.conf file.

----------

## sman

It turned out that the buzzing was due to the motherboard - google for "Asus K8N-E Deluxe buzzing" and you'll notice that many people have similar problems. I've gotten a different motherboard as a replacement now and the problem has thus been solved. This is a very late reply but I'll add it anyway in case somebody else has similar problems.

----------

## vishnja

Thanks for your reply! I'm using an Thinkpad T40p laptop...

Good that you found a solution for your problem  :Smile: 

----------

