You are not logged in.

#1 2017-08-28 21:03:22

0x0000053A
Member
Registered: 2017-07-02
Posts: 16

How to make netctl use any wireless interface and any accesible point?

I've managed to make it work with one profile on a specific interface by enabling netctl-auto@wlp0whatever in systemctl. Now I want it to work on different machines with different hardware and several different wifi points (e.g. big office building with a lot of thin client wireless machines).
Can I do that with netctl or maybe it's better to pick a smarter network manager that doesn't come out of the box? If second, which is the most lightweight and suitable for my task?

Offline

#2 2017-08-28 23:10:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: How to make netctl use any wireless interface and any accesible point?

0x0000053A wrote:

Can I do that with netctl or maybe it's better to pick a smarter network manager

This was my first thought upon reading your title ...

0x0000053A wrote:

which is the most lightweight and suitable for my task?

dchcpd and wpa_supplicant.

Configure your wpa_supplicant conf, enable dhcpcd's wpa_supplicant hook, then just `systemctl enable dhcpcd.service`.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2017-08-29 07:31:10

0x0000053A
Member
Registered: 2017-07-02
Posts: 16

Re: How to make netctl use any wireless interface and any accesible point?

Trilby wrote:

dchcpd and wpa_supplicant.

Configure your wpa_supplicant conf, enable dhcpcd's wpa_supplicant hook, then just `systemctl enable dhcpcd.service`.


Wait, can you really configure wpa_supplicant to connect to any of the available wifi points? How?
wpa_passphrase gives out config for only one point, how to combine several of them?

Offline

#4 2017-08-29 10:29:27

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: How to make netctl use any wireless interface and any accesible point?

0x0000053A wrote:

Wait, can you really configure wpa_supplicant to connect to any of the available wifi points? How?
wpa_passphrase gives out config for only one point, how to combine several of them?

You can put as many "network {}" blocks in your configuration file as you want. wpa_supplicant chooses one according to order, priority and availability.

You can find more about the possible parameters in the wpa_supplicant.conf manpage and in here: /usr/share/doc/wpa_supplicant/wpa_supplicant.conf

Last edited by progandy (2017-08-29 10:32:26)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2017-08-29 11:01:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: How to make netctl use any wireless interface and any accesible point?

Yes, as noted above, wpa_supplicant will go through it's config and connect to any available network that it has a valid configuration block in the file.  This is all I use for networking on laptops that I move around with between *many* networks.  I just list them all in my wpa_supplicant.conf.

wpa_passhrase is a nice little tool for quick and easy generation of the most trivial configuration blocks or stanzas - but it covers only a very very small percentage of what wpa_supplicant is capable of.  These generated stanzas can sometimes be used on their own as a complete configuration, but generally they are meant to be added to proper wpa_supplicant.conf file.

wpa_supplicant will readily connect to open networks too (which is why I've never bothered with iw or those other tools for that).  Just pust the ssid and key_mgmt=NONE in a configuration block.

I just list all the networks I am familiar with in my config - if that is sufficient it is very easy to do (you make the config once, then it just works as you roam around without needing any further intervention).  I don't however have it automatically connect to any available open network if a known network isn't available.  If that is your goal I think it is possible (I'm pretty sure I read it in the docs somewhere, but just skipped over it as it wasn't relevant for me).  However, from your description it sounds like you'd know the ssids - even if it's a long list, as long as they are all known before hand, this is very easy to do.

For references, some partially redacted excerpts from my /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
update_config=1
eapol_version=1
ap_scan=1
fast_reauth=1

network={
	ssid="My Home Network"
	psk="Nonya Business"
}

network={
	ssid="My Work Network"
	psk="Better Luck Next Time"
}

network={
	ssid="PANERA"
	key_mgmt=NONE
}

With this I could move between my home, work, and the panera bakery/cafe and be automatically connected at each location (with just dhcpcd@.service enabled with it's wpa_supplicant hook).  In reality my config has a couple dozen networks listed.  Some WPA2, some open, some eduroam requiring more complex configuration blocks, some with fields linking to required SSL certificate files.

Last edited by Trilby (2017-08-29 11:12:05)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2017-08-29 14:27:49

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: How to make netctl use any wireless interface and any accesible point?

And, if you insist on a GUI, there is wpa-gui which puts an icon in the tray that lets you perform site surveys and manage passwords for new sites you may find; it manipulates the wpa configuration files.
I use this with wpa_supplicant service and systemd-network service to handle my networks.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB