How can I configure tp-link wifi adapter

Hi there!

I’m using Balenacloud and balenadash, its working perfectly with ethernet but I also set it up to use Wi-FI, the thing is its not working at all. I also have a usb tp-link wifi adapter plugged in but it doesnt seem to work? How can I enable it or make it atleast work so wifi can be used on balenaOS? is it through SSH? Thanks!

Hi there, I am assuming you mean the device cannot connect to the network. What device are you using? I’ll assume it’s an RPI, but it should work pretty much the same for other devices. You will need to set the SSID and password for the wifi network you want the device to connect to. You can either set those when you download the OS image from the dashboard, or you can plug the SD card in your computer and add a resin-connections file to it. See the docs here for more details.

@sradevski Sorry for the late reply!

thank you for the information, I’ve already done that during the OS image setup and I even confirmed the connections file in the SD card. The SSID and password are correct, I think it’s the Wifi adapter that might need a driver or something? because when I was using Raspbian OS it also didn’t work.

Hi

Can you s hare a link to the WiFi adapter that you are using? I understand it’s a TP-Link one, but the exact make would help us debug this issue.

Hi @anujdeshpande ! Yes of course, thank you so much!

Here’s the one I got https://www.amazon.de/gp/product/B07M69276N/ref=ppx_yo_dt_b_asin_title_o00_s01?ie=UTF8&psc=1

Could it be an incompatibility issue?

It seems I need to install a specific driver since linux doesnt pick up that adapter, this https://github.com/abperiasamy/rtl8812AU_8821AU_linux

How can I push it to the machine? the same way as balenadash?

Hi @samsammor,

By the looks of it, you’ll need to build the kernel module for the adapter, as you’ve noted. You should be able to do this by adding a new application service container and building the Wifi adapters kernel module using out of tree kernel modules. There’s an example for doing this here: https://github.com/balenalabs/kernel-module-build . You’ll then be able to insmod the kernel module, and it should include the Wifi adapter as the list of NICs available.

As you’re using a multicontainer application (balena-dash), you’ll need to set the label for including /lib/modules as well, here: https://www.balena.io/docs/learn/develop/multicontainer/#labels in the new service section in docker-compose.yml.

Hopefully this should be enough information to get you into a working position!

Best regards,

Heds

Hi @samsammor, I happen to await an order for a dongle with the same chipset (+ others) later this week or the next one.

There are two approaches with out-of-tree WiFi drivers. First is that we may include it in the OS itself if it is a properly working driver. The downside is that if the driver is not maintained regularly when we upgrade the kernel, it may break.

The second is using our kernel module build template that @hedss provided as a solution. There are more downsides to this including the one I just described. When you upgrade the OS, and it contains a new kernel you will need to recompile the driver. Also managing the driver from a container is more risky and may cause the device to loose connectivity, e.g. in a case where the container crashes or cannot start due to application error or a Docker corruption.

I am going to check what is the situation with this chipset once my order arrives. That said my advice would be to try out alternatives. We are in the process of compiling a list with known working dongles (the order I talked about is related to this), and I do not have particular recommendations now.

One website that generally provides WiFi modules with Linux compatibility is https://techship.com. You may also check https://www.alfa.com.tw/ and their Kali WiFi USB section.

If you have a Jetson Nano device you may also consider using a mPCIe WiFi card, since there are much more available options than USB-A in terms of chipset variety.

Forgot to mention that the only current recommendation for a dongle we currently have is for Ralink RT5572 chipset: https://github.com/balena-os/meta-balena#recommended-wifi-usb-dongle. We will expand that list in the near future.

Hi there Balena Team, Has there been any further work on supported Wifi Dongles. None of the mentioned ones are available an its becoming hard to find any working ( 2 new ones purchased well supported in Raspbian, but not Balena OS )

Hi Martin

No new updates about this yet