Login to the Orange Pi

From Orange Pi
Jump to: navigation, search

Using HDMI cable

1. Get the basic instruments: one Orange Pi with prepared OS SD card, a HDMI cable, a monitor, a micro USB power adapter, a keyboard and a mouse.
We use the HDMI cable in the figure below.
HDMI Cable
2. Connect the Orange Pi and the monitor using the HDMI cable as showed in the figure below.
HDMI Connection
3. Power on Orange Pi. You can see boot screen and desktop of Orange Pi. Figure below is in the OS of Rasspberry Pi for Orange Pi case.
Boot Screen Desktop of RP

Using AV out

Plug your AV cable( color generally is yellow) into the AV port (yellow) of the Orange Pi, and the another side into you TV. Power on the Orange Pi. If there is no display in the monitor. You may need check the script.bin file.

Please see Here.

Using SSH

Using SSH to login Orange Pi for remote operation is very convinient, safe and of high efficiency. And it is not necessary to use extra monitor linking to Orange Pi with HDMI cable in some situation, for example, Orange Pi acting as a home server. The SSH server is installed by default and starts with boot on Raspbian for Orange Pi and Lubuntu for Orange Pi operating system. So in general, you don't need to install SSH on your Orange Pi.
1. If the SSH is not installed, you can install it using the command below.

sudo apt-get install openssh-server

2. Check whether the SSH has started.

ps -e | grep ssh

If sshd is exist in the output, the SSH sever has started. If not, you should start it with your own hand:

sudo /etc/init.d/ssh start

Stop the SSH server:

sudo /etc/init.d/ssh stop

Restart the SSH server:

sudo /etc/init.d/ssh restart

3. Configure the rc.local file so that you can set the SSH server to start with boot:

sudo nano /etc/rc.local


/etc/init.d ssh start

before exit 0.
Now you need to make sure your Orange Pi and your computer connect to the same local internet.
4. Login your Orange Pi.
4.1 Under windows, download a free SSH client such as Putty to remote login our Orange Pi.
Start Putty on your computer and then enter the IP address of your Orange Pi. And then click Open to connect to your Orange Pi. And then enter the username and password to complete verification.
Putty log in.png
4.2 Under Ubuntu, it is easier to login your Orange Pi using ssh command only:

ssh remote_username@remote_host

remote_username is the user name on Orange Pi such as pi, the remote_host is the Orange Pi IP address.

Using VNC

In the previous section, we saw how SSH can be used to control remotely your Orange Pi without an HDMI display, as well as being safe, convenient and efficient. Another way you can try this is using VNC to display the Orange Pi desktop on your PC through IP.
When the VNC service is on, a .vnc file will be generated. This file contains the information about VNC service. The location and path of .vnc is generally to be found at either [/home/username] or [/root] according to the user's permissions.
The following steps will guide you in configuring VNC if you are the root user.
1. Install the VNC Server

sudo apt-get install tightvncserver

2. Start the VNC Server and set the password


This will require you to enter a vnc password (at least 6 numbers) for the first time, and then ask you if you like to enter a view-only password(y/n), enter n to skip this step.
You can check whether the VNC service is set up successfully.
The default pot is 5901.
3. Configure the .vnc/xstartup script
You should configure the xstartup script to display the desk in VNC client. You can choose which desktop system session to use.
Edit the xstartup script to enable different desktop sessions.

sudo nano /root/.vnc/xstartup

3.1 Gnome. The most powerful desktop session.
3.2 X-Window. The simplest desktop session.
3.3 Xfce 4. Linux like desktop session.
After modifying the xstartup script you should restart the vnc service to make the modification work. First kill the current VNC service.

vncserver -kill :1

And restart the modified VNC service.

vncserver :1

4. Use VNC-View on your computer to login in your Orange Pi. Enter the Orange Pi's IP and port. The port of desktop 1 is 5901, desk 2 is 5902 and so on. You can use ifconfig command to get the IP address.

This is a X-Window display.
On X-Window, if using the Chromium web browser, you should start the VNC service under normal user and then use VNC-View to login Orange Pi. Don't use the root user to start the VNC service.
Summary of Commands
The commands to start the VNC service:

vncserver :1

The commands to stop the VNC service:

vncserver -kill :1
tightvncserver -kill :1

The command to change the password:

ps -axjf | grep vnc


Using TTL serial port

This section will introduce you to use TTL serial port to login to the Orange Pi.
1. Check the UART interface on the Orange Pi.
UART port Definition.png
2. Use the PL2303 to connect the Orange Pi and the computer.
The PL2303 operates as a bridge between one USB port and one standard RS232 Serial port as show in below figure. There are pins for 3.3V, TXD, RXD, GND and 5V on the PL2303 as shown here.
The table below shows the connection between Orange Pi and PL2303.

The connection between Orange Pi and PL2303
Pin on Orange Pi Pin on PL2303
GND port GND
TX port RXD
RX port TXD

Attention: 1.TX on one device is connected to RX on the other and vice versa. 2. The power line(red one, 5V) is NOT connected. The connection between Orange Pi and PL2303 is showed below.
3. Software on the computer
3.1 In Linux, the driver for PL2303 is already in the system.
Install the minicom software.

sudo apt-get install minicom

When the installation has finished, setup the minicom:

sudo minicom -s

Select the "Serial port setup" option
Modify the parameter :

A -   Serial Device:   /dev/ttyUSB0  
F -   Hardware Flow Control:   No

And save and then select the "save setup as dfl" option
Save the setting and select "Exit from Minicom" to exit
3.2 In Windows, the driver may already have been automatically installed. If not, you can install it yourself. You can try TeraTerm or Putty to use the TTL serial port.