1

Problem

I am using raspberry 3B. I want to make it as a wireless router. I added TP-Link TL-WN725N as an extra wireless device which uses wlan1 as interface name. The device works flawlessly as a client.

Then, I have followed this tutorial. up until this part:

sudo systemctl unmask hostapd
sudo systemctl enable hostapd
sudo systemctl start hostapd

but, it returns :

Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.

So, I tried systemctl status hostapd.service , it returns:

● 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 Wed 2020-04-22 22:35:39 BST; 1s ago
  Process: 2804 ExecStart=/usr/sbin/hostapd -B -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} (code=exited, status=1/FAILURE)

then journalctl -xe:


Apr 22 22:36:40 raspi-test systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.

current configuration

my /etc/hostapd/hostapd.conf:

interface=wlan1
driver=nl80211
ssid=raspitest
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

my /etc/dhcpcd.conf:

interface eth0
static ip_address=192.168.0.16/24
static routers=192.168.0.1
static domain_name_servers=9.9.9.9 149.112.112.112

interface wlan1
static ip_address=192.168.4.1/24
nohook wpa_supplicant

what should I do?

ps:
I always stuck with hostapd, 2 years ago, I posted this to raspberry github. they respond very slowly, after therir fix on the documentation, now this problem emerges.

  • Try running hostapd manually from the command line: sudo hostapd /etc/hostapd/hostapd.conf. You could also try with the -d or -dd options to print more debug messages. Right now, it's hard to tell what the problem is because running with systemctl doesn't let you see the logs very easily. If you run the command manually, you might be able to see some error messages that would be helpful. – Breq16 Apr 23 at 7:20
  • Please edit your question provide complete output of systemctl status hostapd.service and journalctl -xe --unit=hostapd.service. – Ingo Apr 23 at 10:06

Your Answer

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

Browse other questions tagged or ask your own question.