I also had a HP EliteBook 2530p with the same issue and solved it. To get my WiFi Card unblocked automatically I first followed the instructions from the link shared by Luda.
So first, create the file rfkill-unblock.service
nano /etc/systemd/system/rfkill-unblock.service
and inserted the following:
[Unit]
Description=RFKill-Unblock All Devices
[Service]
Type=oneshot
ExecStart=/usr/sbin/rfkill unblock all
ExecStop=
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Afterwards I enabled and started the startup-Script
systemctl enable rfkill-unblock.service
systemctl start rfkill-unblock.service
In a second step, I edited the /etc/wpa_supplicant/wpa_supplicant.conf
accordingly.
nano /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="Name of AP"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="Passphrase"
}
Finally I followed the archWiki and added the second unit, to bring the interface up and connect it to the AP on startup. Therefore, I created a file called wifi@[interface].service
. [interface] must be replaced by the name (e.g. wlan0
, wls1
, etc.). The name can be retrieved with iw dev
.
In my case I used the following commands:
iw dev
nano /etc/systemd/system/wifi@wls1.service
and put this text into the file.
[Unit]
Description=
#Wants=network.target
#Before=network.target
Wants=rfkill-unblock.service
After=rfkill-unblock.service
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/ip link set dev %i up
ExecStart=/usr/bin/wpa_supplicant -B -i %i -c /etc/wpa_supplicant/wpa_supplicant.conf
ExecStart=/usr/bin/dhcpcd %i
ExecStop=/usr/bin/ip link set dev %i down
[Install]
WantedBy=multi-user.target
I changed the the dependency of this service, so it is not started with the network but after the rfkill-unblock.service. Once again I enabled and started the script.
systemctl enable wifi@wls1.service
systemctl start wifi@wls1.service
In my case, my wifi-device seems to connect on startup.
I hope this is of any help to you.
Can you show the output of
systemctl status rfkill-unblock@all.service
? – bennofs – 2013-08-31T17:08:06.517@bennofs Okay:
rfkill-unblock@all.service - RFKill-Unblock all
Loaded: loaded /usr/lib/systemd/system/rfkill-unblock@.service; enabled)
Active: inactive (dead) since Sun 2013-09-01 00:19:17 CEST; 14s ago
Process: 179 ExecStart=/usr/bin/rfkill unblock %I (code=exited, status=0/SUCCESS)
– Luda' オタク – 2013-08-31T18:22:00.200