I am trying to set up a small wifi network (offline) using the guide found here. https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

Below I have given my terminal window to show my process and the problem I am having

pi@raspberrypi:~ $ sudo su root
root@raspberrypi:/home/pi# nano /etc/hostapd.conf
root@raspberrypi:/home/pi# nano /etc/dhcpcd.conf
root@raspberrypi:/home/pi# sudo systemctl restart dhcpcd
root@raspberrypi:/home/pi# nano /etc/dnsmasq.conf.orig 
root@raspberrypi:/home/pi# mv /etc/dnsmasq.conf.orig /etc/dnsmasq.conf
root@raspberrypi:/home/pi# nano /etc/dnsmasq.conf
root@raspberrypi:/home/pi# systemctl reload dnsmasq
root@raspberrypi:/home/pi# sudo nano /etc/hostapd/hostapd.conf
root@raspberrypi:/home/pi# sudo nano /etc/default/hostapd
root@raspberrypi:/home/pi# systemctl unmask hostapd
syroot@raspberrypi:/home/pi# systemctl enable hostapd
Synchronizing state of hostapd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hostapd
systemctl root@raspberrypi:/home/pi# systemctl start hostapd
Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.

root@raspberrypi:/home/pi# systemctl status hostapd.service
● hostapd.service - Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
   Loaded: loaded (/lib/systemd/system/hostapd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2019-05-17 12:12:37 BST; 1s ago
  Process: 3140 ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

May 17 12:12:37 raspberrypi systemd[1]: hostapd.service: Control process exited, code=exited status=1
May 17 12:12:37 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.
May 17 12:12:37 raspberrypi systemd[1]: hostapd.service: Unit entered failed state.
May 17 12:12:37 raspberrypi systemd[1]: hostapd.service: Failed with result 'exit-code'.
root@raspberrypi:/home/pi# systemctl start hostapd

I have re-imaged and started again twice! Anyone able to help?

  • You claim to have followed a Foundation tutorial, but what you have posted never appears in the tutorial. Thy running as posted. – Milliways May 17 '19 at 13:01
  • What are you talking about? – GigaJoules May 20 '19 at 7:05
  • Read down beyond hostapd install that has already been run. I ran as posted twice – GigaJoules May 20 '19 at 7:31
  • NOTHING in the tutorial tells you to run as root - indeed no responsible advice would suggest this. The tutorial works when run as posted. – Milliways May 20 '19 at 7:55
  • Turns out I had missed the removal of a comment hash at Find the line with #DAEMON_CONF, and replace it with this: DAEMON_CONF="/etc/hostapd/hostapd.conf" – GigaJoules May 20 '19 at 8:53

If you have problems getting hostapd to work together with all the other additional components, then there is way to setup what you want without it. With build-in systemd-networkd you have all needed components without installing additional helpers. How to do it you can look at Setting up a Raspberry Pi as an access point - the easy way.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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