LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-25-2015, 08:40 AM   #1
Ali3n0id
LQ Newbie
 
Registered: Nov 2014
Distribution: Mint, Raspbian, Ubuntu 14
Posts: 24

Rep: Reputation: Disabled
HostAPD not starting automatically but works fine manually


Hi all,


I've setup a RasPi server here so it acts as a wireless router, I can run hostapd manually with the -B flag and it works exactly as needed, however it does not start automatically upon boot.

Code:
/etc/hostapd/hostapd.conf

# Basic configuration

interface=wlan0
ssid=MyNetwork
channel=11
#bridge=br0

# WPA and WPA2 configuration

macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=**********
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

# Hardware configuration

driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek
I've got a wifi USB with the Realtek RTL8188CUS chip which I understood was a problem in the past but works fine manually now, however when I do start it manually it does provide a warning - not sure whether it's worth worrying about though or may it be the issue why the program doesn't start upon boot?

Quote:
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
My /etc/default/hostapd file looks like:

Quote:
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
DAEMON_CONF="/etc/hostapd/hostapd.conf"
RUN_DAEMON="YES"

# Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more)
# -K include key data in debug messages
# -t include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""
Many thanks to you lovely people in advance
 
Old 02-25-2015, 02:38 PM   #2
neil
Member
 
Registered: Jul 2001
Location: Kent, UK
Distribution: /Fedora/Debian/Ubuntu/Xubuntu
Posts: 108

Rep: Reputation: 15
Hi,

Not sure if this is allowed? But looks like your answer might be here.

http://unix.stackexchange.com/questi...start-directly

which leads to this:
http://ubuntuforums.org/showthread.php?t=1495554

They got it working anyway.

Regards,
 
Old 02-26-2015, 07:17 AM   #3
Ali3n0id
LQ Newbie
 
Registered: Nov 2014
Distribution: Mint, Raspbian, Ubuntu 14
Posts: 24

Original Poster
Rep: Reputation: Disabled
I've updated the files which others have used succesfully, 'sudo service hostapd start' still fails.

/var/log/syslog provides:

Quote:
Feb 26 13:11:13 Sirius hostapd: wlan0: STA MY MAC ADDRESS IEEE 802.11: associated
Feb 26 13:11:13 Sirius hostapd: wlan0: STA MY MAC ADDRESS IEEE 802.11: associated
Feb 26 13:11:13 Sirius hostapd: wlan0: STA MY MAC ADDRESS RADIUS: starting accounting session 54EE98E9-00000003
Feb 26 13:11:13 Sirius hostapd: wlan0: STA MY MAC ADDRESS WPA: pairwise key handshake completed (RSN)
Feb 26 13:11:13 Sirius hostapd: wlan0: STA MY MAC ADDRESS WPA: received EAPOL-Key 4/4 Pairwise with unexpected replay counter
Feb 26 13:11:14 Sirius dhcpd: DHCPREQUEST for 192.168.0.3 from MY MAC ADDRESS via wlan0: ignored (not authoritative).
Feb 26 13:11:15 Sirius hostapd: wlan0: STA MY MAC ADDRESS WPA: received EAPOL-Key 2/4 Pairwise with unexpected replay counter
Feb 26 13:11:15 Sirius hostapd: wlan0: STA MY MAC ADDRESS WPA: received EAPOL-Key 4/4 Pairwise with unexpected replay counter
Feb 26 13:11:15 Sirius hostapd: wlan0: STA MY MAC ADDRESS RADIUS: starting accounting session 54EF1B50-00000000
Feb 26 13:11:15 Sirius hostapd: wlan0: STA MY MAC ADDRESS WPA: pairwise key handshake completed (RSN)
Feb 26 13:11:19 Sirius dhcpd: DHCPREQUEST for 192.168.0.3 from MY MAC ADDRESS via wlan0: ignored (not authoritative).
Feb 26 13:11:19 Sirius dhcpd: DHCPDISCOVER from MY MAC ADDRESS (MyClientName) via wlan0
Feb 26 13:11:20 Sirius dhcpd: DHCPOFFER on 192.168.1.2 to MY MAC ADDRESS (MyClientName) via wlan0
Feb 26 13:11:20 Sirius dhcpd: DHCPREQUEST for 192.168.1.2 (192.168.1.1) from MY MAC ADDRESS (MyClientName) via wlan0
Feb 26 13:11:20 Sirius dhcpd: DHCPACK on 192.168.1.2 to MY MAC ADDRESS (MyClientName) via wlan0
 
Old 03-04-2015, 04:20 PM   #4
Ali3n0id
LQ Newbie
 
Registered: Nov 2014
Distribution: Mint, Raspbian, Ubuntu 14
Posts: 24

Original Poster
Rep: Reputation: Disabled
Just for anyone with the same issue, I was able to fix the issue by installing the correct drivers with this good guide:

http://www.jenssegers.be/blog/43/Rea...n-Raspberry-Pi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab wont work - runs manually fine alabama78 Linux - Newbie 5 08-02-2010 07:12 AM
crontab wont work - runs manually fine alabama78 Linux - Newbie 5 07-28-2010 01:17 PM
RHEL5 Bind 9.3.4 slave zones not axfr-ing automatically but manual axfr works fine terrastorm Linux - Server 5 12-11-2009 12:25 AM
service start httpd fails, manually starting with same command works jonboede Linux - General 1 02-19-2008 11:45 AM
no signal when starting xorg for the 1st time (but the second time works fine) bungalowbill Linux - Software 0 06-04-2004 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration