Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[SOLVED] Bluetooth support not working.

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
fernan82
n00b
n00b
Posts: 70
Joined: Thu Jul 24, 2014 9:37 pm

[SOLVED] Bluetooth support not working.

  • Quote

Post by fernan82 » Sun Aug 31, 2014 5:19 pm

Hello,

I have a netbook with a Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01). As I understand this is a WiFi + Bluetooth adapter. The bluetooth part is attached to the USB bus and is seen by lsusb as:

Code: Select all

Bus 004 Device 002: ID 0489:e05f Foxconn / Hon Hai
On the 3.12.21 gentoo kernel it is detected as hci0 but it doesn't see any bluetooth devices so I can't pair it. Also if I try to change the adapter name on KDE System Settings > Bluetooth > Adapter it resets itself to BlueZ 5.21. I also tried scanning with bluetoothctl.

On the 3.14.14 gentoo and 3.16.1 vanilla kernels it is not detected at all. On dmesg I see the exact same output as with the 3.12.21 kernel (posted bellow) but it's not seen by bluetoothctl or by KDE bluedevil, it's not on /sys/class/devices/bluetooth and the rfkill switch is gone.

dmesg | grep -i blue output:

Code: Select all

[    1.800070] Bluetooth: Core ver 2.19
[    1.800107] Bluetooth: HCI device and connection manager initialized
[    1.800115] Bluetooth: HCI socket layer initialized
[    1.800121] Bluetooth: L2CAP socket layer initialized
[    1.800141] Bluetooth: SCO socket layer initialized
[    2.181550] Bluetooth: Virtual HCI driver ver 1.4
[    2.181666] Bluetooth: HCI UART driver ver 2.2
[    2.181672] Bluetooth: HCI H4 protocol initialized
[    2.181675] Bluetooth: HCI BCSP protocol initialized
[    2.181679] Bluetooth: HCILL protocol initialized
[    2.181683] Bluetooth: HCIATH3K protocol initialized
[    2.181686] Bluetooth: HCI Three-wire UART (H5) protocol initialized
[    2.181910] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    2.216597] Bluetooth: RFCOMM TTY layer initialized
[    2.216609] Bluetooth: RFCOMM socket layer initialized
[    2.216624] Bluetooth: RFCOMM ver 1.11
[    2.216639] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.216643] Bluetooth: BNEP filters: protocol multicast
[    2.216650] Bluetooth: BNEP socket layer initialized
[    2.216657] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.216664] Bluetooth: HIDP socket layer initialized
The WiFi adapter is using the ath9k driver and I have the bluetooth co-existance enabled. The WiFi works just fine except that when I was using wpa_supplicant alone it kept getting disconnected. I always seemed to reconnect right away and never did it when I was using the internet, the only symptom was annoying Disconnected/Connected popups on tray wpa_gui tray icon, now I'm using NetworkManager and it works fine (maybe it still happens and NetworkManager doesn't show it?).

Also after I upgraded to the 3.16.1 kernel (I never actually used 3.14.14, I just installed it to see if it happens with a Gentoo kernel) my system would sometimes hang at boot right after displaying the tux logo (more often when running on batteries). Sometimes after a few seconds it would display an error about power: patch file not found: btath3kXXXX.hcf (or something of that sort) and continue booting, other times it would just hang and when I press any key it displays the error and reboots. I got rid of it by disabling the PM runtime functionality feature, it resurfaced once more after resuming from hibernation, this time I disabled the Atheros Firmware download driver and it hasn't resurfaced again.

Any suggestions?

Thanks
Fernan
Last edited by fernan82 on Mon Sep 01, 2014 11:45 pm, edited 1 time in total.
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sun Aug 31, 2014 7:59 pm

Hello,

do you start the Bluetooth service before doing anything? Without that, no bluetooth device will be seen at least by bluetoothctl. Even when the Bluetooth service is up and running, you may have to put the power on for the Bluetooth device being usable.

In the Bluetooth subshell, you have to excute several commands before the scan can work:

Code: Select all

[bluetooth]# power on
[bluetooth]# scan on
and put your remote Bluetooth device in discovering mode. Your host device can be put in discovering mode too:

Code: Select all

bluetooth]# discoverable on
Does any Bluetooth device is seen by the command

Code: Select all

hciconfig -a
If not, you may miss some firmware files needed by a Bluetooth module. Check the dmesg messages.

