Open main menu

Wiki-Orange Pi β

Changes

Orange Pi I96

12,596 bytes added, 15:33, 21 June 2022
no edit summary
<br>
=== '''Step 4: Turn off your Orange Pi correctly''' ===
<br>
 You can use the shutdown button on the interface to safety close the Orange Pi. You can also close the system by entering command in the shell:<br>
sudo halt<br>
or<br>
sudo shutdown –h<br>
 It will be safety to turn off the Orange Pi. If directly use the power button to shut down the system may damage the file system on TF Card. After the system is closed, the power can be cut off by more than 5 seconds’ press. If all the above steps run, then your Orange Pi could shut down.<br>
<br>
=== '''Initialize settings for your Linux system''' ===
<br>
 You need to make some basic settings when it is you first time to use Linux on Orange Pi i96, like wifi setting, audio setting, user setting. <br>
<br>
'''1)Wifi setting on serial port'''<br>
<br>
 After used serial to login system, entered the password the system will prompt you to use the orangepi_config tool to make some basic setting, including wifi setting. You could use the following command in the order line:<br>
sudo orangepi_config<br>
> wifi settings<br>
<br>
 This setting include the functions of WIFI statue setting, wifi searching and connect to AP. You could use this method to set wifi.<br>
<br>
'''2)Use ssh to connect wifi'''<br>
<br>
 You need to use two cellphones if you want to use this function. Please refer to this: <br>
 Orange Pi i96 is defaulted to connect the hotspot of orangepi, the password is orangepi. Use another cellphone’s hotspot function, setting the hot spot name as orangepi, password as orangepi. It will connect to orangepi hotspot default after booting the system. After that, use another cellphone to connect the hotspot, and use “wifi assistant” to check the IP of Orange Pi i96.<br>
 After getting the IP of Orange Pi i96, you could use SSH remote login in Linux PC or Windows PC. Command as following: <br>
 ssh <span style="color:#42b3ee;">[email protected]</span><br>
 Password: orangepi<br>
 After enter the system via ssh, run the following command to connect to router: sudo orangepi_config<br>
<br>
=== '''Write Android into Nand''' ===
<br>
 Orange Pi i96 is supported boot from Nand, and also supported update Android in Nand.<br>
<br>
'''1)Boot Android from NAND'''<br>
<br>
 Switching the boot mode into NAND via short jumper cap.
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img16.png|400px]]</div>
<br>
 Power it on, Orange Pi i96 will boot from NAND.<br>
<br>
'''2)Update Android in NAND'''<br>
<br>
* Short jumper cap to switch the system to boot from NAND, set toggle switch into 1234 UP, 5678 Down like the following:<br>
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img17.png|400px]]</div>
<br>
'''3)Install writing tool on Windows '''<br>
<br>
 For now Nand writing tool could only support working on Windows, you could download the tool from official website: http://www.orangepi.online/downloadresources/
<div>[[文件:Orange-pi-i96-img18.png|800px]]</div>
<br>
'''4)Install USB driver on Windows'''
<br>
 Unzip the tool file, install the USB driver, here is the path: <br>
*/OrangePi_I96_Toolschain/USB_Driver/USB-driver/<br>
 You should install it according to your PC, if your PC is 32bit, then install x86 USB driver, if it is 64bit, then is x64 USB driver.<br>
<br>
'''5)Download Android Nand image'''
 Here is the ink for Orange Pi i96 Nand version image:<br>
 http://www.orangepi.online/downloadresources/
<div>[[文件:Orange-pi-i96-img19.png|800px]]</div>
<br>
'''6)Use writing tool'''<br>
<br>
Use writing tool to write NAND:
*/OrangePi_2G-IOT_Toolschain/OrangePi_2G-IOT_NandUpdate_Tools/OrangePi_2G-IOT_Update.e
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img20.png|600px]]</div>
<br>
 Click “load BIN” to import the image of NAND version into writing tool. After that, click Download button to download the image. Meanwhile, the tool is waiting for the download link of Orange Pi i96.<br>
<br>
'''7)Download Image'''<br>
<br>
 Prepare an Android USB to DC cable, first connect to the OTG port of Orange Pi i96, then push on the power button for 5s, and connect the cable to the Windows PC. Meanwhile, the screen will indicate that connect successful and downloading. It will take around 3min to finished downloaded, after that, reboot the system and then the system will run on the update Android.<br>
 Note: If it could not download, please check the the shorting cap and switch.
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img21.png|600px]]</div>
<br>
=== '''Android in no screen ADB mode ''' ===
<br>
* ADB setting: Set the toggle switch into 1234 “UP”, 5678 “Down”, the system will switch into adb model, in this model, the USB is unable.
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img22.png|600px]]</div>
<br>
* Connect to the OTG port of Oragne Pi I96 with the USB to DC cable, the other side connect to PC, push the power button and then the system will be Android.
* If the PC haven’t set on adb, then please refer to the teaching method of Ubuntu and Windows adb in internet. Use adb command in the PC terminal to connect the adb:
adb shell
* After connect to OrangePi I96 via adb, you could refer to the adb debug method from the internet to enter into Orange Pi i96
We would recommend you use Plug-in Vysor in Chrome browser, this tool could enter Android via adb:
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img23.png|600px]]</div>
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img24.png|600px]]</div>
<br>
=== '''Universal software configuration ''' ===
<br>
'''1)Change default account'''<br>
<br>
 The default log-in account and password is orangepi/orangepi or root/orangepi. It is recommended to modify the default orangepi account to your own account for secure sake. Take changing into Zhangsan as a sample. Steps are as follows:<br>
