Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with bluetooth
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Tue Jun 23, 2009 5:58 am    Post subject: Help with bluetooth Reply with quote

I'm trying to get my new bluetooth adaptor to work (it's the common USB type).

I've been looking at the Gentoo bluetooth guide, but it seems out of date. Anyway, I've got the kernel modules compiled, and bluez-4.39 is installed. The adaptor seems to be detected by my system:

Code:
# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 003: ID 04d9:0499 Holtek Semiconductor, Inc.
Bus 002 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 001: ID 1d6b:0001


but dmesg shows a whole lot of this:
Code:
hci_cmd_task: hci0 command tx timeout


And:
Code:
# hciconfig -a
hci0:   Type: USB
        BD Address: 00:1F:81:00:02:50 ACL MTU: 1021:4 SCO MTU: 180:1
        UP RUNNING PSCAN
        RX bytes:696 acl:0 sco:0 events:24 errors:0
        TX bytes:346 acl:0 sco:0 commands:40 errors:17
        Features: 0xff 0x3e 0x0d 0x76 0x80 0x01 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
Can't read local name on hci0: Connection timed out (110)


I'm not sure where to go from here. Any help is appreciated.
Back to top
View user's profile Send private message
honp
Guru
Guru


Joined: 25 Sep 2006
Posts: 355
Location: Good old Prague, Czech rep.

PostPosted: Tue Jun 23, 2009 8:02 am    Post subject: Reply with quote

And what do you want? Use it as "AP" or client or anything else?
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Tue Jun 23, 2009 10:04 am    Post subject: Reply with quote

Mostly to transfer files/sync with my phone etc. Found a nifty program which can let me use my phone's camera as a webcam. I'm not really worried about using the phone as a modem or anything like that.

Following the guide, the suggested commands don't seem to work, and I figure it's to do with the errors I'm seeing above. Eg:

Code:
# hcitool scan
Scanning ...
Inquiry failed: Connection timed out


I've googled around somewhat, but haven't found anything that seems to relate to this specific problem.
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Fri Jun 26, 2009 11:07 pm    Post subject: Reply with quote

bump
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Fri Jun 26, 2009 11:19 pm    Post subject: Reply with quote

Do you have the bluetooth service started? And do you really want to set things up through the command line? (bluetooth is nicer to use with blueman)
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Fri Jun 26, 2009 11:24 pm    Post subject: Reply with quote

Yeah, I have the service started. As to doing things through the command line, I guess I'm used to getting things working here first, and then going to a graphical interface once I have that working... I'll try blueman and report back.
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Fri Jun 26, 2009 11:48 pm    Post subject: Reply with quote

You'll need to make a little change to the dbus config to have blueman working:
Code:
nomad szczerb # cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy group="plugdev">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Mon Aug 10, 2009 9:12 am    Post subject: Reply with quote

Coming back to this still unsolved problem...

The blueman-applet process seems to be running, but I don't get anything I can access (I'm running KDE 4.3, hopefully not a problem).

Code:
# hciconfig -a
hci0:   Type: USB
        BD Address: 00:1F:81:00:02:50 ACL MTU: 1021:4 SCO MTU: 180:1
        UP RUNNING PSCAN
        RX bytes:720 acl:0 sco:0 events:28 errors:0
        TX bytes:612 acl:0 sco:0 commands:39 errors:12
        Features: 0xff 0x3e 0x0d 0x76 0x80 0x01 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
Can't read local name on hci0: Connection timed out (110)


Code:
#dmesg
Bluetooth: L2CAP ver 2.13
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
....
hci_cmd_task: hci0 command tx timeout
hci_cmd_task: hci0 command tx timeout
...
bluetoothd[4980]: segfault at 100000007 ip 00007f835f7bd53b sp 00007fff20bbbdc0 error 4 in libc-2.9.so[7f835f74a000+14b000] <-- happens when I try and run blueman stuff
hci_cmd_task: hci0 command tx timeout
...


Not sure what to do. Not sure if it's relevant or not, but I had to create the hcid.conf and pin files that the Gentoo bluetooth guide says to edit. I'm running bluez 4.39.
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Wed Aug 26, 2009 8:38 am    Post subject: Reply with quote

Anyone who can help with this? I don't seem to be getting anywhere!
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2056
Location: United Kingdom

PostPosted: Wed Sep 02, 2009 11:54 pm    Post subject: Reply with quote

I got Bluetooth working under KDE 4.2, so you may be able to use the same procedure under KDE 4.3. The following post explains what I did:
https://forums.gentoo.org/viewtopic-p-5884856.html#5884856
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Thu Sep 03, 2009 2:36 am    Post subject: Reply with quote

Hi there,