About your Atheros wireless card, this trade mark generally work well. Enabling the Bluetooth coexistence is to be done. With Wpa_supplicant, you can use more than one driver, for example -D wext or -D nl80211. nl80211 is suppose to be better. So, try both to see if it's more stable with one than the other. The configuration of /etc/wpa_supplicant/wpa_supplicant.conf is important too.
Paul
Top
fernan82
n00b
n00b
Posts: 70
Joined: Thu Jul 24, 2014 9:37 pm

  • Quote

Post by fernan82 » Sun Aug 31, 2014 9:10 pm

Hello,

Thanks for the reply. Everything you mentioned about bluetoothctl I've tried, still no devices are discovered, and yes my devices are discoverable and I'm starting the bluetooth deamon at boot. Here's the output of [bluetooth]#show:

Code: Select all

Controller 1C:3E:84:C6:D2:E2
        Name: BlueZ 5.21
        Alias: BlueZ 5.21
        Class: 0x00010c
        Powered: yes
        Discoverable: yes
        Pairable: yes
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0515
        Discovering: yes
Still no devices are discovered. Also this host cannot be discovered by other devices.

Bellow is the output of hciconfig -a. But this is only when I boot the 3.12.21-gentoo-r1 kernel. The 3.14.14-gentoo and 3.16.1 kernels don't detect it at all (hence no hciconfig output) even though it shows the same dmesg out posted above on all kernels. I would like to use the 3.16.1 kernel because this laptop only supports the EFI framebuffer and it has some problems when used with the Catalyst proprietary driver that where fixed on this version and the open source radeon driver driver has several issues.

Code: Select all

hci0:   Type: BR/EDR  Bus: USB
        BD Address: 1C:3E:84:C6:D2:E2  ACL MTU: 1022:8  SCO MTU: 183:5
        UP RUNNING PSCAN ISCAN 
        RX bytes:2285 acl:0 sco:0 events:274 errors:0
        TX bytes:2242 acl:0 sco:0 commands:231 errors:0
        Features: 0xff 0xfe 0x0d 0xfe 0xd8 0x7f 0x7b 0x8f
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH HOLD SNIFF 
        Link mode: SLAVE ACCEPT 
        Name: 'BlueZ 5.21'
        Class: 0x00010c
        Service Classes: Unspecified
        Device Class: Computer, Laptop
        HCI Version: 4.1 (0x7)  Revision: 0x3101
        LMP Version: 4.1 (0x7)  Subversion: 0x1
        Manufacturer: Atheros Communications, Inc. (69)
One thing that confuses me is which driver it's using? Except for the host controller drivers (which are builtin) all got all USB drivers compiled as modules, yet I don't see any usb modules loaded in lsmod (except hid which is used by the touchscreen). Is there anything like lspci -k for usb that can tell me what drivers a specific device is using? <edit>I found it, HCI USB driver (and all the subsystem drivers which I have compiled builtin), still is there a way to list the modules used by a usb device like lspci -k?</edit>

My laptop has a function key that in windows disables both WiFi and bluetooth. The key has no effect on Linux but I assume it controls the rfkill switch and rfkill list shows that hci0 is not being blocked at all. It has no external switches and bluetooth works on windows.

As for the WiFi device I only mentioned it in case it was relevant to the bluetooth problem since it's a combo adapter. I prefer NetworkManager and I'm happy with the way it works, I only used wpa_supplicant at one point because I didn't knew how to get NetworkManager to connect at boot without logging in to the desktop.

Regards,
Fernan
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sun Aug 31, 2014 11:03 pm

There is

Code: Select all

lsusb -t
who display the kernel module in use by Usb port. It do not show the device itself that the module is driving on that port.

Is

Code: Select all

hcitool -i hci0 scanning
discover something?
Paul
Top
fernan82
n00b
n00b
Posts: 70
Joined: Thu Jul 24, 2014 9:37 pm

  • Quote

Post by fernan82 » Sun Aug 31, 2014 11:34 pm

Thanks, I didn't try that, right now I'm on 3.16.1 with no hci0 device but I will reboot in a minute and try it on the 3.12.21 kernel.

I compiled all the bluetooth drivers as modules and upon return the error was back: bluetooth: could not find patch file: ar3k/AthrBT_0x31010000.dfu. I found the file here: https://chromium.googlesource.com/chrom ... 010000.dfu and added it to the list of firmware blobs. Upon rebooting the error was gone and I see that the modules are loaded but I still cannot see the device.

I think I'm missing a virtual fs option on my kernel so it can create the hci device. One thing I disabled on the 3.14.14 and that is missing on the vanilla kernel is Gentoo's persistent device naming option, I disabled it on the 3.14.14 kernel because it breaks a USB CDC device I use but this option is supposed to enable some virtual filesystems.

