Linux dongle usb wifi

SCHILLERNET

I confess, I rarely use Linux and when I do it’s a challenge. Linux is easy when you use it day in and out but on the one off occasions it is certainly challenging to pick up. It has its quirks and it takes a little time to get to grips with them.

I’ve recently built a HP MicroServer to use as NAS. Rather than use an off the shelf NAS distro I went for something different which would give me some flexibility, Ansible-NAS. I’m using Ubuntu server because the G7 MicroServer doesn’t have a lot of grunt and didn’t want to waste clocks on a GUI. It’s going to be on most of the time so less is best as is so often the case.

I intend to cover the Ansible-NAS install later but for now I wanted to document my experience of connecting a USB Wi-Fi adapter to Ubuntu if the driver is not natively supported. Some of this is simple, obvious almost but if you don’t know what to type or what to look for it’s going to take some digging.

Hopefully this little journey will introduce you to some useful tools and how to configure a USB adapter.

Step 1: Don’t disconnect

You’re may have to download some drivers and probably install some software, if you already have an internet connection keep it.

You’ll need the wireless tools to use iwconfig.

$ sudo apt get wireless-tools

Step 2: Identify your Hardware

These steps are covered quite well here. I’ll summarise and focus on a USB device.

The device should be shown in lsusb even if there isn’t a driver:

$ lsusb Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 0bda:f179 Realtek Semiconductor Corp.

That’s a good start, this suggests the USB stick is physically detected. Make a not of the “ID” you might need it later.

Step 3: Is there a driver?

There are a few ways that this can be identified, Its quite well documented here.

The first is lshw -C network. You might get a lot of information back depending on your setup.

You can also use the ip link show command to see if the adapter is listed there.

I didn’t have anything listed from lshw but if you get something it might look like this:

*-network:1 description: Wireless interface physical id: 2 bus info: usb@1:2 logical name: wlx00e0262f73ec serial: 00:e0:26:00:00:00 capabilities: ethernet physical wireless configuration: broadcast=yes driver=rtl8188fu multicast=yes wireless=IEEE 802.11bgn

Step 4: Find a driver

The first option is am update, see if anything gets pulled down:

$ sudo apt update

(there are almost always some updates…)

$ sudo apt upgrade

Go back to step 3, have another look. If no joy check the supported hardware sheet. You’ll need the ID from earlier to cross-reference. If your hardware is listed then you might have other issues and at this point I’d suggest you go back to the Ubuntu documentation linked to earlier to see what might be preventing the driver from loading.

Читайте также:  Astra linux repository ubuntu

If your hardware isn’t supported then google the hardware ID from earlier and some relevant keywords.

What you are likely to find are results suggesting you get something from GitHub and install that. Read a few forum posts before you decide to download something. In my case some drivers had better install notes than others and one of the drivers was cited to have better support (dkms?) than another. I checked out the README and decided it was well put together. For my USB adapter I went for https://github.com/kelebek333/rtl8188fu.

The installation instructions are well documented and different for each case. Follow the guidance you find.

Post install re-attempt step 3 and see what you get. I advise a reboot if you don’t see the adapter.

If like me the adapter is not showing up there were a few recommendations, try these…

$ sudo depmod -a is an updated dependency list is generated by depmod -a to make sure that the module we’re installing is aware of all existing modules and dependencies.
$ sudo update-initramfs -u Read about this here.

If you are still not seeing the adapter in lshw you might have to go back to the drawing board.

Step 5: Configuring networking

A learning curve for me was learning to use netplan. We need the interface name. There are many ways to find this:

Lets use the output from iwconfig because its concise. The interface name might look something like this “wlx00e0262f73ec”.

We need to edit 01-netcfg.yaml

$ sudo nano /etc/netplan/01-netcfg.yaml

You want something like this, but there are more examples here. Remember, spacing is super important, it must be consistent and no tabs!

network: version: 2 renderer: networkd wifis: wlx00e0262f73ec: dhcp4: yes dhcp6: yes access-points: "ESSID": password: "y0urpa55phras3"

Save with Ctrl+O , exit with Ctrl+X.

After that run $ sudo netplan apply –debug

Use debug because its good to know what’s expected and what isn’t. My connection works but I do have the following warning:

The unit file, source configuration file or drop-ins of netplan-wpa-wlx00e0262f73ec.service changed on disk. Run 'systemctl daemon-reload' to reload units.

It’s a warning so not the end of the world, if you see other issues it might be work investigating them before continuing.

Читайте также:  Rtx 3070 linux drivers

Run this to prompt getting a DHCP lease (if using DHCP) $ sudo dhclient wlx00e0262f73ec.

At this point you can check to see if you have an IP address $ ip address show dev wlx00e0262f73ec If you have, ALL GOOD.

Troubleshooting

I was not seeing what I expected so I did some further troubleshooting. The interface didn’t appear to be coming up.

This command can bring the interface up $ sudo ip link set wlx00e0262f73ec up