a.Use root account to login Orange Pi<br>
b.$ usermod -l zhangsan orangepi <br>
Change account of orangepi into Zhangsan
<div style="padding-left:100px;">[[文件:Orange-pi-i96-img25.png|600px]]</div>
<br>
c.$ groupmod -n zhangsan orangepi <br>   
Change group
<div style="padding-left:80px;">[[文件:Orange-pi-i96-img26.png|600px]]</div>
<br>
d.$ mv /home/ornagepi  /home/zhangsan<br> 
Change directory of original orangepi
<div style="padding-left:60px;">[[文件:Orange-pi-i96-img27.png|600px]]</div>
<br>
e.$ usermod -d /home/orangepi  orangepi <br>
Set this directory into orangepi user's home directory
<div style="padding-left:40px;">[[文件:Orange-pi-i96-img28.png|600px]]</div>
<br>
f.$ cat /etc/passwd <br>
It should be shown as following:
<div>[[文件:Orange-pi-i96-img29.png|800px]]</div>
<br>
 After the modification of the above steps, you could use the new account Zhangsan to log in.<br>
<br>
'''2)System source configuration '''<br>
<br>
 This instruction will take Ubuntu as an example:<br>
a.Open the source file<br>
$ sudo vi /etc/apt/sources.list
<div>[[文件:Orange-pi-i96-img30.png|800px]]</div>
<br>
b.Edit source file<br>
 Replace the source file with your favourite source. Take an example of Ubuntu 16.04 on Zhonkeda source:<br>
 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe<br>
 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe<br>
 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe<br>
 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe<br>
 deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe<br>
 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe<br>
 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe<br>
 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe<br>
 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe<br>
 deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe<br>
Note: xenial is the version of the code name in this source, if the other version of Ubuntu needs to replace the corresponding version code which can be found on the internet.<br>
<br>
'''3)Enter the system via SSH'''<br>
<br>
 You could refer to the previous charter 5. 2)Use SSH to connect Wifi. <br>
<br>
'''4)Modify the size of ext4 file system'''<br>
<br>
 It could promote system performance via expanding the rootfs partitions of file system after writing image, which could avoid the problems caused by insufficient space.<br>
 Expanding rootfs partitions on TF card of PC:<br>
 Using GParted to adjust the size:<br>
 Select the specified letter, right-click the corresponding letter, select "change the size" to adjust into the desired size, click "adjust the size", close the dialog box and click "apply to all operations", select the "apply" to complete the expansion operation.<br>
<br>
a.Expand file system<br>
 i Boot to Linux, umount /dev/sdb1 and /dev/sdb2, if it prompts disk busy, then use fuser to clean the using disk(we will recommend using another Linux booting disk to lead the system). <br>
 ii Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition.<br>
 iii Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).<br>
 iv Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire.<br>
 v Enter w to save the partition data.<br>
 vi Use the following command to check the file system(make sure it is a right file system)<br>
  e2fsck -f /dev/sdb2 <br>
 vii Adjust the partition size<br>
  resize2fs /dev/sdb2<br>
 viii It could mount a disk partition, you could check whether it has changed.<br>
<br>
b.Shrink file system<br>
 i Boot to Linux, umount /dev/sdb1 and /dev/sdb2, if it prompts disk busy, then use fuser to clean the using disk(we will recommend using another Linux booting disk to lead the system).<br>
 ii Use the following command to check the file system(make sure it is a right file system)<br>
  e2fsck -f /dev/sdb2<br>
 iii Modify the size of file system(Use resize2fs)<br>
  resize2fs /dev/sdb2 900M<br>
 The "s"after the number represents specifying the size of file system via the sectors(every sector calculated by 512 bite). You could also specify it into K(KB), M(MB), G(GB), etc.<br>
 iv Use fdisk /dev/sdb to adjust the partition size, after into it, enter p, and keep in mind about the initial position of needed extending size partition. You need to first delete the partition then build a new one because the fdisk could not modify the size dynamic(you need to calculate the size, it have to enough to contain the file system adjusted in last step).<br>
v Enter d to delete the partition need to change the size(my file system is /dev/sdb2, which is the 2 partition ).<br>
 vi Enter n to build a new partition, make sure the initial position is the same as you deleted, and enter the number as you desire. Besides, if it is boot-able partition you want to change, note that need to keep the boot-able mark in case cannot boot. <br>
 The above illustration is using fdisk and resize2fs to modify partition and file system, you could also use gparted. Gparted has graphical interface and it could help you to re-size file system at the same time of re-sizing partition. Goarted is much easier to use and reduce the change to make mistake. For now our official Lubuntu and Raspbian could not use it.<br>
<br>
=== '''Usage of GPIO and WiringPi''' ===
<br>
OrangePi I96 could support WiringPi, you could have a try according to the introduction on this section. The following is 40 Pin of OrangePi.
<div>[[文件:Orange-pi-i96-img31.png|800px]]</div>
<br>
* Download the latest WiringPi source code of Orange Pi i96
Please confirm that the Orange Pi i96 has connect to wifi or network successfully, if no, then you need to first make it connect to wifi or network. If you connect to network, then you also need to install some essential tools:<br>
 <span style="background:#fffaa5">sudo apt-get install git gcc make<span><br>
* Download the latest source code
You could download the latest WiringPi source code from official website: <br>