Neil-3.14159
Posts: 8
Joined: Wed Jul 30, 2014 12:16 pm

hostapd can be started manually, but fails as a service.

Wed Aug 13, 2014 1:32 am

Starting as a service fails:
~ $ sudo service hostapd start
[FAIL] Starting advanced IEEE 802.11 management: hostapd failed!


Starting manually works (and I'm able to connect to the wi-fi)


~ $ sudo hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_sock_recv==l2_sock_xmit=0x0x175c638
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr 00:13:xx:xx:xx and ssid 'BLAH'
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_key_ops
rtl871x_set_beacon_ops
rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, BLAH,15
rtl871x_set_acl
+rtl871x_get_sta_wpaie, bc:d1:d3:xx:xx:xx is sta's address
wlan0: STA bc:d1:d3:xx:xx:xx IEEE 802.11: associated
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
+rtl871x_send_eapol
+rtl871x_send_eapol
rtl871x_set_key_ops
wlan0: AP-STA-CONNECTED bc:d1:d3:xx:xx:xx
wlan0: STA bc:d1:d3:xx:xx:xx RADIUS: starting accounting session 53E207-00000000
wlan0: STA bc:d1:d3:xx:xx:xx WPA: pairwise key handshake completed (RSN)
^Crtl871x_set_key_ops
+rtl871x_sta_remove_ops, bc:d1:d3:xx:xx:xx is sta address removed
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
ELOOP: remaining socket: sock=6 eloop_data=0x175c6a8 user_data=(nil) handler=0x2a000

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: hostapd can be started manually, but fails as a service.

Wed Aug 13, 2014 9:42 am

Are you sure the daemon / service uses the same configuration file?
Looking at the /etc/init.d/hostapd the location of the config file is set in /etc/default/hostapd. In my config file it *does* indeed point to the same file, but you may want to check that on your Pi.


Gr.
Dirk.

Neil-3.14159
Posts: 8
Joined: Wed Jul 30, 2014 12:16 pm

Re: hostapd can be started manually, but fails as a service.

Wed Aug 13, 2014 10:54 pm

Thanks Dirk

You nailed it.
The walkthrough tells you to :

Code: Select all

Run sudo nano /etc/default/hostapd

Find the line #DAEMON_CONF="" and edit it so it says DAEMON_CONF="/etc/hostapd/hostapd.conf"
I fat fingered the path.

Thanks again for your help.

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: hostapd can be started manually, but fails as a service.

Wed Aug 13, 2014 11:35 pm

Great :D

Return to “Troubleshooting”