-1

I bought this generic wifi adapter which has MT7601U wifi chip inside it, it doesn’t work on my Ubuntu server 22.04 OS

But the adapter works fine out of the box on my twisterOS installation

Am i missing something? I found a post online and it says the adapter is supposed to work just fine from 16.04 and onwards since the drivers are included in kernel 4.2+

Does Ubuntu server not include all the wifi adapters drivers in it, or is it removed?

(all related images in the link below)

https://i.stack.imgur.com/VAMy6.jpg

I also tried following this guide Ralink MT7601U (148f:7601) Wi-Fi adapter installation

but when i run the make command from:

sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/art567/mt7601usta.git
cd mt7601usta/src 
make
sudo make install
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/
sudo modprobe mt7601Usta

i get this error:

/bin/sh: 1: flex: not found
make[3]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make[2]: *** [Makefile:622: syncconfig] Error 2
make[1]: *** [Makefile:735: include/config/auto.conf.cmd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-1011-raspi'
make: *** [Makefile:419: LINUX] Error 2

is it because i am using an arm device (raspberry pi) than an x86 one? also by running uname -srm i get:

Linux 5.15.0-1011-raspi aarch64

stormfire
  • 13
  • 3
  • 8
  • 2
    Did you read the README? It says, in part: "Note: Kernel 4.2 has been released which contains a driver for mt7601u, this repository is now deprecated." That means that a driver in your 5.15 system should be used, not some rusty antique. What is the exact response to the terminal command: sudo modprobe mt7601u Welcome to Ask Ubuntu. – chili555 Jul 09 '22 at 20:03
  • Yes i did, but i ignored it since i thought that ubuntu server didn't had drivers for all wireless adapter since it's supposed to be a smaller installation compared to ubuntu desktop, or that the drivers got removed in 5.15 sinxe they already got removed once before cuz of poor coding in them, so i thought if i install it and then update it to latest version, sorry it's my fault, and here is the response : modprobe: FATAL: Module mt7601u not found in directory /lib/modules/5.15.0-1011-raspi – stormfire Jul 10 '22 at 05:22

1 Answers1

3

I suspect that you are missing the package linux-modules-extra. Check:

sudo dpkg -s linux-modules-extra-$(uname -r) | grep Status

When you find it is missing, download this package on some other computer and transfer it to the Pi with a USB key or similar: https://ubuntu.pkgs.org/22.04/ubuntu-updates-main-arm64/linux-modules-extra-5.15.0-1011-raspi_5.15.0-1011.13_arm64.deb.html

Install it:

sudo dpkg -i linux*.deb

Reboot.

Please note that server edition does not include the package wpasupplicant that is required for wireless. Be certain to install wpasupplicant. Finally, configure netplan: Fail to up interface wlan0 in ubuntu server 22.04 Raspberry Pi

chili555
  • 60,188
  • THANKS A LOT DUDE! After installing this package, I can see my wireless adapter in iwconifig: https://imgur.com/a/eiWNZJZ. Another question, do I need wpa supplicant to manage my wireless adapter? The built in wifi chip in my raspberry pi 4 is being managed perfectly fine by the netplan(by netplan , I meant “50-cloud-init.yaml”), also how do I switch between two wifi adapters? (Currently the wifi chip in my raspberry pi 4 is being used as main wifi adapter, and the MT7601U adapter is idle/off) – stormfire Jul 11 '22 at 22:54
  • 1
    Perhaps wpasupplicant is already installed; however, if it is woring perfectly, then there is no need to do anything else. As for switching between two interfaces, please ask a new question and also explain why you need to switch. – chili555 Jul 12 '22 at 00:04