Bluetooth driver for internal Intel Wifi+Bluetooth Card in Thinkpad T490

FreeBSD 14.3-RELEASE was recently installed on my Thinkpad T490 and most of the hardware is running well, except for the missing internal bluetooth device, which isn't even being detected (as per dmesg). Even the WiFi card is detected as a 802.11g (instead of 802.11ac as per the specs at the link below), but that's not the focus of this post.


The focus of this post is the missing bluetooth device entirely.

I'd like to mention that before installing FreeBSD on this laptop, I had void-linux installed on it and all hardware was functional.

Based on https://www.freebsd.org/releases/14.3R/hardware/#bluetooth, I figure that the driver for the Intel WiFi+Bluetooth card may not be present in FreeBSD just yet.

https://wiki.freebsd.org/Laptops/Thinkpad_T490s also does not mention anything about the internal bluetooth card either.

I have extensive experience working in the linux land but FreeBSD is new to me. But I am motivated to put in the effort required to integrate the missing driver into FreeBSD, if it isn't done already.

I am in the process of reading the very helpful (Thank you!) FreeBSD Handbook and the Architecture book, but may still need some hand-holding initially. Thank you for reading this post and I appreciate any pointers in the correct direction.
 
if the hardware is usb it may work with some firmware loading
if its uart or sdio then no
the uart version will need of course an uart driver and a ng line discipline driver (and maybe firmware ?)
the sdio well...
 
if the hardware is usb it may work with some firmware loading
if its uart or sdio then no
the uart version will need of course an uart driver and a ng line discipline driver (and maybe firmware ?)
the sdio well...
Thank you for your prompt response.

Well... I wiped out Linux from this laptop while installing FreeBSD, so I can't check in there immediately on what interface it's connected through.

But based on https://www.thinkwiki.org/wiki/Bluetooth_Daughter_Card_(BDC-4), I could possibly be USB, but that information is for relatively older laptops (T430) and may not apply to the WiFi+Bluetooth integrated card which is in the T490. This integrated card may not be USB.

Although, it may be the same interface as the WiFi adapter. Is there an easy way to check, within FreeBSD, which interface the WiFi adapter is connected over?

Also, https://wiki.archlinux.org/title/Lenovo_ThinkPad_T490 just says that "Bluetooth Works", but doesn't contain many more details. I figure the drivers have been integrated into the mainline Linux kernel for a while.
 
you can verify if it shows up in usbconfig. i don't know about intel but many broadcom minipci wifi cards have bluetooth exposed as usb
 
It appears I'm in luck. It's connected over USB :).

Code:
root@t490-bsd:/home/madhurya # usbconfig
ugen0.5: <Bluetooth 9460/9560 Jefferson Peak (JfP) Intel Corp.> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

Thanks to this revelation, based on the Hardware Compatibility list and https://freebsdfoundation.org/resource/audio-on-freebsd-quick-guide/, I figure that the ng_ubt driver should have support for this bluetooth adapter.

Upon trying to enable the bluetooth device, I get the following

Code:
root@t490-bsd:~ # kldload ng_ubt
kldload: can't load ng_ubt: module already loaded or in kernel

Which is good. But still, I see no references to any ubt* device in /var/log/messages or dmesg output. I wonder what am I missing?
 
you can check if your vendor id / device id are supported
look in /sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c
you may try to add your model and rebuild, see if it works
 
you can check if your vendor id / device id are supported
look in /sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c
you may try to add your model and rebuild, see if it works
Thank you for the lead!

Code:
root@t490-bsd:~ # usbconfig -d ugen0.5 -v
ugen0.5: <Bluetooth 9460/9560 Jefferson Peak (JfP) Intel Corp.> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
...
  idVendor = 0x8087
  idProduct = 0x0aaa
...

Based on the laptop specs, https://psref.lenovo.com/syspool/Sys/PDF/ThinkPad/ThinkPad_T490/ThinkPad_T490_Spec.PDF, it's possibly a Intel Wireless-AC 9560, 802.11ac Dual Band 2x2 Wi-Fi® + Bluetooth 5.1.

But, in https://cgit.freebsd.org/src/tree/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c, Product ID 0x0aaa uses the device type UBT_INTEL_DEVICE_8260, instead of device type UBT_INTEL_DEVICE_9260.

Code:
    /* Intel Wireless 8260/8265 and successors */
    { USB_VPI(USB_VENDOR_INTEL2, 0x0aaa, UBT_INTEL_DEVICE_8260) },

Update: I made the following change, rebuilt the kernel with GENERIC configuration for amd64 and installed it on my laptop.
Code:
root@t490-bsd:/usr/src/releng_14.3 # git diff
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c
index c4410b7b2..20d9d674f 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c
@@ -94,13 +94,13 @@ static const STRUCT_USB_HOST_ID ubt_intel_devs[] =
        { USB_VPI(USB_VENDOR_INTEL2, 0x0aa7, UBT_INTEL_DEVICE_7260) },
        /* Intel Wireless 8260/8265 and successors */
        { USB_VPI(USB_VENDOR_INTEL2, 0x0a2b, UBT_INTEL_DEVICE_8260) },
-       { USB_VPI(USB_VENDOR_INTEL2, 0x0aaa, UBT_INTEL_DEVICE_8260) },
        { USB_VPI(USB_VENDOR_INTEL2, 0x0025, UBT_INTEL_DEVICE_8260) },
        { USB_VPI(USB_VENDOR_INTEL2, 0x0026, UBT_INTEL_DEVICE_8260) },
        { USB_VPI(USB_VENDOR_INTEL2, 0x0029, UBT_INTEL_DEVICE_8260) },
        /* Intel Wireless 9260/9560 and successors */
        { USB_VPI(USB_VENDOR_INTEL2, 0x0032, UBT_INTEL_DEVICE_9260) },
        { USB_VPI(USB_VENDOR_INTEL2, 0x0033, UBT_INTEL_DEVICE_9260) },
+       { USB_VPI(USB_VENDOR_INTEL2, 0x0aaa, UBT_INTEL_DEVICE_9260) },
 };

But in vain. Nothing got worse, but still no signs of bluetooth/ubt in dmesg or /var/log/messages. /dev/ubt0 does not exist. ng_ubt kernel module is loaded.

I could use some more hints :|. Thanks!
 
Back
Top