The officially official Devuan Forum!

You are not logged in.

#1 2022-03-05 14:22:06

alphalpha
Member
From: Germany
Registered: 2018-01-23
Posts: 137  

HOWTO: Manual Wifi roaming multiple networks (no network-manager)

In this guide, I want to show how to manually setup your wireless lan connection, so your laptor automatically connects to the network nearby.
If you are using the network-manager service, you don't need any of this.

1 - make sure '/etc/network/interfaces' contains the following lines, where wlan0 in this case is the name of the network adapter

iface default inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
	wpa-roam /etc/wpa_supplicant.conf

2 - if you don't have '/etc/wpa_supplicant.conf ', create it and make sure only root can acces it because it will contain your passwords

sudo touch /etc/wpa_supplicant.conf
sudo chown root:root /etc/wpa_supplicant.conf
sudo chmod 600 /etc/wpa_supplicant.conf

3 - to get the stanza's for your network, copy the output of the following command to /etc/wpa_supplicant.conf

wpa_passphrase 'YOUR ACCESSPOINT' 'YOUR PASSWORD'

Here is an example how /etc/wpa_supplicant.conf should look.
For networks that use the same ESSID, add the mac address and optional a priority.

# for documentation see:
# less /usr/share/doc/wpasupplicant/examples/wpa-roam.conf
# zless /usr/share/doc/wpasupplicant/README.Debian.gz  
# zless /usr/share/doc/wpa_supplicant/README.modes.gz

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=netdev
#ap_scan=1
update_config=1

# Home
network={
	bssid=AA:AA:AA:AA:AA:AA
	ssid="Foo"
	#psk="12345678"
	psk=15af1abdaa5ea8efaa1d28551496c934f5e7183f426b444dd1c33d679501cb11
	priority=7
}

# Upstairs
network={
	bssid=BB:BB:BB:BB:BB:BB
	ssid="Foo"
	#psk="88888888"
	psk=02dee96ae4492999724eb74f23bacac61a111f5a7f53c89bd83eba764a5d904f
	priority=5
}

# Office
network={
	ssid="Office"
	#psk="88888888"
	psk=166f4b50fafb6cb5c63e5ebf9b35b2171da85f7c554e787c10fef654abba3a16
}

Offline

#2 2022-03-05 16:25:05

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: HOWTO: Manual Wifi roaming multiple networks (no network-manager)

Note that the ctrl_interface & update_config lines are only needed for the wpagui application.

It's probably best the delete the un-hashed (commented) psk lines from the wpa_supplicant.conf network stanzas to prevent casual snooping. The hash is unsalted and so trivial to reverse but it's better than nothing.

I would actually recommend iwd over wpa_supplicant because it handles roaming better, it's more secure with a smaller code base and it has fewer dependencies. The only caveat with Devuan is that the orphan-sysvinit-scripts package is needed and the init script needs to be copied over and enabled manually as per https://dev1galaxy.org/viewtopic.php?id=4865.

See https://wiki.debian.org/WiFi/HowToUse#Using_IWD & https://wiki.archlinux.org/title/Iwd for usage guides; iwd does not use /etc/network/interfaces or ifupdown at all.


Brianna Ghey — Rest In Power

Offline

Board footer