Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rob_J_
Beginner
2,193 Views

Installing a wifi driver under CentOS 7.3 - the full write-up

The following may seem complex, because it is. This is how you install a wifi driver under CentOS 7.3 and all the steps are necessary. In other versions the path to kernel packages in #2 below will need to be changed.

Network Manager installation is needed to confirm the installation worked correctly; even if you blindly follow these instructions things can and will go wrong. Note that for many of these steps superuser priveleges are needed. I didn't show that, it is assumed anyone who attempts this knows what they're doing. If you break your system you can always reinstall it. :)

Anything in angle brackets like this "<YOUR NAME>" will need to be supplied like this "FRED BLOGGS". Quotes may or may not be needed, see the examples below.

 

 

Installation instructions for MediaTek / Ralink MT7601U wifi dongle
___________________________________________________________________

0. Establish a wired network connection using ethernet cable, 4G via USB
   or an RJ45 to wifi bridge device
1. Install gcc with `yum groupinstall "Development Tools"'
2. From http://vault.centos.org/7.3.1611/os/x86_64/Packages/ download 
  - kernel-3.10.0-514.el7.x86_64.rpm
  - kernel-debug-devel-3.10.0-514.el7.x86_64.rpm
  - kernel-devel-3.10.0-514.el7.x86_64.rpm
  - kernel-headers-3.10.0-514.el7.x86_64.rpm
  and manually install them from local files with yum (not rpm -i !!!)
  Do NOT `yum install kernel kernel-headers kernel-devel' since it upgrades the kernel
3. yum install NetworkManager NetworkManager-wifi epel-release wireless-tools
4. Download and unpack mt7601usta.tar.bz2 (edited version, linked below)
  - https://www.dropbox.com/s/qbilud3o5ga4atb/mt7601usta.tar.bz2?dl=0 
5. cd mt7601usta/src && make install
6. Create the following files as shown below:
  - /etc/sysconfig/network-scripts/ifcfg-ra0
  - /etc/wpa_supplicant/wpa_supplicant.conf


[coinstash@landing ~]$ sudo cat /etc/sysconfig/network-scripts/ifcfg-ra0
SSID="<SSID>"
MODE=Managed
KEY_MGMT=WPA-PSK
TYPE=Wireless
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME="Ralink Wifi"
UUID=
ONBOOT=yes
HWADDR=<MT7601U MAC>
BSSID=<ROUTER MAC>
ESSID=<SSID>
MAC_ADDRESS_RANDOMIZATION=default
PROXY_METHOD=none
BROWSER_ONLY=no

[coinstash@landing ~]$ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
ssid="<SSID>"
key_mgmt=WPA-PSK
psk="<password>"
}

Once all the above is done you should be able to reboot and wifi will just work,
as expected. You can also do this to start the supplicant without rebooting:

sudo wpa_supplicant -B -ira0 -c/etc/wpa_supplicant/wpa_supplicant.conf
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device  <--- this shouldn't happen, but does

Should see "Ralink Wifi" in nmtui
Should see ra0 with ifconfig and iwconfig and dhcp should have assigned an IP address
Should see a new ethernet device in the Network Manager GUI panel.

 

0 Kudos
1 Reply
Smith__Eric
Beginner
2,193 Views

Can this guide work for Ubuntu systems as well? I get issues with IP address whenever I try to install wifi driver my way. 

Reply