# [SOLVED] Bluetooth 0489:e076 Foxconn / Hon Hai not working

## JuanSimpson

Hi!

Basically bluetooth is not working and I think is related to this bug:

 *Quote:*   

> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1425252

 

Device is listed as an USB Bluetooth but the scanning is not working.

```
[    5.437142] usb 2-5: new full-speed USB device number 3 using xhci_hcd

[    5.578016] usb 2-5: New USB device found, idVendor=0489, idProduct=e076

[    5.578019] usb 2-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    5.589835] Bluetooth: Core ver 2.20

[    5.589851] NET: Registered protocol family 31

[    5.589852] Bluetooth: HCI device and connection manager initialized

[    5.589855] Bluetooth: HCI socket layer initialized

[    5.589858] Bluetooth: L2CAP socket layer initialized

[    5.589863] Bluetooth: SCO socket layer initialized

[    5.591130] usbcore: registered new interface driver btusb

...

[    7.647890] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

[    7.647893] Bluetooth: BNEP filters: protocol multicast

[    7.647897] Bluetooth: BNEP socket layer initialized
```

When I try scanning, it doesn't work

```
$ sudo systemctl start bluetooth

$ bluetoothctl 

[NEW] Controller C0:38:96:05:89:2C BlueZ 5.25 [default]

[bluetooth]# show C0:38:96:05:89:2C 

Controller C0:38:96:05:89:2C

   Name: BlueZ 5.25

   Alias: BlueZ 5.25

   Class: 0x1c010c

   Powered: yes

   Discoverable: no

   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: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)

   UUID: Audio Sink                (0000110b-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)

   Modalias: usb:v1D6Bp0246d0519

   Discovering: no

[bluetooth]# scan on

Discovery started

[CHG] Controller C0:38:96:05:89:2C Discovering: yes

[bluetooth]# devices

...
```

And nothing is displayed

I tried to add the VID/PID in the btusb.c blacklist and the ath3k.c support list

 *Quote:*   

> According to this https://wireless.wiki.kernel.org/en/users/Drivers/ath3k I have an AR3011
> 
> You can use lsusb -v to check the device descriptor. If it's AR3011, the iProduct value is 0

 

```
$ lsusb -v -d 0489:e076

Bus 002 Device 003: ID 0489:e076 Foxconn / Hon Hai 

...

  iProduct                0 

...
```

So I did this:

```
# diff drivers/bluetooth/btusb.c drivers/bluetooth/btusb.c.orig 

156d155

<    { USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_IGNORE },
```

```
# diff drivers/bluetooth/ath3k.c drivers/bluetooth/ath3k.c.orig 

64d63

<    { USB_DEVICE(0x0489, 0xE076) },

```

After rebooting this is the dmesg relevant output:

```
Bluetooth: Error in firmware loading err = -110,len = 0, size = 4096
```

```
...

[    5.337244] usb 2-5: new full-speed USB device number 3 using xhci_hcd

[    5.477941] usb 2-5: New USB device found, idVendor=0489, idProduct=e076

[    5.477953] usb 2-5: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    5.503117] Bluetooth: Core ver 2.20

[    5.503129] NET: Registered protocol family 31

[    5.503129] Bluetooth: HCI device and connection manager initialized

[    5.503132] Bluetooth: HCI socket layer initialized

[    5.503134] Bluetooth: L2CAP socket layer initialized

[    5.503140] Bluetooth: SCO socket layer initialized

[    5.504990] usbcore: registered new interface driver btusb

...

[    8.559212] Bluetooth: Error in firmware loading err = -110,len = 0, size = 4096

[    8.559233] ath3k: probe of 2-5:1.0 failed with error -110

[    8.559921] usbcore: registered new interface driver ath3k

...

[    8.977875] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

[    8.977877] Bluetooth: BNEP filters: protocol multicast

[    8.977880] Bluetooth: BNEP socket layer initialized

...

```

Also I put the firmware that this bug say is needed ( https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1394368 )

```
AthrBT_0x11020100.dfu

ramps_0x11020100_40.dfu
```

in 

```
/lib/firmware/ar3k/
```

But it seems it is for the AR3012 over USB

I was expecting something like this

https://bugzilla.kernel.org/show_bug.cgi?id=49521

 *Quote:*   

> I have a Sony Vaio VPCEH1S0E with a bluetooth adapter that was not working until now 
> 
> lsusb show me this:
> 
> 0489:e027 Foxconn / Hon Hai
> ...

 

Some extra info:

```

$ sudo lspci -vv -s 02:00.0

02:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01)

   Subsystem: Foxconn International, Inc. Device e07d

   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 19

   Region 0: Memory at b0500000 (64-bit, non-prefetchable) [size=512K]

   Expansion ROM at b0580000 [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 Disabled; 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

   Kernel modules: ath9k

$ uname -a

Linux localhost 3.19.1-gentoo #4 SMP Sun Mar 22 14:54:22 CST 2015 x86_64 Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz GenuineIntel GNU/Linux

$ emerge --info 

Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.8.3, glibc-2.19-r1, 3.19.1-gentoo x86_64)

=================================================================

System uname: Linux-3.19.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-4510U_CPU_@_2.00GHz-with-gentoo-2.2

KiB Mem:    16367456 total,  13891348 free

KiB Swap:   16777212 total,  16777212 free

Timestamp of tree: Sun, 22 Mar 2015 06:00:01 +0000

ld GNU ld (Gentoo 2.24 p1.4) 2.24

app-shells/bash:          4.2_p53

dev-java/java-config:     2.2.0

dev-lang/perl:            5.20.1-r4

dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.1

dev-util/cmake:           2.8.12.2-r1

dev-util/pkgconfig:       0.28-r1

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.13.11

sys-apps/sandbox:         2.6-r1

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.11.6-r1, 1.13.4

sys-devel/binutils:       2.24-r3

sys-devel/gcc:            4.8.3

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4.4

sys-devel/make:           4.1-r1

sys-kernel/linux-headers: 3.18 (virtual/os-headers)

sys-libs/glibc:           2.19-r1

Repositories: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=native -mtune=native -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=native -mtune=native -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LANG="en_US.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

USE="X a52 aac acl acpi aes alsa amd64 avx avx2 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fma3 fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libav libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit popcnt ppds pulseaudio qt3support qt4 readline sdl session socialweb spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en es" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

```

----------

## JuanSimpson

Hi!

Just to post how this was solved.

Firstly, the modifications that I did to the kernel were wrong, I was taking them from an old post (2012), the right ones were done in this commit https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=a621d2c97a591fd811c192af007c0ae0d796dc30

Portage has Gentoo patched sources for kernel 4.1.1 and that commit was included in 4.1.1 release ( https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.1 ) but the commit says that the linux-firmware does not include them yet and here is the funny thing, I have an Acer Aspire V3 and the firmware files provided here ( https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1394368 ) do not work with my device so I had to copy them from a Windows pc and put them in /lib/firmware/ar3k

The two files are:

AthrBT_0x11020100.dfu

https://www.dropbox.com/s/n9x6lxaynw346ab/AthrBT_0x11020100.dfu?dl=0

ramps_0x11020100_40.dfu

https://www.dropbox.com/s/eh6dfi7s8rm4f4b/ramps_0x11020100_40.dfu?dl=0

And with those files and kernel 4.1.1 everything is working now

----------

