Now that the Orange Pi Zero is working, we can do some initial set up. The following assumes you are logged into your Orange Pi Zero using either SSH or the serial console with your everyday account. Remember to hit the enter key after typing in each line of commands.
First we’ll update Armbian to the latest version:
sudo apt-get update
sudo apt-get upgrade
The first time you use sudo in a session, and periodically thereafter, you will be prompted for your pasword. Depending on the speed of your internet connection and the size of the update, the upgrade process can take a while.
Next we’ll set the time zone to match your location. To do so, enter the following command:
sudo dpkg-reconfigure tzdata
Then,
- Use the arrow keys to select your Geographic area and press enter.
- Select a city or region within your time zone and press enter.
Your timezone will be updated and you will be returned to the command line.
Lastly, we’ll set up wifi. This is super handy because once set up, our Orange Pi Zero can be placed anywhere within wifi range where it can be provided with power. To do so,
- Open the file /etc/network/interfaces for editing:
sudo nano /etc/network/interfaces
- Add the following 4 lines to the end of the file, substituting the actual network SSID and WPA password for your wifi network:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid <Your Access Point Name aka SSID>
wpa-psk <Your WPA Password>
- To save your changes, hit the key combination Control+O.
- To quit back to the command prompt, hit the key combination Control+X.
- Bring up your wifi connection with the following command:
sudo ifup wlan0
You can find out the IP address assigned to your wifi connection by typing:
sudo ifconfig wlan0
The assigned IP address should appear immediately after the text inet addr:.
You can observe the signal strength and other details of your wifi connection by entering:
sudo iwconfig wlan0
To monitor the temperature, CPU speed and other interesting details of your Orange Pi Zero type:
sudo armbianmonitor -m
(To quit and return to the command line, hit the key combination Control+C.)
To cleanly exit your PuTTY session while leaving your Orange Pi Zero running, type:
exit
To cleanly shut down your Orange Pi Zero before disconnecting power, type:
sudo halt
To reboot your Orange Pi Zero, type:
sudo reboot
Here are just some things you can do now that your Orange Pi Zero is operational:
- Check out the Fine Tuning section of the Armbian user guide for additional configuration you can perform.
- Your router could decide to assign a different IP address to your Orange Pi Zero ethernet and wifi interfaces in future. If that happens, you’ll have to rediscover the IP address(es) of your Orange Pi Zero… But many routers have the ability to assign fixed (aka static) IP addresses. To do this, you need to know the hardware address of the interfaces on your Orange Pi Zero. To discover these type:
sudo ifconfig eth0 | grep -i hwaddr
sudo ifconfig wlan0 | grep -i hwaddr
The hardware address will be the jumble of hexadecimal numbers separated by colons, e.g “8c:ff:a3:06:b5:1b”, at the end of the line. In your router configuration you need to add a mapping between the hardware address and the fixed IP address to be assigned to the interface.
- Add a heatsink to H2+ chip on your Orange Pi Zero - it runs pretty hot without one.
- Put in your Orange Pi Zero in a nice box.
- Track aircraft in your area with a cheap USB DVB-T television receiver dongle.