Unsupported USB wifi adapter

Thank you @zvin. I’m fairly new to using BalenaOS and have all I need on the RaspberryPi, however the RTL8812AU driver clearly isn’t installed. Are you able to explain in a little more depth please the steps you took to update the driver. Using the instructions above, it seems to fail to compile with the below message. I would appreciate any assistance you are willing to offer. Thank you.

Has anyone experience with the above and able to assist please :slight_smile: ?

Hi, it looks like you have dropped the executable permission from build.sh somewhere on the way. One way to fix it would be to edit Dockerfile.template and add a new line containing RUN chmod a+x ./build.sh between the ENV VERSION... and RUN BALENA_MACHINE_...lines. Could you try that and see whether that helps?

Hi, thank you for your advice @mtoman, I managed to get everything to compile.

Using lsusb, I can see the Alfa card connected, however it does not seem to be seeing the driver as the blue LED is not lit on the adapter. Any additional ideas please as the compile appeared to go as it should without errors.

Hi, glad to hear you are making progress.

Can you check the module is actually loaded? You can do this by running lsmod | grep 8812au. It should output at least one line, if the output is empty, the module is not loaded. You can eventually load it using insmod 8812au.ko while in the directory with the 8812au.ko file.

You can also run dmesg looking for errors.

Thank you @mtoman, it would appear the module was not loaded. I have stripped back my Dockerfile.template file now to try and get just the driver installed before I add anymore code.

FROM balenalib/%%BALENA_MACHINE_NAME%%-debian

RUN apt-get update && apt-get install -y curl wget build-essential libelf-dev awscli bc flex libssl-dev python bison
COPY . /usr/src/app
WORKDIR /usr/src/app

ENV VERSION '2.77.0+rev1'
RUN chmod a+x ./build.sh
RUN chmod a+x ./workarounds.sh
RUN chmod a+x ./run.sh
RUN BALENA_MACHINE_NAME=%%BALENA_MACHINE_NAME%% ./build.sh build --device %%BALENA_MACHINE_NAME%% --os-version "$VERSION" --src rtl8812au

CMD ./run.sh

I can only assume something hasn’t compiled right as I cannot find the 8812au.ko, however the rtl8812au directory is there. Any suggestions to what I may be missing please?

Really appreciate you help and guidance as getting this driver working is the final piece to my puzzle on what has been a bit of a steep learning curve. Thanks again.


Great that you made progress on this. I assume when you say 8812au.ko not found its with the command: lsmod | grep 8812au.

I would suggest checking the output of dmesg or add the output here - to debug further as to what might be the issue.

Thank you for your reply @nitish. That is correct, the module is not found when using the lsmod command and also doing a physical search for the file.

I have attached the log from dmesg as requested. Thanks again for all your help, feel so close :slight_smile:

log.txt (127.0 KB)

Hi @Tissy,

Considering you are building for a raspberry pi, Can you confirm if you changed this line to say CONFIG_PLATFORM_ARM_RPI = y ?

If not, that’s probably the issue and the module is not being compiled properly


Hi @rahul-thakoor, thank you for your reply.

You are correct, CONFIG_PLATFORM_ARM_RPI = y was not set in the MakeFile, so thank you for suggesting that change.

Having made the change and repushed the code, although it is compiling still without apparent errors, using lsmod command, I still cannot see the module and the blue LED on the alfa card isn’t lit. I feel so close, any other help or suggestion would be very much appreciated :slight_smile:

Anyone able to offer further advice please, feel so close to getting this working :slight_smile: :point_up:

Hey @Tissy

I think it would be much easier if you were able to share the code you are using to build the kernel module in a public repository.

Are you able to do that?


Thank you @rahul-thakoor, that’s a very good idea !

The repository can be found here Tissy/kernel-module-build (github.com)

To confirm, the module and code appears to compile fine using Balena CLI, however the LED on the ALFA card should light blue when it is recognised and running, but it doesn’t. Likewise if I run the lsmod command, the driver appears not to be loaded. So I’m guessing there is still a driver loading issue.

Many thanks for any help you are able offer, genuinely appreciated as it’s driving me nuts and I’d love to get this working !

Hi Tissy,

can you please check access to the repo? is it private? I get a 404 when trying to load it

My apologies @rahul-thakoor, I didn’t realise it was private. This has now been changed to public.

Many thanks :slight_smile:

Hey Tissy

the driver seems to have a very different way to be compiled. As a quick test i would suggest running the commands that are recommended in the driver setup after running the build script here kernel-module-build/Dockerfile.template at main · Tissy/kernel-module-build · GitHub

Perhaps add cd 8812au- && RUN ./install-driver.sh NoPrompt && cd -

I have not tested this. you might need to install other dependencies the script requires


Hey Steven, I just wanted to ping you to see if you were able to make this work?

Hi, unfortunately not yet :(. I am still trying to resolve the issue having followed all the above advise. Is there anything you can suggest to help please?

Hi Steven, the only other thing I can think of is, did you try appending Rahul’s suggestion into your Dockerfile? Looking at Step 9 here, kernel-module-build/8812au- at main · Tissy/kernel-module-build · GitHub, it seems that additional steps beyond just running the build are needed. So, perhaps trying to append that into the Dockerfile, or just duplicating that script’s functionality, is needed.

Maybe even try a quick test of just opening up a terminal and trying to run this command:

(Alter your paths accordingly, of course)

In the meantime, I have pinged our OS team to ask if it is possible to build the 8812au driver into our next OS release. This depends on the size of the module, as there is only limited space in the OS partitions, so they’ll have to take a look to see if it can be done.

Unfortunately, no, there is not enough space in the root partition for the rtl8812au module:

Error response from daemon: failed to copy files: copy file range failed: no space left on device

So, that method will not work until we have Host Application Extensions available, which will allow us to add-on additional capability / functionality to the HostOS. In the meantime, you’ll have to continue with the kernel module build in a container, hopefully you can get that properly working and proceed with your project. :slight_smile: