#StackBounty: #linux #networking #wifi RaspberryPi access point on wlan1 stopped working

Bounty: 50

I have a Raspberry Pi 3 with an external WiFi antenna wlan1 set up as an independent IoT access point without Internet connection following this tutorial, using hostap and isc-dhcp server. I omitted the Network Access Translation part.
The AP worked well up to the point when I tried connecting wlan0 to my router at home for accessing the Internet via the GUI.

My /etc/network/interfaces looks like this

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa/supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet static

I setup the daemon

sudo service hostapd start
sudo service isc-dhcp-server start 


sudo update-rc.d hostapd enable
sudo update-rc.d isc-dhcp-server enable  

and this all worked before I started messing with wlan0…. But now on boot when hovering over the GUI it says “wlan1: Disassociated from Pi3AP” and sudo service hostapd status prints

Loaded: loaded (/etc/init.d/hostapd)
Active: active (exited) since ... 31 mins ago
Process: 571 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)

The command

sudo service isc-dhcp-server status

returns an error

raspberrypi dhcpd[778]: receive_packet failed on wlan1: Network is down

When I run

sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf

all works again but nothing on reboot. Can someone spot at where the error lies? Somehow the network GUI and/or the two wlan interfaces seem to be interfering with each other.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.