A new generation of mini pc, is the slogan of the of the manufacturer of the Orange PI zero board.
Indeed, its only the half of the size of a normal Raspberry PI board and the half of the weight.
Solid performance for that size and price – 7,60$.
I think its a really good choice for inexpensive portable linux system.
Board size: 48 mm × 46mm
ARM: A7 Quad core 1.2 GHz
RAM: 256/512 MB
NIC: 100 Mbit ethernet port
WIFI: IEEE 802.11 b/g/n module is integrated (antenna included)
USB: one 2.0 usb port
Storage: microSD card (Max. 32GB)
LEDs: Power led & Status led
There are two different models of Orange PI zero available. For memory hungry use cases, 512MB RAM version will be the best choice.
I have the 256MB version. I will present also some kernel and system optimisations for low memory usage.
DC 5V, 1A
The most common way is to install Debian stretch or Ubuntu Bionic to Orange PI, its up to you which distribution you choose. My decision fell on to Debian.
Both images can be downloaded from armbian and flashed with etcher to a microSD card.
After flashing the image to microSD card you have to boot the PI with a connected ethernet cable to become access on it, you will be able to see the DHCP-request and the leased IP address to the PI on your router.
On a linux box it’s looks like this one:
Dec 8 18:04:52 dhcpd: DHCPDISCOVER from 02:42:2a:0d:6b:45
Dec 8 18:04:53 dhcpd: DHCPOFFER on 10.1.100.65 to 02:42:2a:0d:6b:45 (orangepizero)
The default credentials for the first login are:
After successful login, you will be requested to change the default password and create a user, please avoid to login with root.
First things first
Set correct timezone:
apt update && apt upgrade
Disable NetworkManager and switch to static configuration. Wired and wireless configuration examples are presented below.
Less running software will save you memory and if you plan to run autonomous, from batteries, this is the first step to optimise the power consumption.
systemctl disable NetworkManager systemctl stop NetworkManager
Static configuration for the ethernet connection can look like this one:
1 2 3 4 5 6 7
cat /etc/network/interfaces auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 iface eth0 inet dhcp
Alternative to be more flexible and network cable independent, switch to wifi-connection:
1 2 3 4 5 6 7 8 9
cat /etc/network/interfaces auto lo iface lo inet loopback auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid secondfloor wpa-psk myssidpassword123
With a static ip address, you will always know the IP of your Orange PI without looking for it on your router every time you wish to establish a connection.
1 2 3 4 5 6 7 8 9 10 11 12
cat /etc/network/interfaces auto lo iface lo inet loopback auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 10.1.100.123 netmask 255.255.255.0 gateway 10.1.100.1 wpa-ssid secondfloor wpa-psk myssidpassword123
With a static network configuration, there is also no need for the DHCP-client which is permanent running to be in touch with the DHCP-server.
Power consumption optimisations
I decided to buy a 256 MB version of Orange PI, to have enough memory for my applications it make sense, to disable everything, what is not highly required.
1 2 3 4 5
systemctl disable NetworkManager systemctl disable ntp systemctl disable haveged.service systemctl disable rsyslog.service systemctl disable systemd-journald.service
To adjust the time, you can use a cron-based mechanism to run a ntpdate periodically.
Logging is a #1 killer for a microSD card, the best way will be to disable any kind of logging to extend the lifetime of your microSD card.
A older post for BeagleBone power consumption optimisation is a pretty good base for this part.
Install cpufrequtils to manage the cpu frequency and get detailed information about the possible frequency.
apt install cpufrequtils
cpufreq-info is marked with the most relevant keys:
So now you know the possible frequency units and you can perform the optimisation tests.
# 240MHz cpufreq-set -f 240000
Proof of concept with usb power consumption meter:
At any time in any case without network connection, its possible to establish a serial connection to the Orange PI board.
USB-to-Serial converter can help to access a board if the network gets broken or misconfigured firewall is locked out.
orange pi : USB-to-Serial converter
ground : ground
RX : TX
TX : RX
screen /dev/tty.usbserial 115200