Petter Holt Juliussen • Mail | Mastodon | GitHub | Letterboxd

for later reference.

Wireless networking

2019-04-04

wpa_supplicant

A WPA client and IEEE 802.1X supplicant.

$ sudo apt-get install wpa_supplicant

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
    ssid="<SSID>"
    scan_ssid=1
    mode=0
    proto=WPA2
    auth_alg=OPEN
    pairwise=CCMP
    group=CCMP
    key_mgmt=WPA-PSK
    psk="<PASSWORD>"
    id_str="home"
    priority=1
}

sudo nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

# Wireless interface
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Firmwares

Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

Seems to work out of the box.

dmesg | grep rtl

[    4.805395] usbcore: registered new interface driver rtl8192cu

Ralink Technology, Corp. RT5370 Wireless Adapter

Missing firmware

dmesg | grep -e rt5 -e firm

[    5.958257] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[    5.960699] rt2800usb 1-1.2:1.0: Direct firmware load for rt2870.bin failed with error -2
[    5.960732] ieee80211 phy0: rt2x00lib_request_firmware: Error - Failed to request Firmware

Installing the firmware

sudo apt-get install git-core

git clone http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

cp linux-firmware/rt2870.bin /lib/firmware/rt2870.bin

Will probably work for similar Ralink/Realtek wifi dongles (rt2561, rt2661, rt2860, rt2870, rt3070, rt3071, rt3090).