How to Enable Intel PCI WiFi Adapter When Access is Denied


PCI WiFi card provided with mobo with radio socket connection and external antenna. Intel Wireless 3165. Ubuntu Linux Server (Bionic, I believe). Any other details I need to provide?

The commands and output:

lspci -v | less

Network controller: Intel Corporation Wireless 3165 (rev 81)
Subsystem: Intel Corporation Dual Band Wireless AC 3165
Memory at ef000000 (64-bit, non-prefetchable) [size=8K]
Capabilities: <access denied>
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi

sudo lshw | less

network DISABLED
  description: Wireless interface
  product: Wireless 3165
  vendor: Intel Corporaiton
  physical id: 0
  bus info: pci@0000:08:00.0
  logical name: wlp8s0
  version: 81

ifconfig -a

wlp8s0: flags=[etc.]

ifconfig up wlp8s0

wlp8s0: Host name lookup failure

So I was under the impression this was generally the way to bring a wifi card online, but it doesn't look like it's working. Any help is much appreciated.



Per chili's request, here is the output of cat /etc/netplan/*.yaml:

# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
   ethernets: {}
   version: 2

Okay, so it was working for a while, but I couldn't apt install packages because of package dependencies / version incompatibilities. All of these were resolved (by me, manually (tedious) (see Ubuntu 18.04 (Bionic) Server Unmet dependencies "are not going to be installed" and Can't apt-get install packages (perl warnings, dpkg warnings, PATH warnings)) and wpa_supplicant is reinstalled (it was uninstalled on its own for some reason?), but now when I go lshw the Wireless 3165 Network Controller doesn't even HAVE a logical name, so I can't even execute any of the commands you guys have suggested anymore! When I go ifconfig -a it shows lo and enp0s31f6 (Ethernet) so I don't know if that is the WiFi device or not. It no longer shows wlp8s0, even though it is in the netstat plan file. I'm thoroughly confused. I'll keep crunching, but also thanks for any further help.

Sorry! It was so promising! How success is fickle. u.u

This post is relevant but I don't think I can connect via ethernet and reinstalling the OS would be a hassle but I could probably do it eventually: Network unclaimed on Ubuntu

Best Answer

The terminal command ifconfig doesn't enable a wireless connection because there is no mechanism to specify the access point name, or SSID, nor the WPA2 password.

The usual way to enable wireless in recent Ubuntu versions, including Bionic or Ubuntu 18.04 is with netplan.

First, find the exact name of your netplan file:

ls /etc/netplan

It may be called 01-netcfg.yaml. Whatever it is called, please amend it as follows:

sudo nano /etc/netplan/01-netcfg.yaml

Change it to:

  version: 2
  renderer: networkd
      dhcp4: yes
      dhcp6: no
          password: "**********"

Of course, substitute your exact details here. Please note that the name of the access point as well as the WPA2 password are enclosed in quotation marks ". Netplan is very strict about indentation, spacing, etc. Please proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x).

Follow with:

sudo netplan generate
sudo netplan apply

Did you get an IP address?

ip addr show

Can you reach the internet?

ping -c3
Related Question