Jetson Nano + Intel AX200 WiFi Driver

Hi, I am new to Balena but looking to use it to develop a custom Jetson Nano board for an IIoT project. We are working on a prototype using the Jetson Nano development kit, which utilizes an Intel AX200 WiFi M.2 / PCIe card. According to Intel, it requires iwlwifi 46.3 or newer drivers:

https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi

It appears that BalenaOS build for Jetson Nano includes iwlwifi drivers, but it must be an earlier version as I don’t see the specific AX200 driver in there - and not surprisingly my AX200 is not being recognized. Is there any way that I could modify the base OS build to include the newer iwlwifi driver, such that my devices can connect to wifi out of the box?

Any guidance on this would be appreciated - thanks!

The driver unfortunately requires a 5.1+ kernel which makes it very hard for us to merely bump the driver version. I chatted with the devices team and their opinion is maybe building the driver externally and loading it in the container may work, but it requires some knowledge to do so, though we’d be happy to provide pointers if you decide to go that route.

Thank you - yes I would definitely like to give it a shot. The WiFi 6 functionality is core to what we are doing so this would be important for us to figure out if possible. Also when we finish developing our custom board for the Nano we will likely need to load other custom drivers so I think this is a good thing to figure out now.

You’ll find in the following link an example on how to build an out-of-tree kernel module using balenaOS. You’ll also find in the following forum post some pointers from another user on how to do that as well. Obviously we are happy to help out with any issues you find along the way.

Thank you. Just to confirm - this is to enable the WiFi driver, which is the primary (only) means of connectivity for the device. So presumably I would need to pre-load this module onto the device? Is there a way to do this? We are using balena cloud, so right now modules are pulled only once connectivity is established.

Hi. I believe the kernel-module-build project is supposed to run as a balenaOS service. It inserts the kernel module on startup. It needs to be updated for your particular needs, but as a service you can preload it into the image to be flashed using balena preload.

To keep the module in future releases of your application, remember to add this service to your application’s docker-compose.

While we are looking at this workaround now, could I get a rough sense of when you expect to have a 5.1+ kernel in the base OS (and updated iwlwifi drivers)? Just trying to understand if this is months or years away.

Hi, it depends when Nvidia releases a newer kernel for this board. I would say it will take longer than months, if at all actually.

We’ve been trying to get this working with no luck. Could we get some guidance from your development team on this specifically relating to the driver we are trying to integrate? I’m comfortable with the process of pre-building the container into the base image, but creating the driver container itself (i.e. building the driver and integrating it with the host) is what we are struggling with. Any help you can provide would be appreciated.

Hi @drcnyc,

Since proper support for this adapter depends on Nvidia upgrading the kernel or backporting the driver changes to the current kernel, I’d like to propose an alternative. Looking through the Nano documentation available here, there appear to be three fully supported wireless adapters:

  • Linksys WUSB6300
  • TP-Link TL-WN722N
  • Intel 8265NGW

Is it possible to use one of those adapters rather than waiting on a kernel update from Nvidia that will take potentially a long time?

The WiFi 6 functionality of the AX200 is core to our application so we would like to try to find a way to get this particular module working if possible. I came across a couple of posts (links below) which note that the core 45 version of the iwlwifi driver works with the Jetson Nano. Does this mean we would be able to be integrated into the base balena image as well? If so can you help guide me as to how to do this?

Further update: when I try using the kernel-module-build example with the backport-iwlwifi core 45 driver in place of example_module, everything works fine until I get to the build.sh step, when I get the following error:

Could not find headers for 'jetson-nano' at version '2.50.4+rev1.prod', run ./build.sh list

This occurs during the build process while using balena push to deploy it to a development app I have set up with the device type specified as Jetson Nano.

Did you change the OS version as pointed out in the README? the latest version for the jetson is 2.47.1+rev3

I hadn’t done that - but just tried updating $VERSION to 2.47.1+rev3 and I’m getting similar errors:

Step 6/7 : RUN BALENA_MACHINE_NAME=jetson-nano ./build.sh build --device jetson-nano --os-version "$VERSION" --src backport-iwlwifi
---> Running in 2d284ebec514

Then the following two errors repeated over 1,000 times each:

Could not find headers for 'jetson-nano' at version '2.47.1+rev3', run ./build.sh list
...
Could not find headers for 'jetson-nano' at version '2.47.1+rev3.prod', run ./build.sh list
...

And finally it aborts:

2020-06-15 10:44:12 (77.2 MB/s) - ‘kernel_modules_headers.tar.gz’ saved [10516090/10516090]
make: Entering directory '/tmp/tmp.OqFbMuh2M4'
/usr/src/app/output/backport-iwlwifi_jetson-nano_2.47.1+rev3.dev/Makefile:164: /Makefile.kernel: No such file or directory
make[1]: *** No rule to make target '/Makefile.kernel'.  Stop.
make: Leaving directory '/tmp/tmp.OqFbMuh2M4'
make: *** [Makefile:1631: _module_/usr/src/app/output/backport-iwlwifi_jetson-nano_2.47.1+rev3.dev] Error 2
Removing intermediate container 2d284ebec514
The command '/bin/sh -c BALENA_MACHINE_NAME=jetson-nano ./build.sh build --device jetson-nano --os-version "$VERSION" --src backport-iwlwifi' returned a non-zero code: 2

The backport-iwlwifi subfolder contains the core45 release of the iwlwifi driver retrieved as follows:

git clone --single-branch --branch release/core45 https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi.git

Per the driver’s instructions, it needs to be built in the following way:

make defconfig-iwlwifi-public
sed -i 's/CPTCFG_IWLMVM_VENDOR_CMDS=y/# CPTCFG_IWLMVM_VENDOR_CMDS is not set/' .config
make -j4
sudo make install

So I’m wondering if the kernel-module-build script needs to be updated to include this?

Not sure if this could be causing the issue but in doing some debugging of the build.sh script that is part of the kernel-module-build example, I pulled the list of images that it uses from https://files.balena-cloud.com/and I am not seeing any jetson-nano images, only jetson-tx2 images.

The header files are definitely there, you can find them at https://files.balena-cloud.com/images/jetson-nano/2.47.1%2Brev3.prod/kernel_modules_headers.tar.gz , how are you querying the files.balena-cloud.com ?

I think the problem you might run into wth building with the commands you listed at the end of your message is that it seems to need to enable a in kernel config CPTCFG_IWLMVM_VENDOR_CMDS=y which would need to be done at the yocto build level, or you would need to figure out how to build that module as well as a stand alone module. It is looking more and more like this might require custom yocto work to properly enable.

Are there other wifi modules with the WIFI 6 capability that you could evaluate and have less of a requirement on the kernel version?

I just used a browser to pull up the https://files.balena-cloud.com/ link, I assumed this would work since the script was just using CURL to get the data. I had no luck when searching the XML results for “nano” - but as you pointed out this might not mean anything.

Would it be possible to speak with someone on your dev team about this? We have explored various other modules but for a range of reasons this is the one we decided on, and I would like to understand whether it is even possible, and if so what exactly is entailed in getting it working with balena.

Let me know - thanks.

Can you confirm the direct link to the headers above worked? I agree that the root XML doesn’t contain a link to anything with nano in the name.

Yes, the direct link you sent works. But the build.sh script that is included in the kernel-module-build example, which is what I am using to build the custom module, seems to pull its list of modules from the root URL https://files.balena-cloud.com/ which does not have the nano modules.

HI there,

I wanted to let you know that a member of our customer success team will reach out to you directly to discuss this issue further.