Score:0

Errors in installing the WIFI driver

tr flag

I have the Tenda W311MI Wireless Nano USB Adapter. On Windows it automatically installs and works. On Ubuntu there's no wifi networks available. I downloaded the drivers from the Tenda website https://down.tendacn.com/uploadfile/201401/driver/RT5572_LinuxSTA_2.6.1.3_20121022.rar. I don't know C nor am I skilled at the CLI. I found this guide to install the driver https://titanwolf.org/Network/Articles/Article?AID=247af549-250e-4ba1-8098-e3a98133fef8. First I got one error: the solution was to rename the parent folders to simple names. Second I got another error: the solution was to replace all "SUBDIRS=" to "M=". I did the steps in the guide and at last I am at this error on running sudo make on the root of the driver folder:

make -C tools
make[1]: Entering directory '/home/hammad/Downloads/v3/dpo/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/hammad/Downloads/v3/dpo/tools'
/home/hammad/Downloads/v3/dpo/tools/bin2h
cp -f os/linux/Makefile.6 /home/hammad/Downloads/v3/dpo/os/linux/Makefile
make -C /lib/modules/5.11.0-44-generic/build M=/home/hammad/Downloads/v3/dpo/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-44-generic'
  CC [M]  /home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.o
/home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.c: In function ‘PeerBeacon’:
/home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.c:2180:12: error: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2180 |            ie_list,
      |            ^~~~~~~
      |            |
      |            BCN_IE_LIST * {aka struct _bcn_ie_list *}
In file included from /home/hammad/Downloads/v3/dpo/include/rt_config.h:59,
                 from /home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.c:28:
/home/hammad/Downloads/v3/dpo/include/rtmp.h:7900:15: note: expected ‘IE_LISTS *’ {aka ‘struct _IE_lists *’} but argument is of type ‘BCN_IE_LIST *’ {aka ‘struct _bcn_ie_list *’}
 7900 |  IN IE_LISTS *ie_list,
      |     ~~~~~~~~~~^~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.o] Error 1
make[1]: *** [Makefile:1849: /home/hammad/Downloads/v3/dpo/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-44-generic'
make: *** [Makefile:395: LINUX] Error 2

Someone answered another post with a similar error with the solution to install gcc-4.8. I couldn't install it. I downloaded the zipped file. Extracted it. Followed a guide to build it but the final step resulted in errors.

I also tried applying this solution: installing ndiswrapper and ndisgtk but couldn't follow the last few steps.

Thank you for reading.

EDIT

$ lsusb
Bus 002 Device 010: ID 0bb4:0ffe HTC (High Tech Computer Corp.) Desire HD (modem mode)
Bus 002 Device 008: ID 0bda:b711 Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter (After Modeswitch)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
chili555 avatar
cn flag
The driver you downloaded is far too old to compile on any modern kernel. Let's start from the beginning. Please edit your question to show the result of the terminal command: `lsusb` Welcome to Ask Ubuntu.
Hammad Ahmed avatar
tr flag
@chili555 Bus 002 Device 008: ID 0bda:b711 Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter (After Modeswitch)
Hammad Ahmed avatar
tr flag
@someone It is the WIFI dongle.
Hammad Ahmed avatar
tr flag
@someone Ubuntu 21.04
Score:1
my flag

To install the correct drivers, run the following commands in a terminal (make sure to have an active internet connection while running the commands):

sudo apt-get install build-essential git dkms linux-headers-$(uname -r)
git clone https://github.com/McMCCRU/rtl8188gu.git
cd rtl8188gu
make
sudo make install
sudo apt install --reinstall linux-firmware 
sudo reboot

That's it!

Take a look at https://github.com/McMCCRU/rtl8188gu

Someone avatar
my flag
@HammadAhmed Try running: `sudo modprobe rtl8188gu`
Hammad Ahmed avatar
tr flag
The driver installed successfully. It rebooted but there's no WIFI networks icon on the title bar nor anyting in the WIFI section of Settings. I remember there was a modprobe-like command into the rt folder in other answers.
Someone avatar
my flag
@HammadAhmed Is the wifi working ? If not then you may need to do some more troubleshooting.
Someone avatar
my flag
@HammadAhmed Try running `eject /dev/cdrom0`
Hammad Ahmed avatar
tr flag
WIFI is not wroking. The above command outputs `eject: /dev/cdrom0: not found mountpoint or device with the given name`
Hammad Ahmed avatar
tr flag
Doesn't work with ./dev/cdrom0 or just cdrom
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.