Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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/hostapdstart.sh

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;

ssid=Caprica
wpa_passphrase=mypassword
interface=wlan0
bridge=br0
auth_algs=3
channel=7
driver=nl80211
hw_mode=g
ieee80211n=1
wmm_enabled=1
logger_stdout=-1
logger_stdout_level=2
max_num_sta=5
rsn_pairwise=CCMP
wpa=2
wpa_key_mgmt=WPA-PSK
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

1 Answer 1

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/hostapdstart.sh
@reboot sleep 25; /fixscripts/hostapdrestart.sh

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.