Bug 228787 - Intel 7260 bluetooth broken.
Summary: Intel 7260 bluetooth broken.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: Vladimir Kondratyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-06 16:52 UTC by dgilbert
Modified: 2021-06-13 22:15 UTC (History)
12 users (show)

See Also:


Attachments
Block_attachment_of_unitialized_7260_controller.patch (8.44 KB, patch)
2021-02-13 08:56 UTC, Vladimir Kondratyev
no flags Details | Diff
iwmbtfw_by_Philippe_Michaud-Boudreault.patch (18.21 KB, patch)
2021-05-03 18:28 UTC, Vladimir Kondratyev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dgilbert 2018-06-06 16:52:04 UTC
I have an Intel 7260 (iwm) Wifi/Bluetooth card.  The bluetooth portion of the card doesn't work properly under FreeBSD:

dmesg shows (these lines are not necessarily contiguous):

ubt0 on uhub2
ubt0: <vendor 0x8087 product 0x07dc, class 224/1, rev 2.00/0.01, addr 3> on usbus0
ubt0: ubt_ctrl_write_callback:780: control transfer failed: USB_ERR_TIMEOUT
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout

... I have tried restarting bluetooth ... and it doesn't do anything but fail.
Comment 1 Ian Trudel 2018-07-31 01:54:14 UTC
(In reply to dgilbert from comment #0)

Same issue here. Brand new card.
Comment 2 Daniel Zeisig 2018-08-13 02:55:59 UTC
Similar Situation for me running on a Matebook X Pro, Kabylake.

Autoloading module: ng_ubt.ko
Autoloading module: ng_ubt.ko
Autoloading module: ng_ubt.ko
Autoloading module: ng_ubt.ko
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
ubt0: ubt_ctrl_write_callback:782: control transfer failed: USB_ERR_TIMEOUT
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
Comment 3 Ivan 2018-08-19 20:52:19 UTC
I've observed the same issue with my intel card (72xx)
Comment 4 Ivan 2018-08-19 20:53:23 UTC
I believe from time to time the driver loads itself, but failed to find any devices. 
Probably, entire BT stack is broken.
Comment 5 Sergey A. Osokin freebsd_committer 2018-11-18 01:38:16 UTC
I have the same issue with 12.0-BETA4, here's the dmesg(8) output:

ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x0a2b, class 224/1, rev 2.00/0.10, addr 1> on usbus0
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
ubt0: ubt_ctrl_write_callback:782: control transfer failed: USB_ERR_TIMEOUT
Comment 6 J.R. Oldroyd 2018-11-28 21:00:44 UTC
Same on an Asus S510UQ running 11.2:

dmesg:
ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x0a2b, class 224/1, rev 2.00/0.10, addr 3> on usbus0
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
ubt0: ubt_ctrl_write_callback:780: control transfer failed: USB_ERR_TIMEOUT
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout

# usbconfig dump_device_desc
ugen0.4: <vendor 0x8087 product 0x0a2b> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00e0  <Wireless controller>
  bDeviceSubClass = 0x0001 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x8087 
  idProduct = 0x0a2b 
  bcdDevice = 0x0010 
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001 

Running the rc.d/bluetooth setup commands manually, all the ngctl commands complete ok; the first hccontrol command fails with the timeout.
Comment 7 Vladimir Kondratyev freebsd_committer 2019-02-08 11:36:04 UTC
(In reply to J.R. Oldroyd from comment #6)
I wrote (really, mostly stole) firmware downloader for Intel Wireless 8260/8265 Controllers (VID/PID is 0x8087/0x0a2b) so you can try it: https://github.com/wulf7/iwmbt-firmware
Please, don't report failures unless you have read Caveats section of README file :-)

Unfortunately, it wont help Bug Reporter as he has older 0x8087/0x07dc device.
Comment 8 Daniel Zeisig 2019-02-09 13:40:37 UTC
(In reply to Vladimir Kondratyev from comment #7)

Followed instructions at: https://github.com/wulf7/iwmbt-firmware
Installation worked right away but just after changing the

BTSTACK_COMMIT= a563da7c504f59cdb6ba2c73b00867f9b0655f44 in "Makefile" to match the current latest commit of https://github.com/bluekitchen/btstack I could find the btdevice via: $>sudo ngctl list

I did try to pair my "Bose QuietComfort 35" using this script: https://reviews.freebsd.org/D3778

Pairing looks good. If the device itself works I can't say yet. Thats next to find out for me.

Thanks Vladimir!
Comment 9 Nikola Lečić 2019-05-09 22:27:04 UTC
(In reply to Vladimir Kondratyev from comment #7)

Hi Vladimir,

I tried your code on Asus Zenbook 14 UX410UFR. After 'make install' and reboot:

ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x0a2b, class 224/1, rev 2.00/0.10, addr 2> on usbus0
wlan0: Ethernet address: 50:76:af:0c:7e:f7
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
wlan0: link state changed to UP
iwm0: frame 2/75 b800002c UNHANDLED (this should not happen)
Security policy loaded: MAC/ntpd (mac_ntpd)

[root@pers:/root]# iwmbtfw
USB Path: 08
Firmware downloading failed

And there is no ubt0 device. Am I missing something obvious?
Comment 10 Vladimir Kondratyev freebsd_committer 2019-05-10 09:09:00 UTC
(In reply to Nikola Lečić from comment #9)
Hi Nikola,

There is a separate "Intel Wireless 8260/8265" bug thread that can be found at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237083

Could you repost your question there?

Intel 7260 Bluetooth is a different piece of hardware.

Thanks
Comment 11 Nikola Lečić 2019-05-10 09:39:19 UTC
(In reply to Vladimir Kondratyev from comment #10)

Vladimir,

Indeed, sorry. Done.
Comment 12 dgilbert 2019-11-05 06:00:20 UTC
Just wondering if this is on anyone's list?  The 8250 cards are a different form factor and won't fit in this laptop.
Comment 13 skrech 2020-05-02 13:52:18 UTC
Hello,
Any news on this front?
Comment 14 Vladimir Kondratyev freebsd_committer 2021-02-13 08:56:34 UTC
Created attachment 222405 [details]
Block_attachment_of_unitialized_7260_controller.patch

This patch should prevent start of ng_ubt driver on 7260 controllers which have no firmware downloaded.

It DOES NOT contain firmware downloader. It is just a little brick on a road to support 7260.

It is not tested by me due to lack of hardware.
Comment 15 timp87 2021-02-14 17:22:25 UTC
(In reply to Vladimir Kondratyev from comment #14)
Building this on my Lenovo x1 carbon gen 3 where I have the issue.
Comment 16 Gleb Popov freebsd_committer 2021-02-14 17:32:48 UTC
(In reply to Vladimir Kondratyev from comment #14)
This patch improves things for me. The firmware downloader doesn't try to do anything now, and USB timeouts are now gone. These timeouts were actually preventing my system from rebooting, so I had to poweroff it.
Comment 17 Helge Oldach 2021-02-15 09:22:04 UTC
Same here!
Comment 18 timp87 2021-02-15 16:01:21 UTC
(In reply to timp87 from comment #15)
It helped me to get rid of those "Root mount waiting for: usbus0" messages which slowed down the boot process a lot!

Is it too late to include this into releng/13.0?
Comment 19 commit-hook freebsd_committer 2021-04-15 14:29:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=788a171c77760c2847b6433c5a914a304d0aa184

commit 788a171c77760c2847b6433c5a914a304d0aa184
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-04-15 14:26:32 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-04-15 14:26:32 +0000

    ng_ubt: Block attachment of uninitialized Intel Wireless 7265

    As this controller requires firmware patch downloading to operate.
    "Intel Wireless 7265" support in iwmbtfw(8) is yet to be done.

    Tested by:      arrowd et al
    PR:             228787
    MFC after:      2 weeks

 sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c       |   5 +-
 sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c | 122 +++++++++++++++++-----
 sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h   |   4 +
 3 files changed, 103 insertions(+), 28 deletions(-)
Comment 20 Vladimir Kondratyev freebsd_committer 2021-04-15 17:52:01 UTC
(In reply to timp87 from comment #18)
> Is it too late to include this into releng/13.0?

It was not too late, but I was too busy @atwork to handle that. It will get to 13-STABLE soon.
Comment 21 commit-hook freebsd_committer 2021-04-30 20:16:54 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=83235903d5dc735fbce8b22a5204ab648f2d9c94

commit 83235903d5dc735fbce8b22a5204ab648f2d9c94
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-04-15 14:26:32 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-04-30 20:14:44 +0000

    ng_ubt: Block attachment of uninitialized Intel Wireless 7265

    As this controller requires firmware patch downloading to operate.
    "Intel Wireless 7265" support in iwmbtfw(8) is yet to be done.

    Tested by:      arrowd et al
    PR:             228787

 sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c       |   5 +-
 sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c | 122 +++++++++++++++++-----
 sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h   |   4 +
 3 files changed, 103 insertions(+), 28 deletions(-)
Comment 22 Vladimir Kondratyev freebsd_committer 2021-05-03 17:35:18 UTC
There are good news on this issue:

Philippe Michaud-Boudreault added a support for 7260 to iwmbtfw.

Please, try iwmbtfw from his repo: https://github.com/sinetek/iwmbtfw

As 7260 requires firmware files do be downloaded, I added them to comms/iwmbt-firmware port:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253302
Comment 23 Vladimir Kondratyev freebsd_committer 2021-05-03 18:28:40 UTC
Created attachment 224637 [details]
iwmbtfw_by_Philippe_Michaud-Boudreault.patch

Leave Philippe's work here as patch to src tree to make it easier to apply
Comment 24 Helge Oldach 2021-05-04 10:13:28 UTC
Works perfectly (stable/13):

ugen0.2: <vendor 0x8087 product 0x07dc> at usbus0
ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x07dc, class 224/1, rev 2.00/0.01, addr 1> on usbus0
Comment 25 commit-hook freebsd_committer 2021-05-04 23:53:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=fe70d7b26d7a98b17e315bc3455bee267c618b4e

commit fe70d7b26d7a98b17e315bc3455bee267c618b4e
Author:     Philippe Michaud-Boudreault <pitwuu@gmail.com>
AuthorDate: 2021-05-04 23:48:21 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-05-04 23:50:32 +0000

    iwmbtfw(8): Add support for Intel 7260/7265 bluetooth adapter firmwares

    To use it comms/iwmbt-firmware port should be updated to 20210315 version.

    Submitted by:   Philippe Michaud-Boudreault <pitwuu@gmail.com>
    Tested by:      Helge Oldach <freebsd@oldach.net>
    Reviewed by:    wulf
    PR:             228787
    MFC after:      2 weeks

 usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c   |  14 ++
 usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c   | 189 +++++++++++++++++++++++-
 usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h   |   5 +
 usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8    |  10 +-
 usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf |   2 +-
 usr.sbin/bluetooth/iwmbtfw/main.c       | 253 +++++++++++++++++++++++---------
 6 files changed, 401 insertions(+), 72 deletions(-)
Comment 26 commit-hook freebsd_committer 2021-05-23 22:46:47 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=0be693b3d5f1bda593a96ba3fcd5a31538b35781

commit 0be693b3d5f1bda593a96ba3fcd5a31538b35781
Author:     Philippe Michaud-Boudreault <pitwuu@gmail.com>
AuthorDate: 2021-05-04 23:48:21 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-05-23 22:44:36 +0000

    iwmbtfw(8): Add support for Intel 7260/7265 bluetooth adapter firmwares

    To use it comms/iwmbt-firmware port should be updated to 20210315 version.

    Submitted by:   Philippe Michaud-Boudreault <pitwuu@gmail.com>
    Tested by:      Helge Oldach <freebsd@oldach.net>
    Reviewed by:    wulf
    PR:             228787

 usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c   |  14 ++
 usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c   | 189 +++++++++++++++++++++++-
 usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h   |   5 +
 usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8    |  10 +-
 usr.sbin/bluetooth/iwmbtfw/iwmbtfw.conf |   2 +-
 usr.sbin/bluetooth/iwmbtfw/main.c       | 253 +++++++++++++++++++++++---------
 6 files changed, 401 insertions(+), 72 deletions(-)
Comment 27 Vladimir Kondratyev freebsd_committer 2021-06-13 22:15:38 UTC
Intel 7260 (iwm) Wifi/Bluetooth card firmware downloader has been committed to both 14-CURRENT and 13-STABLE