Situation
A no-name mini-PC is being prepared for use as a “headless” development/testing environment running Debian. The machine must connect to the local network using Wi-Fi.
Problem
The machine does not appear to have a Wi-Fi controller. Running
lspci -nn
provides no information about a Wi-Fi device of any kind. At the same time, a look into BIOS reveals that a Wi-Fi card is present; BIOS identifies it as AP6255. A quick Internet search later, another revelation: this is a Broadcom product licensed to a variety of third parties to sell under white labels. I should have known… Welcome to another Broadcom-themed adventure in networking!
Cause of the problem
The Wi-Fi controller is indeed present, but it does not communicate to the rest of the system via the customary PCI, so lspci cannot detect it. Rather, it uses an alternate communication method called “SDIO/USB”, aka “SDIO over USB”. So our system must have the firmware/drivers that support this method, rather than those that support the more conventional PCI.
Solution
We begin by connecting the machine to the local network (and the Internet) with an Ethernet cable; the machine will need an Internet connection to download the necessary software. Also, the administrator will need root-level access to the system. Commands given below assume that root access is available, but they can be used with sudo if necessary, and it shouldn’t make any difference.
STEP 0 (wasn’t necessary in my case, but may be needed if other solutions were tried before to no avail). Uninstall potentially conflicting packages:
apt-get remove broadcom-sta-common broadcom-sta-source firmware-b43*
Note the star symbol at the end; it tells apt-get to uninstall all packages whose names start with firmware-b43.
STEP 1. Install the package containing the appropriate firmware/driver:
apt-get install broadcom-sta-dkms
(Note: in Ubuntu, the equivalent package is named differently, so you should do apt-get install bcmwl-kernel-source instead.)
STEP 2. Enable the kernel module responsible for SDIO/USB communication between the Wi-Fi card and the rest of the system:
modprobe brcmfmac
STEP 3. Test the progress:
iwconfig
The output of this command should contain at least a mention of a Wi-Fi device (wlan0 or something similar). This will indicate that the system has recognized the Wi-Fi device. Note the name of the Wi-Fi device; it will be used in later steps. For the remainder of this solution, we will use wlan0.
STEP 4. Install WPA Supplicant:
apt-get install wpasupplicant
STEP 5. Edit the configuration file /etc/network/interfaces; add the following to the end of the file:
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid MyNetworkName
wpa-psk MyNetworkPassword
Obviously, MyNetworkName and MyNetworkPassword should be replaced with the SSID name for the local wireless network and the password for this network, respectively. Also, remember to replace wlan0 with the name you learned in Step 3.
STEP 6. Bring up the Wi-Fi interface (again, remember to replace wlan0 with the name you learned in Step 3):
ifup wlan0
STEP 7. Verify that the system operates as desired. To do that, shut the system down:
shutdown now
When the system shuts down, disconnect the Ethernet cable and start the system again. It should connect to the specified local network and obtain a local IP address assigned to it by the local DHCP server. If you have a keyboard and monitor temporarily attached to the system, run ip a to see connection status, including the local IP address; if not, scan the network to determine your machine’s local IP address and use it to log in remotely.