Then there were some log files to check $ dmesg | grep -e wlp -e network, which didn’t offer anything.
$ cat /var/log/syslog | grep -i network did and I could see these messages which could be relevant:

netplan-wpa@wlx00e0262f73ec.service: Failed to execute command: No such file or directory netplan-wpa@wlx00e0262f73ec.service: Failed at step EXEC spawning /sbin/wpa_supplicant: No such file or directory

wpasupplicant didn’t appear to be installed so $ sudo apt install wpasupplicant.

The errors had cleared but I still wasn’t connecting to my network.

At this point I started using $ networkctl and could see that everything looked ok.

IDX LINK TYPE OPERATIONAL SETUP 4 wlx00e0262f73ec wlan no-carrier configuring

I used $ sudo iwlist wlx00e0262f73ec scan to give me a list of all the networks the adapter could see. It could see networks just fine. All the 2.4GHz networks… that’s right, I’d specified a 5GHz network in the netplan config and this is a 2.4GHz adapter!

After correcting that mishap everything was ALL GOOD.

Other issues

Some people has reported that the driver was not loading after reboots. This was suggested to load the driver at boot (rtl8188fu was the driver name):

$ echo rtl8188fu | sudo tee -a /etc/modules (adds to the list of kernel modules that should be loaded at boot time.

Источник

Top 5 Best USB WiFi For Linux [Top 5 Reviewed]

Best USB WiFi For Linux

The Linux operating system is everywhere; the Linux kernel has revolutionized modern-day computing from Android smart devices, web servers, and even supercomputers.

It’s not just Android smartphones and web servers running Linux, though; over 2.4% of all desktop computers worldwide are running some version of the Linux operating system as of August 2021. Mac OS X and Windows 10 are not the only viable operating systems on the market anymore.

Unfortunately, despite the relatively large market share of Linux OS users, very few hardware manufacturers support Linux. That’s why your wireless connection on Linux, mainly if you use an old laptop or computer, may suffer due to a lack of compatible drivers.

Fortunately, there is a way around this limitation: purchasing a WiFi adapter for Linux.

So keep on reading to find the best Linux-compatible USB wireless adapter, no matter which version of Linux OS you use!

Читайте также:  Настройка закрытия крышки ноутбука linux

Top Five USB Wi-Fi Adapter Devices for Linux

We’ll start by listing the best Linux-compatible USB wireless adapters you can buy in 2021 across different categories. The wireless adapters mentioned here support a wide variety of Linux distros and flavors, including Kali Linux, Linux Mint, Debian, Red Hat Linux, and Raspberry Pi, to name a few.

Some of these devices may not support RPM-based Linux distros. Rest assured, no matter what Linux-based operating systems you use, you should be able to find a device that works on any laptop or computer running Linux.

Best 2.4 GHz Linux Wi-Fi Adapter: Cudy WU1300S AC 1300Mbps Wireless Adapter

Cudy AC1300 WiFi USB 3.0 Adapter for PC, USB WiFi Dongle.

First up, we have the best 2.4 GHz Linux Wi-Fi adapter: the Cudy WU1300S AC 1300Mbps Wireless Adapter.

Why is it the best Linux Wi-Fi adapter at this band, you ask? Because of the speed, the adapter offers 400 MBps of speed at 2.4 GHz, whereas other adapters usually provide a maximum of 300.

Additionally, the Cudy WU1300S also comes bundled with a CD ROM for driver installation, a feature that many Wi-Fi adapters lack. If you prefer online driver installation, you can also download the necessary drivers from the Cudy website.

The Soft AP mode is a special mode that this device supports. This mode can create a Wi-Fi hotspot out of a wired internet connection on a PC or laptop. Essentially, the Soft AP mode is a convenient mode for creating a Wi-Fi hotspot on the go.

Another mode this device supports is Ad hoc mode and infrastructure mode. By selecting the mode users want to use, they can choose the Wi-Fi options they want.

The Cudy WU1300S also supports multiple operating systems. In addition to popular Linux distros like Ubuntu and Debian, it should also work with Mac OS and Windows editions. This includes Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1, and Windows 10, to name a few.

At the same time, the adapter does not support Mac OS Big Sur. However, this isn’t a disadvantage if you plan on using it for Linux systems.

However, a disadvantage is the lack of high-gain antennas on the device for long-range use. The device may also not work for all Linux distros.

Rest assured, the Cudy WU1300S is an excellent option for a Wi-Fi adapter if you prefer staying in the 2.4 GHz Wi-Fi range.

  • Dual-band wireless network support
  • 1300 MBps max data transfer rate
  • Supports multiple OS, including Ubuntu Linux, Windows 10, and Mac OS X
  • Up to 400 MBps speed on 2.4GHz
  • Soft AP mode
  • Infrastructure and Ad hoc mode
  • CD-ROM bundled for driver installation
  • It May does not work for all Linux distros
  • No antenna
  • No support for Mac OS Big Sur

Источник

Оцените статью
Adblock
detector