8,367
edits
Changes
no edit summary
Interface instructions:<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img1.png|600px]]</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img2.png|600px]]</div>
<br>
=== '''GPIO Specifications''' ===
The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin of CIS connector can be defined as follows. The connector marked with "CON 1" on the Orange Pi i96 is camera connector.<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img3.png|600px]]</div>
<br>
'''OrangePi i96-CSI'''<br>
<div style="width:800px;display:flex;padding-left:200px;align-items:center;">
<div style="text-align:center;">
[[文件File:Orange-pi-i96-img4.png|200px]]
<p style="text-align:center;">TF card</p>
</div>
<div style="text-align:center;">
[[文件File:Orange-pi-i96-img5.png|200px]]
<p style="text-align:center;margin-top:25px;margin-bottom:-8px;">OTG power adapter</p>
</div>
ii.Unzip the downloaded files, and run setup.exe<br>
iii.In the options settings option set the format type option to quick formatting. Logical size adjustment option to open "(ON)”
<div>[[文件File:Orange-pi-i96-img6.png|600px]]</div>
<br>
<div>[[文件File:Orange-pi-i96-img7.png|600px]]</div>
<br>
iv.Make sure the inserted TF card codes are in accordance with the chosen codes.<br>
<span style="color:#42a0e5">http://sourceforge.net/projects/win32diskimager/files/Archive/.</span> <br>
ii Select the path of image file that has been unzipped.
<div>[[文件File:Orange-pi-i96-img8.png|600px]]</div>
<br>
iii Click the "Write" button and wait for the image writing.<br>
<br>
* Insert the TF card with written image into the TF card slot
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img9.png|400px]]</div>
<br>
* Make sure the toggle switch is showing like the following, booting from SD card.
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img10.png|400px]]</div>
<br>
* Insert the keyboard or mouse into the USB port.
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img11.png|400px]]</div>
<br>
* Connect wifi antenna
* Connect to Camera(optional)
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img12.png|400px]]</div><div style="padding-left:100px;">[[文件File:Orange-pi-i96-img13.png|400px]]</div>
<br>
* Connect TTL cable, you could refer to the Debug method in this instruction.
Android and Linux use different Baud rate, please note the Baud rate setting. Android Baud rate is 921600, Linux Baud rate is 921600
Serial port uses TTL to USB cable to connect.
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img14.png|400px]]</div>
<br>
* It is the power input interface on the right side for connecting a 5V and at least 2A or bigger than 2A power adapter. Avoid using smaller power GSM mobile phone charger, it is not able to output 2A even if it marked "5V/2A".
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img15.png|400px]]</div>
<br>
If the above steps are successful, the Orange Pi will start in a few minutes. The monitor Graphical interface of display system. It may take a long time to start the first time, please wait patiently. The next time will boot very fast.<br>
<br>
Switching the boot mode into NAND via short jumper cap.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img16.png|400px]]</div>
<br>
Power it on, Orange Pi i96 will boot from NAND.<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;">[[文件File: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>[[文件File:Orange-pi-i96-img18.png|800px]]</div>
<br>
'''4)Install USB driver on Windows'''
Here is the ink for Orange Pi i96 Nand version image:<br>
http://www.orangepi.online/downloadresources/
<div>[[文件File:Orange-pi-i96-img19.png|800px]]</div>
<br>
'''6)Use writing tool'''<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;">[[文件File: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>
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;">[[文件File: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;">[[文件File: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.
* 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;">[[文件File:Orange-pi-i96-img23.png|600px]]</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img24.png|400px]]</div>
<br>
b.$ usermod -l zhangsan orangepi <br>
Change account of orangepi into Zhangsan
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img25.png|600px]]</div>
<br>
c.$ groupmod -n zhangsan orangepi <br>
Change group
<div style="padding-left:80px;">[[文件File: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;">[[文件File: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;">[[文件File:Orange-pi-i96-img28.png|600px]]</div>
<br>
f.$ cat /etc/passwd <br>
It should be shown as following:
<div>[[文件File: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>
a.Open the source file<br>
$ sudo vi /etc/apt/sources.list
<div>[[文件File:Orange-pi-i96-img30.png|800px]]</div>
<br>
b.Edit source file<br>
<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>[[文件File:Orange-pi-i96-img31.png|800px]]</div>
<br>
* Download the latest WiringPi source code of Orange Pi i96
V line represents the voltage value of the current pin.<br>
Physical line represents the actual hardware number.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img32.png|800px]]</div>
<br>
ii Use "gpio export pin mode" to explore wiringPi GPIO to the directory of /sys/class/gpio and set the GPIO mode into mode. <br>
Configure pin wiringPi 26 as input pin orangepi# gpio mode 26 in<br>
read the value from wiringPi 26 orangepi# gpio read 26
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img33.png|800px]]</div>
<br>
If you want to learn more "gpio" command, you could refer to "gpio -h" obtain.<br>
<br>
Complie GPIO LED
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img34.png|800px]]</div>
<br>
Usage of C library on wiringPi: <br>
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img35.png|800px]]</div>
<br>
Software: Linux host computer, which hard disk space at least 50G (to meet a fully compiled need)<br>
* After confirmed it is version 1.6, you could use the following command:
java -version
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img36.png|800px]]</div>
<br>
=== '''Install Platform Supported Software''' ===
./Build_OrangePi.sh<br>
Input root password:
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img37.png|600px]]</div>
<br>
After root password recognize successful, enter inter main interface and use Enter key.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img38.png|600px]]</div>
<br>
Select “Build system with kernel/uboot/rootfs” on main functional interface and use Enter key.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img39.png|600px]]</div>
<br>
And then select “OrangePi I96” with Enter key to update source code.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img40.png|600px]]</div>
<br>
It would take around 40minutes to update source code and corresponding scripts. After updated the source code, there will be generated a directory of OrangePi_i96. This directory contains both Linux source code and scripts:
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img41.png|600px]]</div>
<br>
* Compile Linux
Execute the following command after enter into directory of OrangePiRDA: ./build.sh<br>
The script is is an automatic script, you could select a corresponding board which you want to compile, here is “OrangePi I96”.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img42.png|600px]]</div>
<br>
If it is the first time you run the script, the system would install development tool automatic to make sure the network is connecting.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img43.png|600px]]</div>
<br>
After installed tool, enter root password and use Enter key.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img44.png|600px]]</div>
<br>
You will enter into the main interface after entering password, select what you are going to do:
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img45.png|600px]]</div>
<br>
This version is only support the above three options. After selecting the corresponding option, the system would compile automatically.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img46.png|600px]]</div>
<br>
There will be prompt the location of kernel image and module after compilation.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img47.png|600px]]</div>
<br>
* Update Linux Kernel and module
After all above steps, kernel and module update have been finished.<br>
You could insert SD card into Orange pi, and make the jumper like the following, after booting, it would enter into Linux.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img48.png|600px]]</div>
<br>
== '''Orange Pi Driver development''' ==
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img49.png|600px]]</div>
<br>
=== '''Device driver and application programming''' ===
'''1)Application Program (app.c)'''<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img50.png|600px]]</div>
<br>
'''2)Driver Program (OrangePi_misc.c)'''<br>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img51.png|600px]]</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img52.png|600px]]</div>
<br>
=== '''Compile device driver''' ===
Enter to */trunk/kernel/driver/misc<br>
Modify Makefile on currently file, shown as following:
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img53.png|800px]]</div>
<br>
There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu. In the kernel configuration making menuconfig, it read from the Kconfig config menu and the user configuration saved to the config. In the kernel compile, the main Makefile by calling this.Config could know the user's configuration of the kernel.<br>
Kconfig is corresponding to the kernel configuration menu. Add a new driver to the kernel source code, you can modify the Kconfig to increase the configuration menu for your drive, so you can choose whether the menuconfig driver was compiled or not.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img54.png|800px]]</div>
<br>
Back to the source code directory /OrangePi_i96<br>
It will generated a corresponding .ko file which is generated from the previous compilation of OrangePi_misc.c.<br>
Insert U disk (please note the SD card should have written image) if the SD card is mounted to the directory system of /dev/sdc, then SD card will mount to rootfs, which is /dev/sdc7, and mounted to rootfs partition automatic.
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img55.png|800px]]</div>
<br>
=== '''Compiling method of application''' ===
Check whether there is the cross compiler, if not, then download and install it.
$ arm-linux-gnueabihf-gcc -v
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img56.png|800px]]</div>
<br>
While compiling the application, you will fill that you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.
<div>[[文件File:Orange-pi-i96-img57.png|800px]]</div>
<br>
Unzip the downloaded file and enter the the directory
<div>[[文件File:Orange-pi-i96-img58.png|800px]]</div>
<br>
Check the information after entering bin directory
<div>[[文件File:Orange-pi-i96-img59.png|800px]]</div>
<br>
pwd hows the path and export it into the whole project
<div>[[文件File:Orange-pi-i96-img60.png|800px]]</div>
<br>
$ ll /etc/environment shows that the file can only read, need to modify permissions <br>
$ chmod 755 /etc/environment
<div>[[文件File:Orange-pi-i96-img61.png|800px]]</div>
<br>
Add the path to the whole environment variable<br>
<div>[[文件File:Orange-pi-i96-img62.png|800px]]</div>
<br>
Compile the application with cross compiler<br>
You need to switch to root users and load module driver module to the development board first.<br>
$ insmod /lib/modules/orangepi.ko
<div>[[文件File:Orange-pi-i96-img63.png|800px]]</div>
<br>
$ lsmod To check whether it is loaded
<div>[[文件File:Orange-pi-i96-img64.png|800px]]</div>
<br>
$ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code)
<div>[[文件File:Orange-pi-i96-img65.png|800px]]</div>
<br>
Executive application (note the use of the application, check the code for specify)<br>
<br>
Hardware: Orange Pi development board*1, Card reader*1, TF card*1, power supply*1, TTL to USB cable*1
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img66.png|800px]]</div>
<br>
'''TTL to USB cable'''
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img67.png|800px]]</div>
<br>
=== '''Operations on Windows''' ===
* Download and unzip the latest version of driver: <br>
PL2303_Prolific_DriverInstaller_v130.zip
<div>[[文件File:Orange-pi-i96-img68.png|800px]]</div>
<br>
* Choose application installation as Administrator
<div>[[文件File:Orange-pi-i96-img69.png|800px]]</div>
<br>
* Wait for installation completing
<div>[[文件File:Orange-pi-i96-img70.png|800px]]</div>
<br>
'''2)Install putty on Windows'''<br>
<br>
* Download putty installation package
<div>[[文件File:Orange-pi-i96-img71.png|800px]]</div>
<br>
* Unzip and install it
<div>[[文件File:Orange-pi-i96-img72.png|800px]]</div>
<br>
* Open it after installed, shown as below:
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img73.png|600px]]</div>
<br>
'''3)Connect method'''<br>
<br>
Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img74.png|600px]]</div>
<br>
'''4)Equipment information acquisition'''
<br>
* Select control panel on Start menu
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img75.png|400px]]</div>
<br>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img76.png|600px]]</div>
<br>
* Click on the device manager to check the port number
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img77.png|400px]]</div><div style="padding-left:200px;">[[文件File:Orange-pi-i96-img78.png|400px]]</div>
<br>
'''5)Putty configuration'''
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img79.png|400px]]</div>
<br>
Serial port should set to the corresponding port number (COM5), the speed should set to 921600<br>
'''6)Start debug'''<br>
Power Orange Pi on and boot it, the serial port will automatic print out debug log.
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img80.png|600px]]</div>
<br>
=== '''Operations on Linux''' ===
* Install the Kermit by execute command:
$ sudo apt-get install ckermit
<div>[[文件File:Orange-pi-i96-img81.png|800px]]</div>
<br>
* Configurate Kermit
$ sudo vi /etc/kermit/kermrc
<div>[[文件File:Orange-pi-i96-img82.png|800px]]</div>
<br>
* Add lines:
set window 5
</div>
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img83.png|600px]]</div>
<br>
'''2)Connect method for debug'''
<br>
Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC
<div style="padding-left:200px;">[[文件File:Orange-pi-i96-img84.png|600px]]</div>
<br>
'''3)Equipment information acquisition'''<br>
<br>
$ ls /dev/ (Input command in the PC terminal to check the device number of TTL to the serial cable)
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img85.png|800px]]</div>
<br>
* It can be seen from the figure that TTL to the serial port cable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information.<br>
$ sudo vi /etc/kermit/kermitc
* Set the value of setline into /dev/ttyUSB0
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img86.png|800px]]</div>
<br>
'''4)Start debug'''
* Input command in the host computer terminal, enter the Kermit mode:
$ sudo kermit –c
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img87.png|800px]]</div>
<br>
* Power it on and boot Orange Pi, the serial port will automatic print debug log, the account and password ard root/orangepi and orangepi/orangepi
<div style="padding-left:100px;">[[文件File:Orange-pi-i96-img88.png|800px]]</div>
<br>
For more information on using the Orange Pi i96, please see the <span style="color:red;">Orange Pi i96 User Manual</span>. (Click to download)