Sunday, May 28, 2017

How to install and setup Serial - WiFi for Orange PI

1. Introduction
- The price of Orange Pi is cheap, but the hardware is fine. It would be a good option for your project where price is considered. You can refer here.
- In this tutorial I will show steps to setup Armbian OS for Orange Pi Lite. You can refer this tutorial for the other models.
- Armbian OS have 2 versions: Command line (no GUI) and Desktop (GUI).
- This tutorial has 3 steps:
Step 1: Format memory sdcard and Write image to memory sdcard
Step 2: Setup Serial for Orange Pi
Step 3: Setup WiFi for Orange Pi 
- Hardware:
  + 1 microSD reader
  + 1 memory sdcard
  + Orange Pi Lite with 5V 2A power adapter
  + 1 USB-TTL and 3 Female-Female jumper to connect pins RX, TX, GND between USB-TTL and Orange Pi Lite
Step 1
- Download Armbian.img here
  Figure: choose Orange Pi in list of Armbian supported boards
Figure: I choose Orange Pi Lite with command line version

For Windows users:
+ Write image to memory sdcard using Win32 Disk Imager (

Figure: Win32 Disk Image write image to microSD
For Linux users:
+ List all hard disks using "sudo fdisk -l" and look for Disk that is your microSD. In my case it is "Disk /dev/sdb"
+ Format using command "sudo mkfs.vfat -I /dev/sdb" or Right click mouse on the disk and choose Format.

+ Write image to microSD using:
"sudo dd bs=1024 if=Armbian.img of=/dev/sdb"
- After finishing writting, plug the microSD to Orange Pi

Step 2: Setup Serial for Orange Pi

Figure: Serial pins on Orange Pi Lite
 Figure: USB-TTL
[Pi TX - USB TTL RX]  
 Figure: Orange Pi - USB TTL
Using Putty Serial to create connection with Orange Pi
You can download it here:
Ubuntu: using command "sudo apt-get install putty"
Debian: using command "sudo aptitude install putty"
Figure: Configure Putty Serial with Speed 115200
Figure: Serial screen
Note: first time login, OS will request us to change default password(1234) of root user, just follow it.
Step 3: Setup WiFi for Orange Pi
- Run command "nmcli radio wifi on" to turn on WiFi.
- Run command below to connect to WiFi
"nmcli d wifi connect your_WiFiSSID password your_WiFiPassword
Now you do not need USB TTL any more. We can use SSH to connect to Orange Pi using Putty or command line "ssh root@" to login as root
Figure: You can search a mobile application called "Fing" (on Google Play or Apple Store) to scan the IP address of Orange Pi