Installing Intel AX200NGW Bluetooth

Hello everyone

I’m a Linux beginner, and I’m very excited on the prospect of developing for the nano.
I am, however, encountering some issues that should probably be simple for the knowledgeable linux person. I have installed the Intel AX200NGW module which brints Wifi6 and Bluetooth 5 features onto the Nano. I got WiFi to work, but Bluetooth is a mystery to me.

I have followed general recommendations on enabling Wifi using the backport iwlwifi driver with these steps: en:users:drivers:iwlwifi:core_release [Linux Wireless]

It worked fine. However, for BT, linux says there are no Bluetooth Adapters found.

I have seen support added for linux in recent firmware
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=665001af2ddef7ab74ef98015c218bda625b3ad7

Would it be possible to update the Nano with recent firmware? How?
Also, is there a plan to update the JetPack SDK featuring an updated L4A that would bring in this newer Kernel instead of 4.9?

uname -a:
Linux JetsonNano 4.9.140-tegra #1 SMP PREEMPT Mon Dec 9 22:47:42 PST 2019 aarch64 aarch64 aarch64 GNU/Linux

Thanks in advance

@anon52125497

You can try to add the new firmware under /lib/firmware/intel on jetson. I’m not sure if it work.

Here https://developer.nvidia.com/embedded/dlc/jetson-nano-scl you can find the components we have verified.

So, your “solution” is to install a different WiFi module?

I encounter same problem with Jetson nano and Intel AX200 and this procedure is my solution.

  1. Check the firmware in /lib/firmware/intel
    You need the ibt-20-1-3.ddc and ibt-20-1-3.sfi

  2. Edit Linux kernel for Tegra
    linux_for_Tegra/source/public/kernel_src/kernel/kernel-4.9/drivers/bluetooth/btusb.c

Add new device in variable: blacklist_table


/* Intel Bluetooth devices */
{ USB_DEVICE(0x8087, 0x0029), .driver_info = BTUSB_INTEL_NEW | 0x400000 },
...
...

Add new function: btusb_setup_intel_new_get_fw_name

static bool btusb_setup_intel_new_get_fw_name(struct intel_version *ver,
                struct intel_boot_params *params,
                char *fw_name, size_t len,
                const char *suffix)
{
    switch (ver->hw_variant) {
    case 0x0b: /* SfP */
    case 0x0c: /* WsP */
        snprintf(fw_name, len, "intel/ibt-%u-%u.%s",
                le16_to_cpu(ver->hw_variant),
                le16_to_cpu(params->dev_revid),
                suffix);
        break;
    case 0x11: /* JfP */
    case 0x12: /* ThP */
    case 0x13: /* HrP */
    case 0x14: /* CcP */
        snprintf(fw_name, len, "intel/ibt-%u-%u-%u.%s",
                le16_to_cpu(ver->hw_variant),
                le16_to_cpu(ver->dev_revid),
                le16_to_cpu(ver->fw_revision),
                suffix);
        break;
    default:
        return false;
    }                
    return true;
}

Edit function: btusb_setup_intel_new

  1. Add 0x0b, 0x0c, 0x11, 0x12, 0x13, 0x14 to support intel hardware(ver.hw_variant)
  2. Parse sfi and ddc filename by btusb_setup_intel_new_get_fw_name
...
...
	/* At the moment the iBT 3.0 hardware variants 0x0b (LnP/SfP)
	 * and 0x0c (WsP) are supported by this firmware loading method.
	 *
	 * This check has been put in place to ensure correct forward
	 * compatibility options when newer hardware variants come along.
	 */
	switch (ver.hw_variant) {
		case 0x0b: /* SfP */
		case 0x0c: /* WsP */
		case 0x11: /* JfP */
		case 0x12: /* ThP */
		case 0x13: /* HrP */
		case 0x14: /* CcP */
			break;
		default:
			bt_dev_err(hdev, "Unsupported Intel hardware variant (%u)", ver.hw_variant);
			return -EINVAL;	
	}

	btintel_version_info(hdev, &ver);


