Re: NetworkManager WiFi AP Mode
- From: Dan Williams <dcbw redhat com>
- To: Ali Nematollahi <alirezan1 gmail com>, networkmanager-list gnome org
- Subject: Re: NetworkManager WiFi AP Mode
- Date: Fri, 03 Jun 2016 10:25:24 -0500
On Thu, 2016-06-02 at 15:03 -0700, Ali Nematollahi wrote:
Hi guys
I'm trying to use NM to start a WiFi AP mode. I've had some success
but a
big portion of the process is very unclear to me and I'm hoping to
get some
help.
So I have this NM configuration:
# cat Hotspot
[connection]
id=Hotspot
uuid=3e13073d-6d7a-440d-ab2b-4f42c9fdacaf
type=802-11-wireless
autoconnect=true
[802-11-wireless]
ssid=AliAP
mode=ap
security=802-11-wireless-security
[802-11-wireless-security]
key-mgmt=wpa-psk
psk=alisecurepassword984364 234@
[ipv4]
method=shared
[ipv6]
method=auto
Looks good so far.
With this, the NM starts up and does what it needs to do (I think):
(NetworkManager:2989): NetworkManager-WARNING **: <warn> glib-
version:
cannot handle SIGUSR1 and SIGUSR2 signals. Consider upgrading glib to
2.36.0 or newer
NetworkManager[2989]: <info> NetworkManager (version 1.0.10) is
starting...
NetworkManager[2989]: <info> Read config:
/etc/NetworkManager/NetworkManager.conf
NetworkManager[2989]: <info> init!
NetworkManager[2989]: <info> update_system_hostname
<snip>
NetworkManager[2989]: <info> (wlan0): new 802.11 WiFi device
(carrier:
UNKNOWN, driver: 'wl18xx_driver', ifindex: 5)
NetworkManager[2989]: <info> (wlan0): device state change: unmanaged
->
unavailable (reason 'managed') [10 20 2]
[ 1424.134834] wlcore: PHY firmware version: Rev 8.2.0.0.195
[ 1424.222506] wlcore: firmware booted (Rev 8.8.0.0.13)
[ 1424.244537] wlcore: down
[ 1424.664565] wlcore: PHY firmware version: Rev 8.2.0.0.195
[ 1424.752521] wlcore: firmware booted (Rev 8.8.0.0.13)
NetworkManager[2989]: <info> (can0): new Generic device (carrier:
UNKNOWN,
driver: 'c_can_platform', ifindex: 2)
NetworkManager[2989]: <info> (can1): new Generic device (carrier:
UNKNOWN,
driver: 'c_can_platform', ifindex: 3)
NetworkManager[2989]: <info> wpa_supplicant stopped
NetworkManager[2989]: <info> (wlan0): supplicant interface state:
starting
-> init
Looking at the code, I don't think NM is able to talk to
wpa_supplicant. This line (starting -> init) will only get printed if
D-Bus failed to service activate the supplicant. There's two fixes
there:
1) fix whatever problem is wrong with D-Bus service activation; this
requires that D-Bus is built with the same --datadir as wpa_supplicant,
and that the /usr/share/dbus-1/system-
services/fi.w1.wpa_supplicant1.service file exists and points to the
wpa_supplicant binary.
2) run the supplicant at system startup with the "-u" (enable D-Bus
interface) option; either as a system service via your normal service
framework (sysvinit, openrc, systemd, etc) or just launch it manually
somehow.
Once NM can talk to wpa_supplicant, it should start your AP connection
and actually enable the AP on wlan0.
Dan
# ifconfig
eth0 Link encap:Ethernet HWaddr ec:24:b8:cf:e0:be
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:56
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:448 (448.0 B) TX bytes:448 (448.0 B)
wlan0 Link encap:Ethernet HWaddr 5c:31:3e:ce:be:5b
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:49 errors:0 dropped:21 overruns:0 frame:0
TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7734 (7.5 KiB) TX bytes:8838 (8.6 KiB)
So WLAN0 is up. Great!
When I was using "iw" and stuff to set up my AP, I used to start
hostapd
and udhcpd to set up the IP address, and start broadcasting the SSID.
When I get to this point with NM, I was under the impression that NM
would
take care of all of this. But I cannot see my SSID on my phone. I do
have a
functioning wpa_supplicant btw.
Out of curiosity, I started hostapd and udhcpd. I could get hostapd
to work
(but not the SSID I set in NM!!) and UDHCPD never worked.
I was wondering what I was missing in this and how I can start the
broadcast and activate the DHCPD automatically with NM.
I'm running NM 1.0.10.
Thanks!
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]