You are not logged in.

#1 2012-11-10 07:48:17

jwatte
Member
Registered: 2012-06-22
Posts: 58

How does systemd, wpa_supplicant, and dhcpcd work together? rtl8188su

I'm running arch with alarm (done a pacman -Syu to get latest everything) on an original Raspberry Pi model B.
I'm using a Belkin USB adapter which is really a Realtek rtl8188su chip, which is recognized with the r8712u module. I want to do it all from the command line (not running a GUI, as this Pi won't be having a display attached.)
The system recognizes the built-in Ethernet, and dhcpcd assigns it an IP address, so I can SSH into it and try to bring up the wlan0 interface.

I'm an old-school Linux/UNIX hacker, but I haven't had a lot of experience with systemd, nor with wpa_supplicant or even much of udev, so I'm a bit lost in trying to make this work.

I made sure wpa_supplicant and wpa_cli were installed. Then I edited /etc/wpa_supplicant/wpa_supplicant.conf to add my ssid/passphrase, and saved it as /etc/wpa_supplicant/wpa_supplicant.wlan0.conf. I also did "systemctl enable wpa_supplicant," and I've rebooted.

The status of the system is that it does not enable the wlan0 interface. Further, the wpa_cli tool does not work. If I run just "wpa_cli" or with a command like "wpa_cli list" then I get the error:

could not connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

This is weird, because wpa_supplicant is running in dbus listen mode:

[root@alarmpi ~]# ps alx | grep [w]pa

0     0    94     1  20   0   5636  1416 poll_s Ss   ?          0:00 /usr/sbin//wpa_supplicant -u

Each time I boot, I get this message in /dev/log/messages.log:

Nov 10 01:40:06 alarmpi kernel: [  648.082619] ADDRCONF(NETDEV_UP): wlan0: link is not ready

Now, if I insted does "systemctp stop wpa_supplicant" and start it manually, it does bring up the interface:

[root@alarmpi ~]# wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.wlan0.conf 

wlan0: Trying to associate with a0:21:b7:63:a1:98 (SSID='jwatte' freq=2462 MHz)
wlan0: Associated with a0:21:b7:63:a1:98
wlan0: WPA: Key negotiation completed with a0:21:b7:63:a1:98 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to a0:21:b7:63:a1:98 completed (auth) [id=0 id_str=]

[root@alarmpi ~]# ifconfig wlan0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a86:3bff:feb4:c21a  prefixlen 64  scopeid 0x20<link>
        ether 08:86:3b:b4:c2:1a  txqueuelen 1000  (Ethernet)
        RX packets 30  bytes 3813 (3.7 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 5  bytes 610 (610.0 B)
        TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0

[root@alarmpi ~]# 

However, dhcpcd is not auto-launched to provide an IP address to the interface.

So, how is this supposed to work? How am I supposed to configure the system so that all the pieces click together? It should start wpa_supplicant with the right config data, and/or configure it over dbus correctly, and it should make sure dhcpcd is then invoked to obtain an IP address. I have *no idea* how to actually configure this to do the right thing, because all the tutorials and documentation I can find on the web is either very abstract ("services live in /usr/lib/systemd/...") or just claim that things "will magically work" if I have the correct configuration.

Help! Don't know what to do next!

Offline

#2 2012-11-10 09:01:54

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: How does systemd, wpa_supplicant, and dhcpcd work together? rtl8188su

I think you may be better off asking this question here:

http://archlinuxarm.org/platforms/armv6/raspberry-pi


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2012-11-10 12:36:17

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: How does systemd, wpa_supplicant, and dhcpcd work together? rtl8188su

Your manual wpa_supplicant invocation result looks good, so the major hurdle you have taken already.
For wireless you need a management method that acts as interface to wpa_supplicant and dhcp and watches the connection. Before you browse off to archlinuxarm, also read the non-abstract introduction here: https://wiki.archlinux.org/index.php/Wi … management

Offline

#4 2012-11-10 17:12:26

jwatte
Member
Registered: 2012-06-22
Posts: 58

Re: How does systemd, wpa_supplicant, and dhcpcd work together? rtl8188su

Thanks for the link, it's a somewhat more concrete description.

It mentions iwconfig, which I haven't been able to find for Raspberry Arch. (neither "iw" nor "iwconfig" come installed, and pacman doesn't know about them as packages, so they must be squirreled away in some other package.)

I'll look at netcfg and see how far I get. Thanks!

Offline

#5 2012-11-10 17:37:57

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: How does systemd, wpa_supplicant, and dhcpcd work together? rtl8188su

iwconfig is found in core/wireless_tools and iw in core/iw.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

Board footer

Powered by FluxBB