3 3

NanoPi Neo Air Access Point

Recommended Posts

On 9/2/2017 at 6:38 PM, digitalsuper8 said:

So here's a more detailed explanation for getting the Nanopi Neo Air to act as wifi accesspoint after boot.

I used the FergusL scripts for inspiration and for understanding the contents of the various conf files needed.


So after disabling hostapd and dnsmasq I wrote the following bash script, in the directory /usr/local/bin/. It's called neoaccesspoint.


sudo nano /usr/local/bin/neoaccesspoint



case "$1" in
# Assumption: NetworkManager systemd service is stopped and disabled
# Assumption: dnsmasq is disabled from startup
# Assumption: hostapd is disabled from startup

# We first have to bring wlan0 down
echo "Bringing wlan0 down"
ifdown wlan0

# Then remove the dhd module and load it again in operating mode 2
echo "removing module dhd and doing modprobe dhd op_mode2"
rmmod dhd
modprobe dhd op_mode=2

# we then have to bring wlan0 up again for it to get an IP address
echo "bringing wlan0 up again"
ifup wlan0

# We then bring up hostapd
echo "starting hostapd"
/bin/systemctl start hostapd

# And we start dnsmasq
echo "starting dnsmasq"
/bin/systemctl start dnsmasq

# type any commmand
echo "Stopping MyAP_Startup service: stopping dnsmasq and hostapd and bringing down wlan0"
/bin/systemctl stop hostapd
/bin/systemctl stop dnsmasq
ifdown wlan0

$0 stop
$0 start
exit 0

Then I created a service file in /lib/systemd/system/

sudo nano /lib/systemd/system/neoairaccesspoint.service


the contents:

#This file has to be in /etc/systemd/system/
Description=Manage the neoairaccesspoint script

# Example After statement, this unit only starts after the speficied units are active
#After=syslog.target network.target

ExecStart=/usr/local/bin/neoairaccesspoint start
ExecStop=/usr/local/bin/neoairaccesspoint stop
ExecReload=/usr/local/bin/neoairaccesspoint restart

# We probably don't want to specify the user here


I enabled this service by the following commands:


sudo systemctl daemon-reload

sudo systemctl enable neoairaccesspoint.service


This should do it after reboot:


sudo systemctl reboot


Hope it works for you. Of course you have to have your conf files correct for:








There is an error - service try to start /usr/local/bin/neoairaccesspoint, but file is named neoaccesspoint.

Also at Armbian 5.31 dnsmasq is not as service and must be started with /usr/sbin/dnsmasq. Becouse of that at stop must be killed process by ID dnsmasq like

kill -9 `cat /var/run/dnsmasq.pid`

Edited by Димитър Мазнеков

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
3 3