inapp software

Installing inapp on Armbian.

Update everything after the fresh installation to get the latest kernel and packages:

apt-get update
apt-get upgrade

Disable the NetworkManager deamon and save ~6MB of RAM:

root@nanopineo:~# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed symlink /etc/systemd/system/

Light DHCP/DNS server


When the box is connected to with USB, it provides the host with an IP address:

apt-get install dnsmasq
nano /etc/network/interfaces

The network configuration:

# Native Ethernet interface
allow-hotplug eth0
no-auto-down eth0
iface eth0 inet dhcp

# Ethernet over USB-OTG interface
allow-hotplug usb0
iface usb0 inet static
hwaddress ether 82:bc:09:47:28:a9
# Switch the USB-OTG port to device mode
pre-up /bin/sh -c 'echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role'

The DHCP/DNS configuration:

mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
interface=usb0       # Use interface usb0
listen-address= # Explicitly specify the address to listen on
bind-interfaces      # Bind to the interface to make sure we aren't sending things elsewhere
domain-needed        # Don't forward short names
bogus-priv           # Never forward addresses in the non-routed address spaces.
# Assign IP addresses between and with a 12 hour lease time

# Disable default router (gateway)
# Disable DNS
service dnsmasq start

Light HTTP server


The box hosts a website:

apt-get install lighttpd
mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
nano /etc/lighttpd/lighttpd.conf
service lighttpd start

Simple USB disk automount


The box mounts USB disks automatically:

apt-get install usbmount
nano /etc/usbmount/usbmount.conf
MOUNTPOINTS="/mnt/data [...]"
# Mount read-only

inapp websocket server

To build inapp:

apt-get install qtbase5-dev libqt5websockets5-dev
apt-get install liblttng-ust-dev

cd /home/ina/inapp/build
qmake -qt5 ..
make -j2
make install

Note: since the NanoPi NEO has no battery to save the clock, it will always reset to the same time, and print this kind of message:

/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake -o Makefile ../inapp-0.1/
make: Warning: File '../inapp-0.1/' has modification time 32835463 s in the future

To touch all files in a directory:

find /home/ina/inapp/ -print -exec touch {} \;

Or set the date:

date -s "26 FEB 2017 12:00:00"

Do not use make -j4 because there is not enought RAM on the NanoPi NEO for 4 concurrent build threads. The result is installed in /opt/ina/pp/:



Add to /etc/rc.local:

/opt/ina/pp/etc/ &

if [ -e $STRT_FILE ]
    /bin/bash $STRT_FILE &> $LOGS_PATH/startup.log.txt
start-stop-daemon --start --chdir $BASE_PATH/bin --exec $BASE_PATH/bin/inapp2   \
                  --pidfile $TEMP_PATH/inapp2.$ --make-pidfile             \
                  --background                                                  \
                  -- -i $i -p $port


[1]dnsmasq project page,
[2]lighttpd project page,
[3]usbmount project page,