...
...
    err = btusb_setup_intel_new_get_fw_name(&ver, params, fwname, 
						sizeof(fwname), "sfi");

	if (!err) {
		bt_dev_err(hdev, "Unsupported Intel firmware naming");
		return -EINVAL;
	}

	err = request_firmware(&fw, fwname, &hdev->dev);
	if (err < 0) {
		BT_ERR("%s: Failed to load Intel firmware file (%d)",
		       hdev->name, err);
		kfree_skb(skb);
		return err;
	}

	BT_INFO("%s: Found device firmware: %s", hdev->name, fwname);

	/* Save the DDC file name for later use to apply once the firmware
	 * downloading is done.
	 */
	err = btusb_setup_intel_new_get_fw_name(&ver, params, fwname,						sizeof(fwname), "ddc");
	if (!err) {
		bt_dev_err(hdev, "Unsupported Intel firmware naming");
		return -EINVAL;
	}

Replace the btusb.ko by new one

2 Likes

Thank you for this solution. Unfortunately, btusb.c does not exist on the Jetson AGX Xavier operating under Ubuntu 18.04.4 LTS.

# find / -name *btusb*
/sys/bus/usb/drivers/btusb Is a directory
/sys/module/btrtl/holders/btusb Is a directory
/sys/module/btintel/holders/btusb Is a directory
/sys/module/btbcm/holders/btusb Is a directory
/sys/module/btusb Is a directory
/sys/module/btusb/drivers/usb:btusb Is a directory
/usr/src/linux-headers-4.15.0-112-generic/include/config/bt/hcibtusb.h
/usr/src/linux-headers-4.15.0-112-generic/include/config/bt/hcibtusb Is a directory
/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9/include/config/rtk/btusb.h
/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9/include/config/bt/hcibtusb.h
/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9/include/config/bt/hcibtusb Is a directory
/usr/src/linux-headers-4.9.140-tegra-linux_x86_64/kernel-4.9/include/config/rtk/btusb.h
/usr/src/linux-headers-4.9.140-tegra-linux_x86_64/kernel-4.9/include/config/bt/hcibtusb.h
/usr/src/linux-headers-4.9.140-tegra-linux_x86_64/kernel-4.9/include/config/bt/hcibtusb Is a directory
/lib/modules/4.9.140-tegra/kernel/drivers/bluetooth/realtek/rtk_btusb.ko
/lib/modules/4.9.140-tegra/kernel/drivers/bluetooth/btusb.ko
/run/udev/data/+module:btusb
/run/udev/data/+drivers:usb:btusb

# lsmod
Module Size Used by
xt_conntrack 3609 1
ipt_MASQUERADE 2346 1
nf_nat_masquerade_ipv4 3111 1 ipt_MASQUERADE
nf_conntrack_netlink 28859 0
nfnetlink 7959 2 nf_conntrack_netlink
xt_addrtype 3670 2
iptable_filter 2481 1
iptable_nat 2882 1
nf_conntrack_ipv4 11992 2
nf_defrag_ipv4 1836 1 nf_conntrack_ipv4
nf_nat_ipv4 6712 1 iptable_nat
nf_nat 20406 2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack 105820 6 nf_conntrack_ipv4,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
br_netfilter 16250 0
iwlmvm 543950 0
mac80211 930971 1 iwlmvm
fuse 103841 5
bnep 16562 2
zram 26166 4
overlay 48691 0
btusb 40213 0
btrtl 7318 1 btusb
btbcm 8808 1 btusb
btintel 10771 1 btusb
iwlwifi 446225 1 iwlmvm
cfg80211 782017 3 iwlmvm,iwlwifi,mac80211
spidev 13282 0
compat 122572 4 iwlmvm,iwlwifi,mac80211,cfg80211
binfmt_misc 13103 1
nvgpu 1579891 40
bluedroid_pm 13912 0
ip_tables 19441 2 iptable_filter,iptable_nat
x_tables 28951 5 ip_tables,iptable_filter,ipt_MASQUERADE,xt_addrtype,xt_conntrack

Do you think it would be productive to blacklist modules btrtl, btbcm, and add module btusb?

I would be grateful for a clue to how to implement your fix on Jetson AGX Xabier hardware.