Thanks for your suggestion. Unfortunately I still can't get things to work. dmesg still shows a lot of:
Quote:
hci_cmd_task: hci0 command tx timeout


Which I think is what I need to solve before anything else will work properly.

I've also tried older versions of blue-utils and bluez-libs, but run into the same problem. The adaptor I have works fine on my laptop running the latest Kubuntu.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Sep 03, 2009 4:46 am    Post subject: Reply with quote

In principle, hciconfig and hcitool work without any bluetooth(d) services started, before any pins, pairing, etc. All they require is proper kernel modules loaded.
So you should be looking whether bluetooth subsytem in your kernel is properly configured (and whether you use proper driver for your bluetooth chip, it is probably btusb, but there are some special ones)
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Thu Sep 03, 2009 7:16 am    Post subject: Reply with quote

I've triple checked I have the kernel modules required as per the Gentoo Bluetooth Guide.

I'm wondering about the BD Address reported in this command:
Quote:
# hciconfig -a
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
UP RUNNING
RX bytes:20 acl:0 sco:0 events:2 errors:0
TX bytes:6 acl:0 sco:0 commands:4 errors:2


Should that be all 00s?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Sep 03, 2009 2:33 pm    Post subject: Reply with quote

joefish wrote:
I've triple checked I have the kernel modules required as per the Gentoo Bluetooth Guide.

I'm wondering about the BD Address reported in this command:
Quote:
# hciconfig -a
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
UP RUNNING
RX bytes:20 acl:0 sco:0 events:2 errors:0
TX bytes:6 acl:0 sco:0 commands:4 errors:2


Should that be all 00s?


No, that's not good. Could you post the results of

cat /proc/modules

Also, it seems that before you were in a better shape - at least BD address was recognized. What has changed ?

The working output of the hciconfig -a should look something like that
Code:


hciconfig -a

hci0:   Type: USB
        BD Address: 00:0A:50:F0:19:A1 ACL MTU: 672:8 SCO MTU: 0:0
        UP RUNNING PSCAN ISCAN
        RX bytes:72154 acl:1888 sco:0 events:2852 errors:0
        TX bytes:44740 acl:1891 sco:0 commands:649 errors:0
        Features: 0xff 0xfb 0x01 0x00 0x00 0x00 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: 'polarbear-0'
        Class: 0x4a2100
        Service Classes: Networking, Capturing, Telephony
        Device Class: Computer, Uncategorized
        HCI Ver: 1.1 (0x1) HCI Rev: 0x8106 LMP Ver: 1.1 (0x1) LMP Subver: 0x9240
        Manufacturer: ST Microelectronics (48)
Back to top
View user's profile Send private message
foxicatko
n00b
n00b


Joined: 15 Mar 2008
Posts: 14

PostPosted: Thu Sep 03, 2009 2:43 pm    Post subject: Reply with quote

If you run out of ideas, try hidd instead of hcitool. I read somewhere it's been deprecated in favor of hcitool, but it was the only way i could get my BT mouse work....
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Thu Sep 03, 2009 9:27 pm    Post subject: Reply with quote

Quote:
# cat /proc/modules
snd_seq_oss 27744 0 - Live 0xffffffffa0ce7000
snd_seq_midi_event 6600 1 snd_seq_oss, Live 0xffffffffa0ce0000
snd_seq 50064 4 snd_seq_oss,snd_seq_midi_event, Live 0xffffffffa0cce000
snd_seq_device 6700 2 snd_seq_oss,snd_seq, Live 0xffffffffa0cc7000
snd_pcm_oss 35328 0 - Live 0xffffffffa0cb9000
snd_mixer_oss 14712 1 snd_pcm_oss, Live 0xffffffffa0cb0000
vboxnetflt 85372 0 - Live 0xffffffffa0c96000
vboxdrv 1689564 1 vboxnetflt, Live 0xffffffffa0af4000
snd_hda_codec_realtek 249884 1 - Live 0xffffffffa0ab1000
nvidia 10301016 36 - Live 0xffffffffa00d9000 (P)
ath5k 115484 0 - Live 0xffffffffa00b7000
mac80211 134404 1 ath5k, Live 0xffffffffa0091000
snd_hda_intel 25672 1 - Live 0xffffffffa0085000
snd_hda_codec 48616 2 snd_hda_codec_realtek,snd_hda_intel, Live 0xffffffffa0077000
led_class 4448 1 ath5k, Live 0xffffffffa0070000
snd_pcm 65664 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec, Live 0xffffffffa005a000
i2c_core 21600 1 nvidia, Live 0xffffffffa004f000
snd_timer 20248 2 snd_seq,snd_pcm, Live 0xffffffffa0045000
k8temp 4904 0 - Live 0xffffffffa003e000
snd 57496 12 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer, Live 0xffffffffa002a000
cfg80211 63584 2 ath5k,mac80211, Live 0xffffffffa0018000
soundcore 6640 1 snd, Live 0xffffffffa0011000
snd_page_alloc 8776 2 snd_hda_intel,snd_pcm, Live 0xffffffffa0009000
btusb 12780 0 - Live 0xffffffffa0000000


