Re: NetworkManager WiFi AP Mode



Hi Dan

here are the outputs:

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 5c:31:3e:ce:be:5b
          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)


nmcli -f all dev show wlan0 | grep AVAIL
CONNECTIONS.AVAILABLE-CONNECTION-PATHS:


root beaglebone:~# nmcli -f all dev show wlan0
GENERAL.DEVICE:                         wlan0
GENERAL.TYPE:                           wifi
GENERAL.NM-TYPE:                        NMDeviceWifi
GENERAL.VENDOR:
GENERAL.PRODUCT:
GENERAL.DRIVER:                         wl18xx_driver
GENERAL.DRIVER-VERSION:                 3.12.10-svn34
GENERAL.FIRMWARE-VERSION:               N/A
GENERAL.HWADDR:                         5C:31:3E:CE:BE:5B
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.REASON:                         2 (Device is now managed)
GENERAL.UDI:                            /sys/devices/ocp.2/47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/wl18xx.2.auto/net/wlan0
GENERAL.IP-IFACE:
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     --
GENERAL.CON-UUID:                       --
GENERAL.CON-PATH:                       --
GENERAL.METERED:                        unknown
CAPABILITIES.CARRIER-DETECT:            no
CAPABILITIES.SPEED:                     unknown
CAPABILITIES.IS-SOFTWARE:               no
WIFI-PROPERTIES.WEP:                    yes
WIFI-PROPERTIES.WPA:                    yes
WIFI-PROPERTIES.WPA2:                   yes
WIFI-PROPERTIES.TKIP:                   yes
WIFI-PROPERTIES.CCMP:                   yes
WIFI-PROPERTIES.AP:                     yes
WIFI-PROPERTIES.ADHOC:                  yes
WIFI-PROPERTIES.2GHZ:                   yes
WIFI-PROPERTIES.5GHZ:                   yes
CONNECTIONS.AVAILABLE-CONNECTION-PATHS:

nmcli con up Hotspot
Error: Connection activation failed: No suitable device found for this connection.


Thanks!


On Mon, Jun 6, 2016 at 9:17 AM, Dan Williams <dcbw redhat com> wrote:
On Fri, 2016-06-03 at 13:49 -0700, Ali Nematollahi wrote:
> That was a great point Dan. It went one step forward:
>
> ....
> [ 2299.953517] [sched_delayed] sched: RT throttling activated
> [ 2300.344384] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
> NetworkManager[2845]: <info>  (wlan0): using nl80211 for WiFi device
> control
> [ 2300.379934] wlcore: loaded
> [ 2300.382856] wlcore: driver version:
> NetworkManager[2845]: <info>  (wlan0): driver supports Access Point
> (AP)
> mode
> NetworkManager[2845]: <info>  (wlan0): new 802.11 WiFi device
> (carrier:
> UNKNOWN, driver: 'wl18xx_driver', ifindex: 5)
> NetworkManager[2845]: <info>  rfkill0: found WiFi radio killswitch
> (at
> /sys/devices/ocp.2[ 2300.415536] wlcore: compilation time: Thu Jun 26
> 11:35:53 2014
> /47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/wl18xx.2.auto/ieee8
> 0211/phy0/rfkill0)
> (driver wl18xx_driver)
> NetworkManager[2845]: <info>  devices added (path:
> /sys/devices/ocp.2/47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/w
> l18xx.2.auto/net/wlan0,
> iface: wlan0)
> NetworkManager[2845]: <info>  device added (path:
> /sys/devices/ocp.2/47810000.mmc/mmc_host/mmc2/mmc2:0001/mmc2:0001:2/w
> l18xx.2.auto/net/wlan0,
> iface: wlan0): no ifupdown configuration found.
> NetworkManager[2845]: <info>  wpa_supplicant running
> NetworkManager[2845]: <info>  (wlan0): device state change: unmanaged
> ->
> unavailable (reason 'managed') [10 20 2]
> [ 2300.952925] wlcore: PHY firmware version: Rev 8.2.0.0.195
> [ 2301.042483] wlcore: firmware booted (Rev 8.8.0.0.13)
> NetworkManager[2845]: <info>  (wlan0) supports 1 scan SSIDs
> NetworkManager[2845]: <info>  (wlan0): supplicant interface state:
> starting
> -> ready
> NetworkManager[2845]: <info>  (wlan0): device state change:
> unavailable ->
> disconnected (reason 'supplicant-available') [20 30 42]
>
> root beaglebone:/etc/NetworkManager/system-connections# 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:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>
> wlan0     Link encap:Ethernet  HWaddr 5c:31:3e:ce:be:5b
>           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)
>
>
>
> I see the supplicant-available message and wlan0 comes up as it did
> before
> but still there's no IP address nor SSID is broadcast. Should I do an
> ipconfig to assign an IP to the interface manually? What about SSID
> broadcast?

No, you shouldn't need to do that.  It looks like NM isn't starting the
AP connection at all.  Could you run:

nmcli -f all dev show wlan0 | grep AVAIL

and let's see what connections/profiles NM things the wifi interface
can activate.  Next, try:

nmcli con up Hotspot

and lets see what NM says to that.

Dan

> Thanks!
>
> On Fri, Jun 3, 2016 at 8:25 AM, Dan Williams <dcbw redhat com> wrote:
>
> >
> > 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]