systemctrl wifi script fails on boot

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

systemctrl wifi script fails on boot

Postby okmania » Mon Apr 22, 2013 3:36 am

Hey guys,

I am trying to get my Raspberry Pie to connect to my schools 802.1x network on startup. I have the follow script

$this->bbcode_second_pass_code('', '
#!/bin/bash
/usr/bin/rmmod 8192cu
/sbin/modprobe 8192cu
/sbin/ip link set dev wlan0 up
/usr/sbin/wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
/sbin/dhcpcd wlan0
')

It runs fine from the command line and creates an IP address that I can ssh into.

$this->bbcode_second_pass_code('', '
# /usr/lib/systemd/scripts/wireless
Successfully initialized wpa_supplicant
ioctl[SIOCSIWAP]: Operation not permitted
dhcpcd[305]: version 5.6.7 starting
dhcpcd[305]: wlan0: waiting for carrier
dhcpcd[305]: wlan0: carrier acquired
dhcpcd[305]: wlan0: sending IPv6 Router Solicitation
dhcpcd[305]: wlan0: sendmsg: Cannot assign requested address
dhcpcd[305]: wlan0: broadcasting for a lease
dhcpcd[305]: wlan0: invalid UDP packet from 192.168.2.1
dhcpcd[305]: wlan0: offered 155.246.163.204 from 155.246.151.135
dhcpcd[305]: wlan0: acknowledged 155.246.163.204 from 155.246.151.135
dhcpcd[305]: wlan0: checking for 155.246.163.204
dhcpcd[305]: wlan0: sending IPv6 Router Solicitation
dhcpcd[305]: wlan0: leased 155.246.163.204 for 3600 seconds
dhcpcd[305]: forked to background, child pid 357
')

However, I created a the following systemctl service

$this->bbcode_second_pass_code('', '
# cat /usr/lib/systemd/system/network.service
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device

[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/scripts/wireless

[Install]
WantedBy=multi-user.target
')

It fails, with the following status

$this->bbcode_second_pass_code('', '
# systemctl status network
network.service - Network Connectivity
Loaded: loaded (/usr/lib/systemd/system/network.service; enabled)
Active: inactive (dead) since Thu 1970-01-01 01:00:10 BST; 43 years 3 months ago
Process: 153 ExecStart=/usr/lib/systemd/scripts/wireless (code=killed, signal=TERM)
')


I have a feeling it has to do with the following error even though the script is still successful. Is there any way to get rid of or ignore this error.

$this->bbcode_second_pass_code('', 'ioctl[SIOCSIWAP]: Operation not permitted')
okmania
 
Posts: 4
Joined: Thu Feb 14, 2013 6:30 am

Re: systemctrl wifi script fails on boot

Postby okmania » Mon Apr 22, 2013 4:08 am

I tried using netcfg as suggested IRC, I get a similar error.

$this->bbcode_second_pass_code('', '
# netcfg wpa_suppl
:: wpa_suppl up [ BUSY ]
Successfully initialized wpa_supplicant
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
ioctl[SIOCSIWAP]: Operation not permitted

> WPA Authentication/Association Failed
[FAILED]
')

I think it may be a driver issue. I have the following USB adapter

$this->bbcode_second_pass_code('', '
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
')
okmania
 
Posts: 4
Joined: Thu Feb 14, 2013 6:30 am

Re: systemctrl wifi script fails on boot

Postby pepedog » Mon Apr 22, 2013 3:29 pm

Can you try netctl, it works for me with that dongle
Remove your symlink and any netcfg ones in /etc/systemd/system/multi-user.target.wants
$this->bbcode_second_pass_code('', 'pacman -Sy netctl wpa_actiond')
Run wifi-menu (it scans, connects, and creates a profile)
Make it come up on boot
$this->bbcode_second_pass_code('', 'systemctl enable netctl-auto@wlan0')
It couldn't be easier
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 10 guests