Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 2G-IoT

929 bytes removed, 10:38, 1 July 2022
no edit summary
|}
<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]]
<br>
* Insert the TF card with written image into the TF card slot
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img5.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-2g-iot-img6.png|400px]]</div>
<br>
* Insert the keyboard or mouse into the USB port.
* Connect wifi antenna and base-band antenna
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img7.png|400px]]</div>
<br>
* Connect LCD and Camera
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img8.png|400px]]</div>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img9.png|400px]]</div>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img10.png|400px]]</div>
<br>
* Connect TTL cable, you could refer to the Debug method in this instruction.
Serial port uses TTL to USB cable to connect.<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img11.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-2g-iot-img12.png|400px]]</div>
<br>
 If the above steps are successful, the OrangePi 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-2g-iot-img13.png|400px]]</div>
<br>
 Power it on, Orange Pi 2G-IoT 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-2g-iot-img14.png|400px]]</div>
<br>
'''3)Install writing tool on Windows '''<br>
Use writing tool to write NAND:<br>
http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-2G-IoT.html
<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 2G-IoT.<br>
 Prepare an Android USB to DC cable, first connect to the OTG port of Orange Pi 2G-IoT, 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>
<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-2g-iot-img16.png|600px]]</div>
<br>
* Connect to the OTG port of Oragne Pi 2G-IoT 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 2G-IoT via adb, you could refer to the adb debug method from the internet to enter into Orange Pi 2G-IoT
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>   
'''1)Use WiringPi on OrangePi 2G-IoT to connect network'''<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img17.png|600px]]</div>
<br>
OrangePi 2G-IoT could support WiringPi, you could have a try according to the introduction on this section. The following is 40 Pin of OrangePi. <br>
Physical line represents the actual hardware number.<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-i96-img32.png|600px]]</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>
According to the above WiringPi pin mapping, hardware pin number 37 is corresponding to WiringPi pin number GPIO 25, explore the number 25 and set it into output mode.<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img18.png|600px]]</div>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img19.png|600px]]</div>
<br>
iii Use "gpio unexport pin" to cancel explore pin to /sys/class/gpio. For example:
orangepi# gpio unexport 25<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img20.png|600px]]</div>
<br>
iv Use "gpio exports" to check the current explored gpio. For expample:
orangepi# gpio exports<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img21.png|600px]]</div>
<br>
v Use "gpio mode pin mode" command to configure wiringPi pin mode. For example:<br>
orangepi# gpio read 25<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-i96-img33.png|600px]]</div>
<br>
viii.If you want to learn more "gpio" command, you could refer to "gpio -h" obtain.<br>
Complie GPIO LED<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-i96-img34.png|600px]]</div>
<br>
Usage of C library on wiringPi:<br>
Standard: GSM800<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img23.png|600px]]</div>
<br>
ii.Install SIM card<br>
Please note the direction of when inserting SIM card. <br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img25.png|600px]]</div>
<br>
iii.Login Linux system<br>
After inserting SIM card, power on and enter into Linux system. You could login the system via serial port or SSH. If you are going to use serial port to login, please be remember to set the baud rate into 921600.<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img26.png|600px]]</div>
<br>
iv.SMS Usage<br>
After input the command, you will enter the configure interface, select "'''Serial port setup'''"<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img27.png|600px]]</div>
<br>
Push A to modify Serial Device into /'''dev/modem0'''<br>
<br>
<div style="padding-left:100px; ">[[File:Orange-pi-2g-iot-img28.png|600px]]</div>
<br>
'''Use AT command to send message'''<br>
    serial_init(fd);<br>
<br>
    printf("************************************************\n");<br>
    printf("\tWelcome to OrangePi 2G-IoT\n");<br>
    printf("\tModem version %s\n", VERSION);<br>
    printf("************************************************\n");<br>
    printf("Entry your select:\n");<br>
    printf("1. Send Message\n");<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-2g-iot-img5.png|500px]]</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 2G-IoT” 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 2G-IoT”.
<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-2g-iot-img62.png|200px]]</div>
<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-2g-iot-img5.png|600px]]</div>
<br>
=== '''Device driver and application programming''' ===
Update the new generated module file into Linux system.<br>
It will show on *cd<br>
/trunk/out/target/product/slt-NollecA9V2VV8810P_ext4/obj/KERNEL/out<br>/target/product/slt-NollecA9V2VV8810P_ext4/obj<br>/KERNEL/modules/lib/modules/<br>3.10.62-rel5.0.2/ generated corresponding .ko file, <br>it is the module <br> that generated after OrangePi_misc.c compilation.<br>
<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.
<br>
Copy the directory file:<br>
/trunk/out/target/product/slt-NollecA9V2VV8810P_ext4<br>/obj/KERNEL/out/target/product/slt-NollecA9V2VV8810P_ext4/<br>obj/KERNEL/modules/lib/modules/3.10.62-rel5.0.2/
into:<br>
/media/*/lib/modules/
<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-2g-iot-img5.png|500px]]</div>
<br>
'''TTL to USB cable'''
<div style="padding-left:200px;">[[File:Orange-pi-i96-img67.png|500px]]</div>
<br>
=== '''Operations on Windows''' ===
* 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>
Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC
<br>
<div style="padding-left:200px;">[[File:Orange-pi-2g-iot-img63.png|500px]]</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 115200<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>
== '''Download the Orange Pi 2G-IoT User Manual''' ==
<br>
For more information on using the Orange Pi 2G-IoT, please see the [https://drive.google.com/open?id=1v_ecsBnlQtxE4BNQ4v1eBa_YE0fhiUkK <span style="color:red;">Orange Pi 2G-IoT User Manual</span>]. (Click to download)