Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

setup of wireless access point (WAP)

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
graemev2
Posts: 95
Joined: 2019-01-08 17:28
Has thanked: 2 times

setup of wireless access point (WAP)

#1 Post by graemev2 »

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?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: setup of wireless access point (WAP)

#2 Post by Head_on_a_Stick »

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.
deadbang

User avatar
graemev2
Posts: 95
Joined: 2019-01-08 17:28
Has thanked: 2 times

Re: setup of wireless access point (WAP)

#3 Post by graemev2 »

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

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: setup of wireless access point (WAP)

#4 Post by Head_on_a_Stick »

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
deadbang

User avatar
graemev2
Posts: 95
Joined: 2019-01-08 17:28
Has thanked: 2 times

Re: setup of wireless access point (WAP)

#5 Post by graemev2 »

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 ?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: setup of wireless access point (WAP)

#6 Post by Head_on_a_Stick »

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.
deadbang

User avatar
graemev2
Posts: 95
Joined: 2019-01-08 17:28
Has thanked: 2 times

Re: setup of wireless access point (WAP)

#7 Post by graemev2 »

Yep (I had read the link) I normally configure my networking via /etc/network/interfaces, but it feels like I'm bing a bit of a Luddite always just disabling NetworkManager. So I tried really hard to leave it on. For example I MIGHT have wanted other interfaces to be managed by NM.

So in reality I've just disabled NM (as usual) and all is well .

The problem was (is if I re-enable) that NB turns the *RADIO* off it I tell it to "turn off/ignore" the interface . AFAIK there's not mechanism in /etc/network/interfaces to affect the RADIO . Even if I found a way to enable radio signal (e.g. a command) I'd be fighting against NM , last guy t o turn it on/off wins.

Post Reply