Setting up a wifi connection via cli on a Linux device (Pi3), not on Manjaro

This is a non-Manjaro topic, but I hope that someone has knowledge that may help me with this, since Raspberry PIs are popular among Linux users.

I have a problem with weak wifi signal on my Pi3. Here is the topic:

So I bought an external wifi-usb-card-antenna SELTY BW5-000, which is confirmed by many users that it works with Linux.

However, the problem for me is, how do I make it work, or in other words, how do I make my Pi3 to use it instead of the built-in wifi-card?

Will the device switch to it automatically after it is plugged (plug and play)?
Should I do reboot?
Should I install some packages?
Should I edit some config?

The Kodi interface is very primitive and has very simple network settings and no way to choose the wifi-card. I can access my device over ssh, open terminal, and then what? Use network manager cli commands like nmcli or something else?

I would appreciate some help. Thank you

EDIT: I probably found that the system is seeing this device:


$ dmesg | grep "usb"
[...]
[2700358.256227] usb 1-1.3: new high-speed USB device number 12 using dwc_otg
[2700358.387140] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00
[2700358.387173] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2700358.387190] usb 1-1.3: Product: 802.11ac NIC
[2700358.387206] usb 1-1.3: Manufacturer: Realtek
[2700358.387222] usb 1-1.3: SerialNumber: 123456

I found this article about manually editing/adding network interfaces:

However, it depends on the file /etc/network/interfaces, which doesn’t exist on OSMC.

I have no idea how network is configured in OSMC and don’t know all possible solutions how it is done, so I have no clue where to look for current files. I have also too little knowledge to try to switch to alternate solutions.
I need some help with setting a network using a proper device.

EDIT 2:
I got some leads how to do it, but haven’t had time to do it yet.

I should install this driver:

Then add dtoverlay=disable-wifi to /boot/config.txt

Once I know more, I’ll write it down.

Even Manjaro does not officially support RPi3 - I think your question is generic as it applies to a Manjaro powered device as well.

Worth noting is when you double the frequency you get half the range (roughly) (still using the same Tx-power) so while making the data flow faster you trade this for shorter range. With the onboard wifi adapter other factors such as the casing chosen e.g. metal casing may have a negative impact on the signal quality.

The best result comes from a wifi card supported by the kernel - without building from external sources.

I am using the dtoverlay to disable wifi and bluetooth as my use case is running a service on ethernet - and I don’t want to expose the device to wireless connection attempts from drive-by hacking.

In config txt append below and reboot your device - now onboard wireless is disabled

[all]
dtoverlay=disable-wifi
dtoverlay=disable-bt

If your usb wifi-nic has kernel support - insert the wifi card and you should be able to connect.

With the onboard wireless disabled you can test if your usb dongle work without compiling from source.

I have a TL-WN722N (2.4) v1.1 (Qualcomm Atheros Communications AR9271) which works with RPi OS using above settings OOB.

1 Like

Thanks. I got elsewhere a similar answer about disabling wifi with dtoverlay. I hope, I’ll find time this weekend to experiment with it.

As to the range, only my Pi3 has a problem with it. The good range is the whole building (a this is a huge one) plus over 20 meters outside of it through few thick walls (0,5m thick) and somehow the usual devices are able to connect and I can comfortably work on them. But the Pi3 that is 4-5m and one wall away has serious troubles. 5G connection fails flat, while non 5G connects but has so slow speeds that the device is useless for streaming. Hence the external usb with antenna solution, which requires me to disable the in-build wifi. - Just to give you some background.