NetworkManager WiFi AP Mode



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


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
NetworkManager[2989]: <info>        interface-parser: parsing file /etc/network/interfaces
NetworkManager[2989]: <info>        interface-parser: finished parsing file /etc/network/interfaces
NetworkManager[2989]: <info>  guessed connection type (eth0) = 802-3-ethernet
NetworkManager[2989]: <info>  update_connection_setting_from_if_block: name:eth0, type:802-3-ethernet, id:Ifupdown (eth0), uuid: 681b428f-beaf-8932-dce4-687ed5bae28e
NetworkManager[2989]: <info>  adding eth0 to connections
NetworkManager[2989]: <info>  adding iface eth0 to eni_ifaces
NetworkManager[2989]: <info>  autoconnect
NetworkManager[2989]: <info>  management mode: unmanaged
NetworkManager[2989]: <info>  devices added (path: /sys/devices/ocp.2/47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/wl18xx.2.auto/net/wlan0, iface: wlan0)
NetworkManager[2989]: <info>  device added (path: /sys/devices/ocp.2/47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/wl18xx.2.auto/net/wlan0, iface: wlan0): no ifupdown configuration found.
NetworkManager[2989]: <info>  devices added (path: /sys/devices/ocp.2/481cc000.d_can/net/can0, iface: can0)
NetworkManager[2989]: <info>  device added (path: /sys/devices/ocp.2/481cc000.d_can/net/can0, iface: can0): no ifupdown configuration found.
NetworkManager[2989]: <info>  devices added (path: /sys/devices/ocp.2/481d0000.d_can/net/can1, iface: can1)
NetworkManager[2989]: <info>  device added (path: /sys/devices/ocp.2/481d0000.d_can/net/can1, iface: can1): no ifupdown configuration found.
NetworkManager[2989]: <info>  devices added (path: /sys/devices/ocp.2/4a100000.ethernet/net/eth0, iface: eth0)
NetworkManager[2989]: <info>  locking wired connection setting
NetworkManager[2989]: <info>  devices added (path: /sys/devices/virtual/net/lo, iface: lo)
NetworkManager[2989]: <info>  device added (path: /sys/devices/virtual/net/lo, iface: lo): no ifupdown configuration found.
NetworkManager[2989]: <info>  end _init.
NetworkManager[2989]: <info>  Loaded settings plugin ifupdown: (C) 2008 Canonical Ltd.  To report bugs please use the NetworkManager mailing list. (/usr/lib/NetworkManager/libnm-settings-plugin-ifupdown.so)
NetworkManager[2989]: <info>  Loaded settings plugin keyfile: (c) 2007 - 2015 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager[2989]: <info>  (1416752) ... get_connections.
NetworkManager[2989]: <info>  (1416752) ... get_connections (managed=false): return empty list.
NetworkManager[2989]: <warn>  keyfile: error loading connection from file /etc/NetworkManager/system-connections/Hotspot: File permissions (100644) were insecure
NetworkManager[2989]: <info>  get unmanaged devices count: 1
NetworkManager[2989]: <info>  monitoring kernel firmware directory '/lib/firmware'.
NetworkManager[2989]: <info>  rfkill0: found WiFi radio killswitch (at /sys/devices/ocp.2/47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/wl18xx.2.auto/ieee80211/phy0/rfkill0) (driver wl18xx_driver)
NetworkManager[2989]: <info>  WiFi hardware radio set enabled
NetworkManager[2989]: <info>  WWAN hardware radio set enabled
NetworkManager[2989]: <info>  Loaded device plugin: NMVxlanFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMVlanFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMVethFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMTunFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMMacvlanFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMInfinibandFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMGreFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMEthernetFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMBridgeFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMBondFactory (internal)
NetworkManager[2989]: <info>  Loaded device plugin: NMWifiFactory (/usr/lib/NetworkManager/libnm-device-plugin-wifi.so)
NetworkManager[2989]: <warn>  (/libnm-device-plugin-bluetooth.so): failed to load plugin: /usr/lib/NetworkManager/libnm-device-plugin-bluetooth.so: undefined symbol: g_clear_pointer
NetworkManager[2989]: <info>  Loaded device plugin: NMWwanFactory (/usr/lib/NetworkManager/libnm-device-plugin-wwan.so)
NetworkManager[2989]: <info>  Loaded device plugin: NMAtmManager (/usr/lib/NetworkManager/libnm-device-plugin-adsl.so)
NetworkManager[2989]: <info>  WiFi enabled by radio killswitch; enabled by state file
NetworkManager[2989]: <info>  WWAN enabled by radio killswitch; enabled by state file
NetworkManager[2989]: <info>  WiMAX enabled by radio killswitch; enabled by state file
NetworkManager[2989]: <info>  Networking is enabled by state file
NetworkManager[2989]: <info>  (eth0): new Ethernet device (carrier: OFF, driver: 'cpsw', ifindex: 4)
NetworkManager[2989]: <info>  (lo): link connected
NetworkManager[2989]: <info>  (lo): new Generic device (carrier: ON, driver: 'unknown', ifindex: 1)
NetworkManager[2989]: <info>  (wlan0): using nl80211 for WiFi device control
NetworkManager[2989]: <info>  (wlan0): driver supports Access Point (AP) mode
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


# 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!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]