Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NanoPi Neo Air Access Point

Featured Replies

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

 


#!/bin/bash
PATH="$PATH:/usr/bin/"

case "$1" in
start)
# 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"
#/usr/sbin/dnsmasq
/bin/systemctl start dnsmasq
;;

stop)
# 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
;;

restart)
$0 stop
$0 start
;;
esac
exit 0

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

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

 

the contents:


[Unit]
#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

[Service]
#Type=forking
Type=oneshot
ExecStart=/usr/local/bin/neoairaccesspoint start
RemainAfterExit=true
ExecStop=/usr/local/bin/neoairaccesspoint stop
ExecReload=/usr/local/bin/neoairaccesspoint restart

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

[Install]
WantedBy=graphical.target

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:

 

hostapd.conf

dnsmasq.conf

and

/etc/network/interfaces

 

 

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 Димитър Мазнеков

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.