Orange Pi 2G – IOT – OS Installation and WIFI Setup using Serial Port

Share this now

Orange Pi has come out with its own counter to the Raspberry Pi Zero W. The Orange Pi 2G-IoT have an 802.11n Wi-Fi and Bluetooth 2.1 at the same time it provides a 2G Mobile Radio for cellular connectivity. The 2G radio supports GSM/GPRS data connections, and there is a SIM card slot on the underside of the board. Now I will explain How to install ubuntu and Setup up wifi in Orange Pi 2G IOT

Watch The Video Tutorial

Writing Image on to the SD Card




Insert your Micro SD card into your computer. The size of card should be larger than the OS image size, generally 4GB or greater.

Format the SD card. Download the SD card format tool such as SDFormatter from

Download SD Formatter

Unzip the download file and run the setup.exe to install the tool on your machine
In the “Options” menu, set “FORMAT TYPE” option to QUICK, “FORMAT SIZE ADJUSTMENT” option to “ON”.

Click the “Format” button.

Download the OS image from the Downloads webpage.
Orange Pi OS Downloads

Unzip the download file to get the OS image. Right click on the file and choose “Extract all”.

Download a tool that can wirte images to an TF card, such as Win32 Diskimager from:
Download Win32 Disk Imager
Open the unzipped image file.
Click Write button. Wait patiently to successfully complete writing.

Initiating Serial Communication

If you don’t have an LCD display, you don’t have to buy one to get this working. I will be using the serial port to connect to orange pi and setup up WiFi so that you can ssh into it from any device. I had an old USB to TTL serial converter, so i will be using it to connect to orange pi and connect to my network.

 

This is my USB to TTL serial converter which, I bought it from amazon. Its a really usefull thing If you want one, go ahead and buy it.

We will be using these 3 pins here – tx rx and gnd pins.

If you are planning to boot from the SD card, you should change the position of this pin near the wifi antenna, like I did in the above video. This is very important.

Connections

The Connections are pretty simple.
Orange Pi 2G IOT                    TTL Serial Converter
gnd———————————gnd
tx———————————–rx
rx———————————–tx

 

Now connect the converter to laptop and open putty.
Select ‘serial’, set the correct COM port in putty and set baud rate to 115200.



Now connect the power cable to Orange pi.
If everything is done correctly, the red led will glow when the pi start to boot up from the SD card.

The login username is ‘root’ and password is ‘orangepi’.

Setting Up WiFi

There is a tool called WPA_CLI which can be used to create and manage wifi networks.

First execute

add_network

the output will be an integer. This is the network number. (In my case it was 2)
now run

set_network 2 ssid “your network name”set_network 2 psk “your password”

now

select network 2

Now its connected to our network but it may not get the IP address. To get the IP address, execute

dhclient

Now check the IP address,

ifconfig

If you got the IP, Congrates everything is done!! Now have fun!!

Alternate Method

Share this now

One comment

  1. I enjoy you because of all of your labor on this blog. My niece loves going through investigations and it is easy to understand why. We know all relating to the dynamic form you offer sensible things through the blog and in addition inspire participation from others on this concept plus our favorite child is actually becoming educated so much. Take pleasure in the rest of the new year. You’re the one performing a useful job.

Leave a Reply

Your email address will not be published. Required fields are marked *