Table of Contents
About the Orange Pi Zero
The Orange Pi Zero is a single board computer by Xunlong. It is an excellent low-power headless server for low-throughput applications.
What I like about it:
- It’s cheap. The model featured here can be purchased from the Xunlong store on AliExpress for around $13 including shipping.
- It’s small. At 48mm x 46mm x 16mm, it weighs in at only 26g.
- It’s powerful. It punches above it’s weight by packing an Allwinner H2+ SoC with a 1.296GHz quad-core Cortex-A7 CPU and a Mali400 MP2 GPU clocked at 600MHz.
- It’s fully loaded. A USB port, built-in Ethernet and Wi-Fi, plenty of pins to play with, audio, video, etc…
- It has a slow connection. The Ethernet connection is only 10/100Mbps. The H2+ SoC is actually a variant of the H3 without the gigabit MAC, so that’s all it can handle.
- Video support is questionable. You may have to mutter strange incantations under a full moon in order to get video working.
- Orange Pi Zero
- Micro SD card, Class 10+, at least 4GB
- USB charger rated for at least 2 amps, or a 5 volt 2 amp power supply
- Micro USB cable
- Router with an availible Ethernet port or 802.11 B/G/N network
- Computer with a Micro SD reader
Note: This tutorial assumes you are using a computer running Linux. If you are running Windows, follow this tutorial instead.
Preparing the Micro SD Card
Download the Debian_stretch_next.7z archive from the Armbian downloads site.
Extract the downloaded archive:
7z x Armbian_5.38_Orangepizero_Debian_stretch_next_22.214.171.124z
Find the micro SD card:
Write the extracted image to the micro SD card:
# Where sd(?) is the micro SD card: sudo dd if=Armbian_5.38_Orangepizero_Debian_stretch_next_4.14.14.img \ of=/dev/sd(?) \ status=progress
All together now:
Slide the micro SD card into the slot on the bottom of the Orange Pi and it’s ready to roll.
There are three ways to connect to the Orange Pi: SSH, virtual serial port, and UART.
- Use SSH if the Orange Pi will be connected to a network with Ethernet.
- Use the virtual serial port to configure the Orange Pi with USB.
- The UART requires additional hardware and will not be covered in this post.
There are also three ways to power the Orange Pi Zero: USB, Power over Ethernet, and GPIO. The most common method is USB and requires only a standard micro USB cable and charger. GPIO can power the board by suppling +5 volts to pins 2 or 4 and ground to pins 6, 9, 14, 20, or 25 of the 2x13 header. Power over Ethernet requires a few modifications.
The Orange Pi will take about 30 seconds to boot. If the green light does not turn on or the board experiences stability issues, check the power supply first. If the power supply is verified to supply 5 volts at 2 amps, check the micro SD card. Low quality SD cards will not work, period.
Connecting with SSH
Connect the Orange Pi to a network via Ethernet. Log in to the DHCP server’s (likely the router’s) administration portal and find the Orange Pi in the list of devices:
After finding the IP address, connect with
# Replace ???.???.???.??? with the Orange Pi's IP address ssh root@???.???.???.???
SSH will first ask to verify connecting to a new host. Type
return to proceed. At the password prompt, enter 1234.
Connecting with the Virtual Serial Port
Armbian presents a virtual serial port over the Orange Pi’s USB port. To use this port, the board will have to be powered via GPIO or Power over Ethernet. Powering the Orange Pi over USB with a computer will likely result in the Orange Pi recieving insufficient power.
List tty devices with
ls tty*, before and after connecting the Orange Pi. Connect to the new tty with minicom, picocom, or screen.
At the login prompt, login with user root and password 1234:
After logging in, the setup script will direct a root password change and setup a new user. Follow the prompts and be sure to remember your new passwords.
Log out with
ctrl+d and log back in as the new user.
By default, Armbian grabs a dynamically assigned IP address on the ethernet port. Set a static IP address in /etc/network/interfaces:
iface eth0 inet static address 10.0.0.2 netmask 255.255.255.0 gateway 10.0.0.1 dns-nameservers 126.96.36.199
The CPU on this board runs fairly hot, however this is easily solved by reducing the voltage supplied to the CPU. The CPU is fed 1.1V when the frequency is at or below 920MHz, or 1.3V above it. The CPU frequency can be capped in /etc/default/cpufrequtils:
ENABLE=true MIN_SPEED=240000 MAX_SPEED=912000 GOVERNOR=ondemand
Changes are applied by restarting cpufrequtils service.
apt to manage packages and updates. Update using
sudo apt-get update && sudo apt-get upgrade
Armbian can be further configured with the Armbian Configuration Utility. Launch the tool with