ADVthanksANCE

Larry

Hi~
I think it also uses btusb.ko to load BT driver.
So you should download the kernel code and rebuild it.

Or you can try this one I build. btusb.zip (211.1 KB)
Just replace this file in /lib/modules/4.9.140-tegra/kernel/drivers/bluetooth/btusb.ko.
Remember to backup the original file.

2 Likes
Hello Norman,

I’ve never attempted to build a Linux kernel before, and am sure it would be an extensive
learning process. While I’m sure learning that skill would be useful, I’m currently more
interested in configuring my Jetson AGX Xavier, and getting down to exploring AI.

So, I chose to overwrite btusb.ko with the one you kindly provided.
I was a bit surprised that yours is ~10X larger than mine, but after a reboot,
I’ve now got a Bluetooth icon in the right of the upper menu-bar for the first time.

Although the Search Your Computer icon at the top of the dock won’t find it,
bluetooth-wizard appears to be the program to use to scan and attach
Bluetooth devices.

I can’t thank you enough for your kind assistance with this arcane issue.
You are a Unix Wizard! And, a kind and thoughtful person.

Best regards,
Larry

PS: Some information:

> /root (pts1) # lsmod | grep -e blu -e bt 
> btusb                  45261  0
> btrtl                   7318  1 btusb
> btbcm                   8808  1 btusb
> btintel                10771  1 btusb
> bluedroid_pm           13912  0

> /root (pts1) # lsmod
> Module                  Size  Used by
> iwlmvm                543950  0
> mac80211              930971  1 iwlmvm
> fuse                  103841  5
> bnep                   16562  2
> btusb                  45261  0
> btrtl                   7318  1 btusb
> btbcm                   8808  1 btusb
> btintel                10771  1 btusb
> zram                   26166  4
> overlay                48691  0
> iwlwifi               446225  1 iwlmvm
> spidev                 13282  0
> cfg80211              782017  3 iwlmvm,iwlwifi,mac80211
> compat                122572  4 iwlmvm,iwlwifi,mac80211,cfg80211
> binfmt_misc            13103  1
> nvgpu                1579891  29
> bluedroid_pm           13912  0
> ip_tables              19441  0
> x_tables               28951  1 ip_tables

> /root (pts1) # dmesg | grep -i blue
> [    1.061747] Bluetooth: Core ver 2.22
> [    1.061840] Bluetooth: HCI device and connection manager initialized
> [    1.061850] Bluetooth: HCI socket layer initialized
> [    1.061858] Bluetooth: L2CAP socket layer initialized
> [    1.061896] Bluetooth: SCO socket layer initialized
> [    4.147986] Bluetooth: RFCOMM socket layer initialized
> [    4.148014] Bluetooth: RFCOMM ver 1.11
> [    4.148020] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
> [    4.148028] Bluetooth: HIDP socket layer initialized
> [    9.415132] Bluetooth: hci0: Bootloader revision 0.3 build 0 week 24 2017
> [    9.416135] Bluetooth: hci0: Device revision is 1
> [    9.416141] Bluetooth: hci0: Secure boot is enabled
> [    9.416145] Bluetooth: hci0: OTP lock is enabled
> [    9.416148] Bluetooth: hci0: API lock is enabled
> [    9.416175] Bluetooth: hci0: Debug lock is disabled
> [    9.416179] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
> [    9.439178] Bluetooth: hci0: Found device firmware: intel/ibt-20-1-3.sfi
> [    9.502303] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
> [    9.502319] Bluetooth: BNEP socket layer initialized
> [   11.278230] Bluetooth: hci0: Waiting for firmware download to complete
> [   11.278241] Bluetooth: hci0: Firmware loaded in 1824442 usecs
> [   11.278388] Bluetooth: hci0: Waiting for device to boot
> [   11.294254] Bluetooth: hci0: Device booted in 15525 usecs
> [   11.295017] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-20-1-3.ddc
> [   11.310237] Bluetooth: hci0: Applying Intel DDC parameters completed

Hi Larry,

I have no idea about the size problem. The code I add is on the past post. If I have time I will try to test it again. Glad that you can work fine on bluetooth.