Unable to connect to WiFi with new usb dongle network adapter

Hi.
I just bought Netis WF2160 usb dongle network adapter. I am unable to connect to any of the wifi hotspots I have. The adapter works fine for them on Windows 10 on the same machine.

Please help me troubleshooting the issue.

I had to switch from the previous usb dongle adapter I used because I started experiencing connection drops on both OS on my machine.

Does the network interface show up? Run inxi -naz and report back with the results.

I see that is based on the Realtek8811CU, looks like you need this driver:

Or How to Install RTL8811CU USB WiFi Dongle on Linux - Fastoe

# openSUSE Leap 15.1 (tested)
su
sudo apt-get update
sudo apt-get install git
yast2 -i kernel-source
git clone https://github.com/fastoe/RTL8811CU.git
cd RTL8811CU
make
sudo make install
sudo reboot

– maybe

su
zypper up
zypper in git 
git clone https://github.com/fastoe/RTL8811CU.git
cd RTL8811CU
make
sudo make install
sudo reboot

assuming you have installed needed packages:

zypper info -t pattern devel_kernel

Better is to wait for

inxi -naz

before compiling by yourself.

Because of the ID of the Chip.

Here is the output when my new dongle is plugged in

➜  ~ inxi -naz
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASRock driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: d000 bus-ID: 08:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Realtek RTL8188GU 802.11n WLAN Adapter (Driver CDROM Mode)
    driver: N/A type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0
    bus-ID: 1-10:5 chip-ID: 0bda:1a2b class-ID: 0806
  IF-ID-1: br-f71981312082 state: up speed: 10000 Mbps duplex: unknown
    mac: <filter>
  IF-ID-2: docker0 state: down mac: <filter>
  IF-ID-3: veth7a4aee7 state: up speed: 10000 Mbps duplex: full
    mac: <filter>
  IF-ID-4: vetha52eb09 state: up speed: 10000 Mbps duplex: full
    mac: <filter>
  IF-ID-5: vethe7681ae state: up speed: 10000 Mbps duplex: full
    mac: <filter>
  IF-ID-6: vethf2fb551 state: up speed: 10000 Mbps duplex: full
    mac: <filter>

Also I have another problem:
When I start my PC before grub loads I get the following error:

error: ../../grub-core/disk/efi/efidisk.c:615:failure reading sector exfefc from `hd0`

It disappears and proceeds to the usual grub boot selection window once I unplug my dongle.

I also should mention that the dongle also functions weirdly for my Windows 10 and the Android phone I use as the hotspot. It seems to only happen when I use this specific phone, because the dongle works fine with my friend’s Iphone hotspot. At the same time my phone works fine for other computers. I experience connection breaks or sometimes only certain websites function (e.g. Google but not any other website). Also at the time when the breaks start to happen the Internet in some apps on my phone becomes inaccessible also. P.S. as I am typing this I am successfully able to browse the Opensuse forum and post here, but any other website is inaccessible for me in other web browser tabs.

I started to experience almost identical symptoms a week ago on my OpenSuse, so I decided to switch my old usb wifi adpter dongle.

Switch them to Wlan Mode:

usb_modeswitch -KW -v 0bda -p 1a2b

It looks like it has changed since my last reboot:

  ➜  ~ inxi -naz
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASRock driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: d000 bus-ID: 08:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Realtek 802.11ac NIC driver: rtw_8821cu type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-10:4 chip-ID: 0bda:c811
    class-ID: 0000 serial: <filter>

I used the new parameters, but it looks like the device is recognized properly now. Still no success accessing the Internet:

 ➜  ~ sudo usb_modeswitch -KW -v 0bda -p c811
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.6.1 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x0bda
DefaultProduct= 0xc811

StandardEject=1

Look for default devices ...
  found USB ID 1d6b:0003
  found USB ID 1c4f:0002
  found USB ID 1d6b:0002
  found USB ID 1d6b:0003
  found USB ID 046d:c077
  found USB ID 0bda:c811
   vendor ID matched
   product ID matched
  found USB ID 045e:074a
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 004 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 255
Error: can't use storage command in MessageContent with interface 0; interface class is 255, expected 8. Abort

Is this the same as before, now only in Wlan Mode?

If yes, use NetworkManager to configure.

This is not my command:

See the last ID 1a2b

It looks like it.
Now I try to use Network Manager to no avail


➜  ~ nmcli
wlan1: disconnected
        "Realtek Wi-Fi"
        wifi (rtw_8821cu), 7A:BD:A8:5A:74:EA, hw, mtu 1500
➜  ~ nmcli device wifi list
IN-USE  BSSID              SSID            MODE   CHAN  RATE        SIGNAL  BARS  SECURITY
        0E:AA:BD:B1:AF:94  Redmi        Infra  8     117 Mbit/s  87      ▂▄▆█  WPA2


➜  ~ nmcli device wifi connect Redmi password MyPassword
Error: Connection activation failed: The Wi-Fi network could not be found.

In essence, it scans the network and sees the available wifi connections, including mine. However, it doesn’t connect to it.

I think it has already changed to WLAN mode. I tried your command, just in case:

➜  ~ sudo usb_modeswitch -KW -v 0bda -p 1a2b
[sudo] password for root:
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.6.1 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x0bda
DefaultProduct= 0x1a2b

StandardEject=1

Look for default devices ...
  found USB ID 1d6b:0003
  found USB ID 1c4f:0002
  found USB ID 1d6b:0002
  found USB ID 1d6b:0003
  found USB ID 046d:c077
  found USB ID 0bda:c811
   vendor ID matched
  found USB ID 045e:074a
  found USB ID 1d6b:0002
 No devices in default mode found. Nothing to do. Bye!

Does this produce the same error?
nmcli device wifi connect 0E:AA:BD:B1:AF:94 password "MyPassword"

Yes, it’s the same

Yeah, it’s the same

Does anyone think the problem may be related specifically to my Xiaomi Redmi Note phone?

Is it viable for you to test by trying to connect to another Wi-Fi network eg public library or cafe etc?

You can watch the association process in a terminal using

sudo journalctl -fu NetworkManager

I wasn’t able to connect to my friend’s Iphone hotspot with this dongle. It is difficult to test it elsewhere as it’s a desktop PC.

You are using Leap 15.6.
The Module (driver) you are using is very new to Kernel 6.4 in Leap 15.6.

So you could do:
Use a new kernel from kernel:backports:stable
or
try the rtl8821cu Module from here:
https://download.opensuse.org/repositories/home:/Sauerland:/hardware/openSUSE_Leap_15.6/
When you use this Module, you have to blacklist rtw88_usb and blacklist rtw88_8821cu

echo 'blacklist rtw88_usb' >> /etc/modprobe.d/rtw88.conf
echo 'blacklist rtw88_8821cu' >> /etc/modprobe.d/rtw88.conf