I will try to compile the 3.12.21 kernel with the firmware blob now, hopefully that'll get it bluetooth to work then I just have to figure out how to get the device to show on 3.16.1.
Top
fernan82
n00b
n00b
Posts: 70
Joined: Thu Jul 24, 2014 9:37 pm

  • Quote

Post by fernan82 » Mon Sep 01, 2014 12:25 am

hcitool -i hci0 scanning didn't discover anything but I causes the following to be logged in dmesg:

Code: Select all

[  955.850807] Bluetooth: hci0 command 0x0401 tx timeout
It will do that the 1st time I run it, after that if I run it again it scans for about 30 seconds and returns without logging anything but if I got to bluetoothctl and run show it's still shows like it's scanning, if I try scan off it gives me Failed to stop discovery: org.bluez.Error.Failed but if I run scan on and then scan off again they both succeed. If I then exit bluetoothctl and run hcitool -i hci0 scanning again it will log the error on dmesg again.

Also now that I got the firmware file compiled into my kernel if I run show on bluetoothctl I got more services listed:

Code: Select all

Controller 1C:3E:84:C6:D2:E2
        Name: BlueZ 5.21
        Alias: BlueZ 5.21
        Class: 0x1c010c
        Powered: yes
        Discoverable: yes
        Pairable: yes
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
        UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0515
        Discovering: yes
and also two more dmesg entries are logged during startup:

Code: Select all

[    3.596292] btusb 4-2:1.0: usb_probe_interface
[    3.596302] btusb 4-2:1.0: usb_probe_interface - got id
Other than that I still can't use bluetooth :(
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Mon Sep 01, 2014 2:10 am

The file AthrBT_0x31010000.dfu is part of the linux-firmware package. You should install that package.

I have an hypothesis about integrated devices like Bluetooh in netbooks. You probably ever install Windows drivers. The installer often say "Dont plug the device until the driver installation is finish.". That's mean the driver must be ready to probe the device. If the device is detected before the driver is ready including firmware files access, the initialisation will fail.

The problem with integrated devices is that you cannot unplug them. They are there before Linux start and are detected when probed. At this moment, if you do not have everything needed in the kernel and/or in the initramfs, the initialisation fail.

After the boot is finish, the only choice you have, is to stop the Bluetooth service, unload the related modules, load them again and start the service again. So, you can try that if nothing work.

And other thing you can do, is to put everything needed for the Usb and Bluetooth support in the kernel image or at least in an initramfs, including the firmwares to permit Linux to be able to initialise the Bluetooth device as early as possible.

Remember, restart the Bluetooth service need to restart Pulseaudio too for Bluetooth audio.

Note that the Bluetooth service may need to be reconfigure otherwise than the default in /etc/bluetooth.

Note too that Systemd, Bluez (5), Dbus and Pulseaudio work all together. Systemd manage users permissions with Logind. If you use Openrc, you need Consolekit to manage user permissions.

If you look at the file /etc/dbus-1/system.d/bluetooth.conf, users must be in the lp and/or plugdev groups to comminicate with Bluetooth devices. Have you try Bluetooth scans as the root user to be sure permissions are not in causes?

Is the Bluetooth Usb device good enough in the netbook?
Paul
Top
fernan82
n00b
n00b
Posts: 70
Joined: Thu Jul 24, 2014 9:37 pm

  • Quote

Post by fernan82 » Mon Sep 01, 2014 4:08 am

Logicien wrote: The file AthrBT_0x31010000.dfu is part of the linux-firmware package. You should install that package.
That's it! Installed the package, rebooted and it was detected and working right away. Thanks for your time and patience.
Top
feniksa
n00b
n00b
User avatar
Posts: 7
Joined: Sun May 03, 2015 7:22 am
Location: Ukraine

  • Quote

Post by feniksa » Sun Oct 30, 2016 8:45 am

Just will add my fifty-cents.

If you see your bluetooth device with bluetoothctl and everything looks fine, but your bluetooth are NOT turning on (in dmesg you see "command timeout" errors).
Sometimes to get rid of this error, it may help fully turn off computer and remove AC cable[/b].

This bug can be found with some laptops, like ASUS with Qualcomm Atheros chip. This error also can happen on other devices with dual windows machines. If you hibernate your laptop, and then switch to windows - you will be unable to use your bluetooth device (because wifi-bluetooth chip in state, that can't be recognized by Linux module).
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic