8,367
edits
Changes
no edit summary
<br>
<br>
== '''Using Debug tools on OrangePi ''' ==
<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;">[[文件:Orange-pi-i96-img66.png|800px]]</div>
<br>
'''TTL to USB cable'''
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img67.png|800px]]</div>
<br>
=== '''Operations on Windows''' ===
<br>
In order to get more debugging information in the project development process of using OrangePi, OrangePi default support for serial information debugging. For developers, you can simply get the serial port debugging information with the materials mentioned above. The host computer using different serial debugging tools are similar, basically can reference with the following manual for deployment. There are a lot of debugging tools for Windows platform, the most commonly used tool is putty. This section takes putty as an example to explain the deployment.<br>
Android Baud rate set as 921600<br>
Linux Baud rate set as 921600<br>
<br>
'''1)Install USB driver on Windows'''<br>
<br>
* Download and unzip the latest version of driver: <br>
PL2303_Prolific_DriverInstaller_v130.zip
<div>[[文件:Orange-pi-i96-img68.png|800px]]</div>
<br>
* Choose application installation as Administrator
<div>[[文件:Orange-pi-i96-img69.png|800px]]</div>
<br>
* Wait for installation completing
<div>[[文件:Orange-pi-i96-img70.png|800px]]</div>
<br>
'''2)Install putty on Windows'''<br>
<br>
* Download putty installation package
<div>[[文件:Orange-pi-i96-img71.png|800px]]</div>
<br>
* Unzip and install it
<div>[[文件:Orange-pi-i96-img72.png|800px]]</div>
<br>
* Open it after installed, shown as below:
<br>
<div style="padding-left:200px;">[[文件: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;">[[文件:Orange-pi-i96-img74.png|600px]]</div>
<br>
'''4)Equipment information acquisition'''
<br>
* Select control panel on Start menu
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img75.png|400px]]</div>
<br>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img76.png|600px]]</div>
<br>
* Click on the device manager to check the port number
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img77.png|400px]]</div>
<br>
'''5)Putty configuration'''
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img78.png|400px]]</div>
<br>
Serial port should set to the corresponding port number (COM5), the speed should set to 921600<br>
<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;">[[文件:Orange-pi-i96-img79.png|600px]]</div>
<br>
=== '''Operations on Linux''' ===
<br>
There are Minicom and Kermit serial debugging tools for Linux, this section will take Kermit as an example to have an illustrate.<br>
<br>
'''1)Install Kermit'''
<br>
* Install the Kermit by execute command:
$ sudo apt-get install ckermit
<div>[[文件:Orange-pi-i96-img80.png|800px]]</div>
<br>
* Configurate Kermit
$ sudo vi /etc/kermit/kermrc
<div>[[文件:Orange-pi-i96-img81.png|800px]]</div>
<br>
* Add lines:
<div style="padding-left:20px;">
set line /dev/ttyUSB1<br>
set speed 921600<br>
set carrier-watch off<br>
set handshake none<br>
set flow-control none<br>
robust<br>
set file type bin<br>
set file name lit<br>
set rec pack 1000<br>
set send pack 1000<br>
set window 5
</div>
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img82.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;">[[文件:Orange-pi-i96-img83.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;">[[文件:Orange-pi-i96-img84.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;">[[文件:Orange-pi-i96-img85.png|800px]]</div>
<br>
'''4)Start debug'''
<br>
* Input command in the host computer terminal, enter the Kermit mode:
$ sudo kermit –c
<div style="padding-left:200px;">[[文件:Orange-pi-i96-img86.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>[[文件:Orange-pi-i96-img87.png|800px]]</div>
<br>
For more information on using the Orange Pi i96, please see the Orange Pi i96 User Manual. (Click to download)