setup of wireless access point (WAP)

Kernels & Hardware, configuring network, installing services

setup of wireless access point (WAP)

Postby graemev2 » 2019-01-08 18:00

I wonder if I've missed a FAQ ? I'm trying to setup a wireless access point on stretch .

The ones I found pointed me at hostapd(8) . Having spent about a half day playing with it, I find:

1: The init script installed does not appear to save the error messages anywhere . I had to run the command by had to spot the syntax errors in my hostapd.config
2: I had to manually enable the wifi with rfkill(1) , which is not installed by default and , it seems, not used in the script

Feels like there is a stretch/debain specific setup guide somewhere, which I've missed. Could somebody point me at it?
graemev2
 
Posts: 3
Joined: 2019-01-08 17:28

Re: setup of wireless access point (WAP)

Postby Head_on_a_Stick » 2019-01-08 18:17

Check the Debian wiki, that has a hostap page for Prism hardware.

The ArchWiki guide looks transferable: https://wiki.archlinux.org/index.php/So ... cess_point

EDIT: for errors check the systemd journal.
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8610
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: setup of wireless access point (WAP)

Postby graemev2 » 2019-01-23 13:46

OK, I've been banging my head against this for a VERY long while. I suspect I may have bumped up against a bug.

In essence NetworkManager and hostapd are fighting over the interface.

I think the solution I'll be adopting is to completely disable NetWorkManager (which does not appear to be supported, but I believe setting
Code: Select all
 DAEMON=/bin/true
in /etc/default/NetworkManager will stop it dead)

The issue is that NetworkManager (NM) disables the WiFi. It does this because I have WiFi disabled in NM (
Code: Select all
nmcli radio wifi off
) . So I have set several options which should get NM to ignore the WiFi interface.

in /etc/NetworkManager/NetworkManager.conf
Code: Select all
[keyfile]
unmanaged-devices=mac:00:19:e0:57:86:af;interface-name:wlan0


Also by other means in a *.d script.

Anyhow , no joy. It might not manage the device , but it still turns off the Wifi. You might think, "well just turn it on
Code: Select all
nmcli radio wifi on
. This might be worthwhile, but it also appear in the e.g. the gnome GUI. This means anytime somebody launches the GUI they can (in error) switch off the WifI and this disable the access point.

In sort I really don't want NM to play with the WiFi at all, it's not there for the desktop user, it's a server setting.
So **once again** the only choice is to disable NM completely. ...sigh
graemev2
 
Posts: 3
Joined: 2019-01-08 17:28

Re: setup of wireless access point (WAP)

Postby Head_on_a_Stick » 2019-01-23 16:13

graemev2 wrote:completely disable NetWorkManager (which does not appear to be supported, but I believe setting
Code: Select all
 DAEMON=/bin/true
in /etc/default/NetworkManager will stop it dead)

Or use
Code: Select all
# systemctl disable NetworkManager.service

I think it has a few other .services as well so check for them with
Code: Select all
systemctl list-unit-files --state=enabled

then disable the ones you don't want.

FWIW, NetworkManager will ignore any interfaces listed in /etc/network/interfaces so adding this line to a stanza for your wireless card should let you keep NM enabled:
Code: Select all
hostapd /etc/hostapd/hostapd.conf

https://seravo.fi/2014/create-wireless- ... nt-hostapd
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8610
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: setup of wireless access point (WAP)

Postby graemev2 » 2019-01-23 17:18

Thanks. I actually ended up disabling it via nmcli networking off ... I might end up disabling the service as you suggest.

The "FWIW, NetworkManager will ignore any interfaces listed in /etc/network/interfaces..."

(I did say I spent a long while on this :-) )

Yep I'd done that a while back (should have mention it) but it does literally "just that" . It does not touch the INTERFACE. It still turns the radio (WiFi) off .

So the radio was off, so the interface would not come up and hostapd could do't do it's stuff.

Turns out, with NM running , you must let it turn radio on or off ... you can't just say "ignore" . There's no joined up thinking "All the Wifi interfaces are unmanaged, maybe I should not mess with the radio . The problem is , even if I turn the radio on (in NM) it still yest anybody using the GUI turn it off again. I think a mechanism to say "blutooth", "wiffi" ... are managed/unmanaged by NM is probably whats needed . ...actually think about is again since the radio on/off is per interface, if an interface is unmanaged (by NM) it should probably not touch the radio for that interface either . So maybe it is a simple bug ?
graemev2
 
Posts: 3
Joined: 2019-01-08 17:28

Re: setup of wireless access point (WAP)

Postby Head_on_a_Stick » 2019-01-23 17:30

graemev2 wrote:It does not touch the INTERFACE. It still turns the radio (WiFi) off

Yes, so then you have to configure the wireless device using /etc/network/interfaces, please read my link, it explains how.
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8610
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable