systemd issue or wpa_supplicant issue?

Ask questions about Arch Linux ARM. Please search before making a new topic.

systemd issue or wpa_supplicant issue?

Postby xote » Wed Aug 21, 2019 10:20 am

Hi Folks,

i like to connect my RPi 1B+ to a wireless network. I am using an EDIMAX USB wifi adapter for it, it seems to be detected correctly:

Code: Select all
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

I have created a /etc/wpa_supplicant/wpa_supplicant.conf for it:
Code: Select all
network={
   ssid="myssid"
   psk="mysupersecretkey"
}


I also created a /etc/systemd/network/wlan0.network because i wanted to use systemd-networkd for that and as the usb wifi interface seems to be named wlan0 that seemed correctly to me:
Code: Select all
[Match]
Name=wlan0

[Network]
DHCP=yes


So, my wpa_supplicant.service is running
Code: Select all
* wpa_supplicant.service - WPA supplicant
   Loaded: loaded (/usr/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-08-21 10:15:11 UTC; 1min 9s ago
 Main PID: 212 (wpa_supplicant)
    Tasks: 1 (limit: 987)
   Memory: 2.4M
   CGroup: /system.slice/wpa_supplicant.service
           `-212 /usr/bin/wpa_supplicant -u

Aug 21 10:14:26 mitt151 systemd[1]: Starting WPA supplicant...
Aug 21 10:14:27 mitt151 wpa_supplicant[212]: Successfully initialized wpa_supplicant
Aug 21 10:15:11 mitt151 systemd[1]: Started WPA supplicant.


Unfortunately it does not seem to work, when i start wpa_supplicant manually like
Code: Select all
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

it works, so i guess the config of wpa_supplicant is ok. It seems more like a missing activation of a service in systemd.

ip addr says:
Code: Select all
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff


I would be very thankful for any suggestions, it looks like i am missing an essential point in my configuration of this little board. I just cannot see where (maybe situation-blind for now ;-) )
Last edited by xote on Mon Sep 02, 2019 10:04 am, edited 1 time in total.
xote
 
Posts: 4
Joined: Fri Nov 11, 2016 11:02 am

Re: [solved] systemd issue or wpa_supplicant issue?

Postby xote » Wed Aug 21, 2019 2:48 pm

I renamed
Code: Select all
/etc/wpa_supplicant/wpa_supplicant.conf
to
Code: Select all
/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
and enabled the systemd service
Code: Select all
wpa_supplicant@wlan0
Thats was all that was missing.

(Thanks to a systemd-networkd youtube video of Kai Hendry, btw.)
xote
 
Posts: 4
Joined: Fri Nov 11, 2016 11:02 am

Re: systemd issue or wpa_supplicant issue?

Postby xote » Mon Sep 02, 2019 10:11 am

Sorry to bring this up again, i still have problems to access wireless network.

I have two ARM-based boards here, a beaglebone black and a RPi 1 B+, both refuse to connect to the wireless using the EDIMAX wireless usb adapter. I tried connecting via the dhcpcd.service, the wired network works as it should, wlan0 is always telling me

Code: Select all
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 74:da:38:2e:4f:f0 brd ff:ff:ff:ff:ff:ff


Meanwhile i was even thinking about a power problem (usb wifi does need a lot of power though), unfortunately it doesn't work with a stronger power supply either.

What is the recommended way of doing this? wpa_supplicant + systemd-networkd or wpa_supplicant + dhcpcd or even something else?
xote
 
Posts: 4
Joined: Fri Nov 11, 2016 11:02 am

Re: systemd issue or wpa_supplicant issue?

Postby graysky » Mon Sep 02, 2019 10:39 am

I have this setup on an RPi3B+: systemd-networkd, systemd-resolved, and wpa_supplicant.

What does your corresponding dirtree look like? Guessing you need to activate via systemctl. In general do not waste your time with youtube videos/blogs etc. Use the Arch Wiki for official and peer-reviewed content: https://wiki.archlinux.org/index.php/WPA_supplicant

Code: Select all
% tree /etc/systemd/system
/etc/systemd/system
├── dbus-org.freedesktop.network1.service -> /usr/lib/systemd/system/systemd-networkd.service
├── dbus-org.freedesktop.resolve1.service -> /usr/lib/systemd/system/systemd-resolved.service
├── getty.target.wants
│   └── getty@tty1.service -> /usr/lib/systemd/system/getty@.service
├── multi-user.target.wants
│   ├── cronie.service -> /usr/lib/systemd/system/cronie.service
│   ├── remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
│   ├── sshd.service -> /usr/lib/systemd/system/sshd.service
│   ├── systemd-networkd.service -> /usr/lib/systemd/system/systemd-networkd.service
│   ├── systemd-resolved.service -> /usr/lib/systemd/system/systemd-resolved.service
│   ├── ufw.service -> /usr/lib/systemd/system/ufw.service
│   └── wpa_supplicant@wlan0.service -> /usr/lib/systemd/system/wpa_supplicant@.service
├── network-online.target.wants
│   └── systemd-networkd-wait-online.service -> /usr/lib/systemd/system/systemd-networkd-wait-online.service
├── sockets.target.wants
│   └── systemd-networkd.socket -> /usr/lib/systemd/system/systemd-networkd.socket
├── sysinit.target.wants
│   ├── rngd.service -> /usr/lib/systemd/system/rngd.service
│   └── systemd-timesyncd.service -> /usr/lib/systemd/system/systemd-timesyncd.service
└── systemd-networkd-wait-online.service.d
    └── override.conf


The override for wpa:
Code: Select all
# cat /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore eth0


Systemd networks:
Code: Select all
# cat /etc/systemd/network/10-wireless.network
[Match]
Name=wlan0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=10


Code: Select all
 cat /etc/systemd/network/20-wired.network
[Match]
Name=eth0

[Network]
DHCP=ipv4

[DHCP]
RouteMetric=20


wpa.conf:
Code: Select all
# cat wpa_supplicant-wlan0.conf
#
ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
country=US # ISO/IEC alpha2 country code
ap_scan=1

network={
   ssid="myssid"
   #psk="plaintext_password"
   psk=ea08342740de3c321a40c3a13c4c7effd42736023c49371bda137ce1978a0d2e
}
graysky
 
Posts: 537
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: systemd issue or wpa_supplicant issue?

Postby xote » Mon Sep 02, 2019 12:05 pm

Whats that override for? Is it for not-waiting for the wired connection if there is none? The rest i am checking now...
xote
 
Posts: 4
Joined: Fri Nov 11, 2016 11:02 am

Re: systemd issue or wpa_supplicant issue?

Postby karinaty » Sun Nov 10, 2019 10:42 am

i like to connect my RPi 1B+ to a wireless auto clicker word unscrambler jumble solver network. I am using an EDIMAX USB wifi adapter for it, it seems to be detected correctly:
karinaty
 
Posts: 2
Joined: Sun Nov 10, 2019 10:41 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 2 guests