Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] AR9462 Bluetooth Kernel Support
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
dinominant
n00b
n00b


Joined: 27 Oct 2006
Posts: 66

PostPosted: Sat Mar 02, 2013 12:07 pm    Post subject: [solved] AR9462 Bluetooth Kernel Support Reply with quote

I've installed Gentoo on my tablet and everything works except bluetooth. I've followed the bluetooth guide here and I can see the device but I can't actually use it. I am completely out of ideas. Things I have tried:
  • I've upgrade my kernel to 3.8.1
  • I have compiled every kernel module I could when building 3.8.1; That's almost 3000 kernel modules.
  • I've installed the latest sys-kernel/linux-firmware-20130113

Here is a pastebin of the dmesg: dmesg

Code:
# hcitool dev
Devices:
        hci0    20:68:9D:B8:69:D1

Code:
# hcitool scan
Scanning ...

Code:
# hcitool inq
Inquiring ...


Code:
#lspci -vv
01:00.0 Network controller: Atheros Communications Inc. AR9462 Wireless Network Adapter (rev 01)
        Subsystem: Lite-On Communications Inc Device 6651
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at 90400000 (64-bit, non-prefetchable) [size=512K]
        Expansion ROM at 7fb00000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <4us, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
        Capabilities: [140 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 00-00-00-00-00-00-00-00
        Kernel driver in use: ath9k

Code:
$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 002: ID 8087:0a04 Intel Corp.
Bus 003 Device 007: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 003 Device 004: ID 04f3:000c Elan Microelectronics Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 04ca:3008 Lite-On Technology Corp.
Bus 001 Device 004: ID 04f2:b335 Chicony Electronics Co., Ltd
Bus 001 Device 005: ID 04f2:b355 Chicony Electronics Co., Ltd
Bus 003 Device 008: ID 046d:c068 Logitech, Inc. G500 Laser Mouse
Bus 003 Device 009: ID 04d9:2013 Holtek Semiconductor, Inc. Keyboard [Das Keyboard]

Code:
# lsmod
Module                  Size  Used by
hidp                   14218  0
rfcomm                 32719  12
bnep                   10817  2
hid_multitouch          8488  0
uvcvideo               69670  0
videobuf2_vmalloc       2389  1 uvcvideo
videobuf2_memops        2139  1 videobuf2_vmalloc
videobuf2_core         22782  1 uvcvideo
videodev               98549  2 uvcvideo,videobuf2_core
iTCO_wdt                5096  0
coretemp                5907  0
kvm_intel             120914  0
kvm                   364114  1 kvm_intel
crc32c_intel            1929  0
ghash_clmulni_intel     4358  0
aesni_intel            45177  2
aes_x86_64              7444  1 aesni_intel
ablk_helper             1797  1 aesni_intel
cryptd                  7526  3 ghash_clmulni_intel,aesni_intel,ablk_helper
xts                     3024  1 aesni_intel
lrw                     3422  1 aesni_intel
gf128mul                5683  2 lrw,xts
pcspkr                  1820  0
ath9k                  94004  0
ath9k_common            1921  1 ath9k
ath9k_hw              348484  2 ath9k_common,ath9k
ath                    14994  3 ath9k_common,ath9k,ath9k_hw
xhci_hcd               86391  0
mei                    32044  0
lpc_ich                11266  0
btusb                  11738  0
bluetooth             186315  25 bnep,hidp,btusb,rfcomm
joydev                  9392  0
acer_wmi               22996  0
wmi                     7916  1 acer_wmi

_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo


Last edited by dinominant on Tue Mar 05, 2013 10:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
dinominant
n00b
n00b


Joined: 27 Oct 2006
Posts: 66

PostPosted: Tue Mar 05, 2013 5:56 pm    Post subject: Reply with quote

So, I've downgraded my kernel to 3.7.10 and I still can't scan for bluetooth periferals. While executing the following commands I do not get anything new in /var/log/messages:
Code:
# hcitool dev
Devices:
        hci0    20:68:9D:B8:69:D1

Code:
# hcitool scan
Scanning ...

Code:
# hcitool info 38:E7:D8:44:C4:0D
Requesting information ...
Can't create connection: Input/output error


The exact same setup (but on my older Dell E6400) does work. I read somewhere that sometimes windows will load some firmware into the bluetooth device and rebooting into Linux can get it to work but it'll stop working after a cold boot because the firmware gets dumped. Do I need to find a firmware for this hardware??
Code:
# hcitool dev
Devices:
        hci0    00:22:5F:1F:C4:B9
# hcitool info 38:E7:D8:44:C4:0D
Requesting information ...
        BD Address:  38:E7:D8:44:C4:0D
        OUI Company: HTC Corporation (38-E7-D8)
        Device Name: <snip...>
        LMP Version: 2.1 (0x4) LMP Subversion: 0x4217
        Manufacturer: Broadcom Corporation (15)
        Features page 0: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x83
                <3-slot packets> <5-slot packets> <encryption> <slot offset>
                <timing accuracy> <role switch> <hold mode> <sniff mode>
                <park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
                <HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
                <power control> <transparent SCO> <broadcast encrypt>
                <EDR ACL 2 Mbps> <EDR ACL 3 Mbps> <enhanced iscan>
                <interlaced iscan> <interlaced pscan> <inquiry with RSSI>
                <extended SCO> <EV4 packets> <EV5 packets> <AFH cap. slave>
                <AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
                <sniff subrating> <pause encryption> <AFH cap. master>
                <AFH class. master> <EDR eSCO 2 Mbps> <EDR eSCO 3 Mbps>
                <3-slot EDR eSCO> <extended inquiry> <simple pairing>
                <encapsulated PDU> <err. data report> <non-flush flag> <LSTO>
                <inquiry TX power> <extended features>
        Features page 1: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00

_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
dinominant
n00b
n00b


Joined: 27 Oct 2006
Posts: 66

PostPosted: Tue Mar 05, 2013 10:20 pm    Post subject: Reply with quote

OK, so I've solved the problem. However somebody needs to update the kernel so it supports the AR9462 going forward. What I did to fix everything was modify two files in the kernel to add support for my bluetooth usb device: drivers/bluetooth/ath3k.c and drivers/bluetooth/btusb.c. In my case my bluetooth usb device ID (found from lsusb output) is 04ca:3008, so I searched those two files for 04ca and found what looked like a close match of 04ca and 3005. I duplicated that line in both files and changed the 3005 to my 3008. Then I recompiled my kernel (version 3.7.10) and everything worked!

Code:
$ diff ath3k.c /usr/src/linux/drivers/bluetooth/ath3k.c
80d79
<       { USB_DEVICE(0x04CA, 0x3008) },
108d106
<       { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },

Code:
$ diff btusb.c /usr/src/linux/drivers/bluetooth/btusb.c
138d137
<       { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },


After those changes everything worked:
Code:
# hcitool scan
Scanning ...
        7C:2F:80:49:59:8E       SL910
        90:7F:61:70:D5:DC       Acer Iconia W700 Bluetooth Keyboard


I have paired my keyboard case and my cell phone. And just to confirm in case anybody is interested: The Acer Iconia w700 Windows 8 tablet works with Gentoo Linux!
_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
dinominant
n00b
n00b


Joined: 27 Oct 2006
Posts: 66

PostPosted: Tue Mar 19, 2013 1:06 pm    Post subject: Reply with quote

This is just an update that Kernel 3.8.3 has this issue resolved. So there is no need to hack your kernel if you are using >3.8.3.
_________________
BTC: 18wdrw8sLtruvdwr5kB3RxbbxzjDeXUpRh
LTC: LYynwaSeBLb4gHaMnkB7NQ27H6wF3Fjyxo
Back to top
View user's profile Send private message
Smarty99
n00b
n00b


Joined: 19 Mar 2013
Posts: 1

PostPosted: Tue Mar 19, 2013 4:22 pm    Post subject: Reply with quote

@ dinominant

Hello,

I'am new to Gentoo Forum. I've seen that we have the same touchscreen/tablet.
I've a big issue with the right click on the touchscreen. Did you solve it? If yes, maybe you could help me with the configuration?

Thanks
Smarty99
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