Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently setting up a WiFi hotspot for the padres using their NAS with WiFi card.

Setup: Ubuntu 13.10

Hostapd is bridged with eth0 (br0), and works great if manually restarted

sudo service hostapd restart
* Stopping advanced IEEE 802.11 management hostapd [ OK ]
* Starting advanced IEEE 802.11 management hostapd [ OK }

However, upon reboot the SSID is visible, but when trying to connect I am presented with (authentication error / incorrect password) from wireless devices.

If the above command is executed over ssh/local terminal, then all devices connect perfectly.

In order to work around this, I tried adding a delayed cron job to restart the service;

@reboot sleep 30; /fixscripts/

I even wrote a script to stop the service and start it 60 seconds later in a similar format to above. (I believe the scripts did execute, because the SSID would dissapear, and reappear 60 seconds later).

However as per the original issue wifi devices were still presented with the authentication errors, and as before if I log on and manually restart the service it works!

Below is my hostapd.conf;

wpa_pairwise=TKIP CCMP

share|improve this question
Did you turn off network-manager? If you do not, it will try to get hold of wlan0 – MariusMatutiae Nov 17 '13 at 14:04
When turned off, the SSID takes ages to appear and none of my devices can connect, even after a manual restart. – Alex Nov 17 '13 at 15:36
Did you configure the bridge in your /etc/network/interfaces file? – MariusMatutiae Nov 17 '13 at 15:47
Yes the bridge is up & running, bridged eth0 & eth1 as well as hostapd adding wlan0 to bridge. Ethernet runs smoothly, and wifi can use the bridge when devices connect. – Alex Nov 17 '13 at 17:36

The fix below 'worked' for me, however devices would disconnect after a short period of time. Ultimately I clean installed Ubuntu 12.04 and all seems to work fine.

  1. Remove the hostapd service from the rcX files to prevent the service from automatically starting;

    sudo update-rc.d -f hostapd remove

  2. Provide a Cron Job to start the service shortly after boot

  3. Then provide a Cron job to restart the service shortly after starting

To modify Cron file;

sudo crontab -e

Here are the Cron Jobs I added;

@reboot sleep 10; /fixscripts/
@reboot sleep 25; /fixscripts/

This starts the service 10 seconds after boot, and then restarts it 15(25-10) seconds later.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .