Featured image of post Installing Wireless Network Card Drivers in Linux (Example: Intel 3165NGW on CentOS)

Installing Wireless Network Card Drivers in Linux (Example: Intel 3165NGW on CentOS)

This method is applicable not only to CentOS but also to Ubuntu and Debian, as the drivers are universal. To install on CentOS...

This guide applies not only to CentOS but also to other distributions like Ubuntu and Debian, as the drivers are generally universal.

To install the Intel AC 3165NGW wireless network card driver on a CentOS system, you can follow these steps:

1. Update the System

First, make sure your system is up-to-date to avoid potential dependency issues.

1
sudo yum update

2. Install Required Development Tools and Dependencies

You need to install the development tools and kernel header files necessary for compiling the driver:

1
2
sudo yum groupinstall "Development Tools"
sudo yum install kernel-devel kernel-headers dkms

3. Check if the Wireless Network Card is Recognized by the System

Use the lspci or lsusb command to check if your wireless network card is recognized by the system, and take note of the specific model information.

1
lspci -nn | grep Network

Or, if it’s a USB wireless card:

1
lsusb

Installing Wireless Network Card Drivers in Linux (Example: Intel 3165NGW on CentOS)

4. Obtain the Driver

For the Intel AC 3165, you need to download the appropriate Linux driver from Intel’s official website or other reliable sources. Typically, Intel provides the iwlwifi driver, which supports multiple wireless card models, including the AC 3165.

Visit the Intel Wireless Downloads page, find the latest driver corresponding to your card, and download it. The link is: https://www.intel.com/content/www/us/en/support/articles/000005511/wireless

5. Install the Driver

After downloading the driver, extract it and follow the instructions in the provided README file for installation. Note that sometimes the downloaded driver is firmware (ending with .ucode), while other times it’s the source code that needs to be compiled.

Case 1. Downloaded as .ucode Firmware

If you download and extract the Intel wireless card driver file and find only .ucode files (e.g., iwlwifi-7265-14.ucode), this means you’ve obtained firmware files rather than source code. These .ucode files are used as binary firmware images for the kernel’s iwlwifi driver and do not need to be compiled, but they must be placed in the correct firmware directory in the system.

Here are the steps to install the firmware files on your system:

  1. Determine Firmware Storage Location: Usually, Linux systems load wireless card firmware from the /lib/firmware directory. You need to place the .ucode files in this directory.

  2. Copy the Firmware Files: Using root privileges or the sudo command, copy the extracted .ucode files to the correct directory:

    1
    
    sudo cp iwlwifi-7265-14.ucode /lib/firmware/
    

    If your system has specific versioned directories (e.g., /lib/firmware/iwlwifi), ensure that the files are placed in the appropriate subdirectory.

  3. Update Firmware Cache: In some distributions, you may need to update the firmware cache (if applicable). However, in most modern Linux distributions, this step is usually not necessary.

  4. Reboot the System: To apply the changes, reboot your system. After the restart, the kernel should automatically detect and use the newly copied firmware files.

  5. Verify the Installation: After rebooting, you can check the status of the wireless network card using commands like ip link or iwconfig to confirm that the wireless interface (e.g., wlan0) exists and has no error messages.

If the wireless still does not work correctly, check the system logs (e.g., using the dmesg command) for any possible error messages, which might help diagnose the issue. Additionally, ensure that your kernel supports the iwlwifi driver and that the module has been properly loaded. If the driver module is missing, you may need to install it through other means, such as using the distribution’s package manager (like yum or dnf on CentOS/RHEL) to install iwlwifi-dvm or the relevant kernel module package.

Case 2. Downloaded as Driver Source Code

If you have the driver source code, the typical process involves the following steps:

1
2
3
4
5
6
# Assuming the driver has been downloaded to ~/Downloads/iwlwifi-XXX.tar.gz
cd ~/Downloads
tar -xvf iwlwifi-XXX.tar.gz
cd iwlwifi-XXX
make
sudo make install

6. Load the Driver Module

After installing the driver, you need to load the driver module. The system will usually load it automatically upon reboot, but you can load it manually as well:

1
sudo modprobe iwlwifi

Enable Wireless Networking

First, ensure that the wireless network is enabled. You can enable the wireless interface (assuming the wireless card name is wlan0) with the following command:

1
sudo ifconfig wlan0 up

Or, for newer systems, you might need to use the ip command:

1
sudo ip link set wlan0 up

Configure Wireless Network

Manual Configuration:

  1. Enable the Wireless Interface:
1
sudo ip link set wlpXsY up

Replace wlpXsY with your actual wireless card name.

  1. Scan for Wireless Networks:
1
sudo iwlist wlpXsY scan
  1. Manually Configure the Connection:

If not using NetworkManager, you can manually create a configuration file (e.g., /etc/sysconfig/network-scripts/ifcfg-wlpXsY):

1
2
3
4
5
6
DEVICE=wlpXsY
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Wireless
ESSID=YourSSID
MODE=Managed

After saving, activate the interface:

1
sudo ifup wlpXsY

Using NetworkManager for Configuration:

It is recommended to use NetworkManager as it provides a more convenient graphical interface and the command-line tool nmcli for managing networks:

1
nmcli device wifi connect YourSSID password YourPassword

Step 4: Verify Network Connection

1
ping google.com

If you have followed these steps correctly, you should have successfully installed the Intel 3165NGW wireless network card driver and configured the wireless network connection. If any issues arise, checking system logs (journalctl -u NetworkManager, dmesg) may provide useful debugging information.

Precautions

  • Before executing the above steps, make sure you have sufficient permissions and some familiarity with system operations.
  • Specific versions of CentOS might require specific versions of drivers, so be sure to confirm that the driver is compatible with your system.
  • If you encounter problems, checking system logs (like dmesg output) may provide error messages to assist with diagnosis.
  • Consider using DKMS (Dynamic Kernel Module Support) to manage driver modules, which allows for automatic rebuilding on kernel upgrades, maintaining driver compatibility.