Right now I'm running bluez-4.45 as per Fitzcarraldo's thread link above. That's the only thing that's changed.
Back to top
View user's profile Send private message
joefish
Guru
Guru


Joined: 27 Jan 2004
Posts: 316
Location: New Zealand

PostPosted: Thu Sep 03, 2009 9:29 pm    Post subject: Reply with quote

foxicatko wrote:
If you run out of ideas, try hidd instead of hcitool. I read somewhere it's been deprecated in favor of hcitool, but it was the only way i could get my BT mouse work....


Which package provides this? It's not on my system.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Fri Sep 04, 2009 12:07 am    Post subject: Reply with quote

joefish wrote:
Quote:
# cat /proc/modules
snd_seq_oss 27744 0 - Live 0xffffffffa0ce7000
snd_seq_midi_event 6600 1 snd_seq_oss, Live 0xffffffffa0ce0000
snd_seq 50064 4 snd_seq_oss,snd_seq_midi_event, Live 0xffffffffa0cce000
snd_seq_device 6700 2 snd_seq_oss,snd_seq, Live 0xffffffffa0cc7000
snd_pcm_oss 35328 0 - Live 0xffffffffa0cb9000
snd_mixer_oss 14712 1 snd_pcm_oss, Live 0xffffffffa0cb0000
vboxnetflt 85372 0 - Live 0xffffffffa0c96000
vboxdrv 1689564 1 vboxnetflt, Live 0xffffffffa0af4000
snd_hda_codec_realtek 249884 1 - Live 0xffffffffa0ab1000
nvidia 10301016 36 - Live 0xffffffffa00d9000 (P)
ath5k 115484 0 - Live 0xffffffffa00b7000
mac80211 134404 1 ath5k, Live 0xffffffffa0091000
snd_hda_intel 25672 1 - Live 0xffffffffa0085000
snd_hda_codec 48616 2 snd_hda_codec_realtek,snd_hda_intel, Live 0xffffffffa0077000
led_class 4448 1 ath5k, Live 0xffffffffa0070000
snd_pcm 65664 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec, Live 0xffffffffa005a000
i2c_core 21600 1 nvidia, Live 0xffffffffa004f000
snd_timer 20248 2 snd_seq,snd_pcm, Live 0xffffffffa0045000
k8temp 4904 0 - Live 0xffffffffa003e000
snd 57496 12 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer, Live 0xffffffffa002a000
cfg80211 63584 2 ath5k,mac80211, Live 0xffffffffa0018000
soundcore 6640 1 snd, Live 0xffffffffa0011000
snd_page_alloc 8776 2 snd_hda_intel,snd_pcm, Live 0xffffffffa0009000
btusb 12780 0 - Live 0xffffffffa0000000


Right now I'm running bluez-4.45 as per Fitzcarraldo's thread link above. That's the only thing that's changed.


I see very little of bluetooth modules in this list. Actually just btusb. I have


sco 5876 0 - Live 0xffffffffa001e000
bnep 7680 0 - Live 0xffffffffa003f000
rfcomm 25680 2 - Live 0xffffffffa07bd000
l2cap 15664 4 bnep,rfcomm, Live 0xffffffffa07b7000
btusb 7572 1 - Live 0xffffffffa0004000
bluetooth 38084 5 sco,bnep,rfcomm,l2cap,btusb, Live 0xffffffffa004d000

Perhaps some of them you have compiled in kernel (like the main infrastructure one - bluetooth), and the rest are not needed yet at the level
of hci communication with the card (but will be needed later - rfcomm for serial transfers, bnep for networking etc).
I wonder whether your card is supposed to be supported by generic btusb. There are three alternative drivers in the kernel stack - HCI BCM203x USB driver,
HCI BPA10x USB driver and HCI BlueFRITZ! USB driver. Maybe your dongle is one of those ? (I'm thinking of Ubuntu, which you said did support the dongle, and I wonder how). Compile them as the modules and try to load manually rmmoding btusb first.

Then, looking again, it seems it is of one of the most generic types :(
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Sun Sep 06, 2009 12:58 am    Post subject: Reply with quote

The best guide I found for bluez-4.x is

http://wiki.openmoko.org/wiki/Manually_using_Bluetooth#Information_about_bluez4_networking
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum