Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 3G- IoT -A

8,440 bytes added, 14:20, 20 June 2022
no edit summary
<br>
You can use it to build…<br>
*A A computer*A A wireless server*GamesGames*Music Music and sounds*HD HD video*A A speaker*AndroidAndroid*ScratchScratch
Pretty much anything else, because Orange Pi 3G-IOT is open source.<br>
<br>
<br>
=== '''Prepare the Hardware and Software''' ===
<br>
Hardware Requirement:<br>
* Orange Pi 3G-IoT Development Board
* A PC for compilation with following specs:<br>
<p style="padding:20px;">
64bit CPU<br>
Up to 16GB RAM<br>
UP to 40GB spare disk space<br>
Operation system should up to Ubuntu12.04, it would be better if it is Ubuntu16.04
</p>
You could refer to Google file for more details:&nbsp;&nbsp;&nbsp;&nbsp;https://source.android.com/source/building<br>
<br>
Software Requirement:<br>
* Orange Pi 3G-IoT SDK
* Orange Pi 3G-IoT Firmware
* Android-image-flash-tool
<br>
=== '''Power Methods''' ===
<br>
There are two methods for power supply:<br>
* Micro USB(5V 2A)in for power:
* Battery in for power:
Usually use 4.2V battery to solder on the back side of the development board.<br>
<br>
=== '''Before Usage''' ===
<br>
After receiving the product, please put the antennas of the product from the position of Pic 1 to the position of Pic 2 (or to the outside of the board), which can not be attached to the board so as not to affect the signal.<br>
<br>
<div>[[文件:Orange-pi-3g-iot-img5.png|800px|]]</div>
<div style="text-align:center;width:400px;display:inline-block;">图 1</div>
<div style="text-align:center;width:400px;display:inline-block;">图 2</div>
<br>
== '''Android Compilation Environment Construction''' ==
<br>
=== '''Download SDK compression package''' ===
<br>
Orange Pi offers different versions of SDK initial compression packages to facilitate customer rapid development.<br>
Download the compression packages, corresponding to OrangePi_3G-IoT_Android4.4.tar.gz00, OrangePi_3G-IoT_Android4.4.tar.gz01, ...OrangePi_3G-IoT_Android4.4.tar.gz00, a total of eight volume compression packages. After obtaining the volume compressed packages, place all the compressed packages in the same directory, such as<br>
<br>
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
<span style="font-weight:600;">Create directory:</span><br>
mkdir OrangePi_3G-IOT_Android4.4<br>
<span style="font-weight:600;">Copy Volume Compression Packet to this directory:</span><br>
cp -rf OrangePi_3G-IoT_Android4.4.tar.gz* OrangePi_3G-IOT_Android4.4/ <br>
<span style="font-weight:600;">Merge Compression Packet:</span><br>
cat OrangePi_3G-IoT_Android4.4.tar.gz*>OrangePi_3G-IOT_Android4.4.tar.gz <br>
<span style="font-weight:600;">Unzip:</span><br>
tar xzvf OrangePi_3G-IOT_Android4.4.tar.gz
</div>
<br>
=== '''Construct Compilation Environment''' ===
<br>
It could also refer to Google file: <span style="color:#808080;">http://source.android.com/source/initializing.html</span>
* '''Install JDK'''
Compilation of Android4.4 is base on JAVA6, it needs to first install OpenJDK, gcc4.4 before compilation.<br>
<br>
Command for installing:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
sudo apt-get install openjdk-6-jdk <br>
sudo apt-get install gcc-4.4
</div>
<br>
If the installation path is /usr/lib/jvm/jdk1.6.0_31 when configure environment variable of JAVA, then execute the the following command on terminal to configure the data.
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_31<br>
export PATH=$JAVA_HOME/bin:$PATH<br>
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
</div>
=== '''Install Software Package''' ===
For Ubuntu12.04:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
sudo apt-get update<br>
sudo apt-get install git-core gnupg flex bison ccache gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libc6-dev lib32ncurses5-dev x11proto-core-dev
libx11-dev lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev gcc-4.4 g++-4.4 g++-4.4-multilib g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc wine
</div>
<br>
For Ubuntu14.04:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
sudo apt-get update<br>
sudo apt-get install git-core gnupg flex bison ccache gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind libc6-dev lib32ncurses5-dev x11proto-core-dev
libx11-dev lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev g++-multilib g++-4.8-multilib mingw32 tofrodos python-markdown
libxml2-utils xsltproc libc6-dev-i386 lib32z1 lib32ncurses5 lib32bz2-1.0 lib32readline-gplv2-dev wine
</div>
We could process to SDK compilation after finished the above.<br>
<br>
=== '''Compilation of SDK Source Code''' ===
<br>
'''Full compilation'''
<br>
There are many compilation shell scripts for development. <br>
<br>
Directory is: SDK/code/orangepi/scripts
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ cd code/orangepi/scripts<br>
$ ls<br>
anr_kk.sh auto.sh clean.sh init_project.sh tar_img.sh
</div>
auto.sh is automatically compilation script<br>
clean.sh is automatically scavenging the compiled result script <br>
tar_img.sh is packing script<br>
One the directory of code/orangepi/scripts, we could execute automatically compilation script:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
If the board is: 32g4g<br>
$ ./auto.sh IoT03_mt6572_emmc_b1258_32g4g_ry_smt_v1.1 v00 eng<br>
<br>
If the board is: 4g2g<br>
$ ./auto.sh IoT03L_mt6572_lca_b1258_wg_4g2g_ry_smt_v1.1 v00 eng
</div>
The meaning of the parameter is:<br>
#$1 project_info [eg: IoT03L_mt6572_lca_b1258_wg_4g2g_ry_smt_v1.1] <br>
#$2 version_info [eg: v00 v01 ...]<br>
#$3 compile_mode [eng:user userdebug eng]<br>
<br>
'''Module compilation'''
<br>
Usually use the following command to change Kernel file:<br>
./mk -o=TARGET_BUILD_VARIANT=[user/userdebug/eng] projName n K && ./mk -o=TARGET_BUILD_VARIANT=[user/userdebug/eng] projName r bootimage<br>
<br>
For example, if project is: hexing72_cwet_kk<br>
./mk -o=TARGET_BUILD_VARIANT=eng hexing72_cwet_kk n k && ./mk -o=TARGET_BUILD_VARIANT=eng hexing72_cwet_kk r bootimage<br>
<br>
You could refer to MT6592_Driver_All_In_One_Part.pdf (after unzip SDK you will have this file) for modification of driver compilation.
 
== '''Android Firmware Flashing''' ==
<br>
Relevant keys and connectors for firmware flashing of 3G-IOT:
<div style="padding-left:200px;">[[文件:Orange-pi-3g-iot-img6.png|800px|]]</div>
After compilation, all the firmware will generate on the directory of:<br>
code/IoT03_b1258_32g4g_ry_smt_v1.1 or code/IoT03L_b1258_wg_4g2g_ry_smt_v1.1 , and packed into compression file as the name of IoT03L_b1258_wg_4g2g_ry_smt_v1.1_20180403182516_v00_eng.zip.
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
IoT03L_b1258_wg_4g2g_ry_smt_v1.1<br>
├── images<br>
│ ├── boot.img<br>
│ ├── lk.bin<br>
│ ├── logo.bin<br>
│ ├── MT6572_Android_scatter.txt<br>
│ ├── preloader_hexing72_cwet_lca.bin<br>
│ ├── ramdisk.img<br>
│ ├── ramdisk-recovery.img<br>
│ ├── recovery.img<br>
│ ├── secro.img<br>
│ ├── system.img<br>
│ └── userdata.img<br>
└── modem<br>
├── APDB_MT6572_S01_MAIN2.1_W10.24<br>
├── _APDB_MT6572_S01_MAIN2.1_W10.24.check<br>
├── APDB_MT6572_S01_MAIN2.1_W10.24_ENUM<br>
├── BPLGUInfoCustomAppSrcP_MT6572_S00_MOLY_WR8_W1315_MD_WG_MP_V47_1_wg_n<br>
├── catcher_filter_1_wg_n.bin<br>
├── DbgInfo_WR8.W1315.MD.WG.MP_HEXING72_CWET_KK_HSPA_MOLY_WR8_W1315_MD_WG_MP
_V47_2017_10_26_22_35_1_wg_n<br>
├── modem_1_wg_n.img<br>
└── modem_1_wg_n.mak
</div>
<br>
After the above steps, you could refer to the previous section to flash image.<br>
<br>
Or you could use the image we have compiled and pack: http://www.orangepi.online/downloadresources/ Unzip Android4.4 image via the following command:
<div style="border:1px solid #dddddd;background:#f1f1f1;padding:5px;">
$ rar x IoT03L_b1258_wg_4g2g_ry_smt_v1.1.rar
</div>
You could get the list of firmware after ran the above command, or you could also compile by yourself with reference of previous section.<br>
<br>
'''Supporting OS of PC:'''
* Windows 10
* Windows 7 (32/64bit)
* Windows 8 (32/64bit)
* Ubuntu10.04 / 12.04 / 14.04 (32/64bit)
<br>
=== '''Flash Tool Introduction''' ===
<br>
You could download the '''Smart Phone Flash Tool''' on the download page of Orange Pi 3G-IoT section. There are tools for Windows and Linux version, you could select a suitable version according to your PC environment.<br>
Interface like the following:
<div>[[文件:Orange-pi-3g-iot-img7.png|800px|]]</div>