Difference between revisions of "Orange Pi 3G- IoT -A"
Line 9: | Line 9: | ||
<br> | <br> | ||
You can use it to build…<br> | You can use it to build…<br> | ||
− | * | + | * A computer |
− | * | + | * A wireless server |
− | * | + | * Games |
− | * | + | * Music and sounds |
− | * | + | * HD video |
− | * | + | * A speaker |
− | * | + | * Android |
− | * | + | * Scratch |
Pretty much anything else, because Orange Pi 3G-IOT is open source.<br> | Pretty much anything else, because Orange Pi 3G-IOT is open source.<br> | ||
<br> | <br> | ||
Line 286: | Line 286: | ||
<br> | <br> | ||
=== '''Prepare the Hardware and Software''' === | === '''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: 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> |
Revision as of 14:20, 20 June 2022
Contents
Orange Pi Introduction
What is Orange Pi 3G-IOT?
It’s an open-source single-board computer. It can run Android4.4、Linux. It uses the MTK serial MT6572 CPU.
What can I do with Orange Pi 3G-IOT?
You can use it to build…
- A computer
- A wireless server
- Games
- Music and sounds
- HD video
- A speaker
- Android
- Scratch
Pretty much anything else, because Orange Pi 3G-IOT is open source.
Who is it for?
Orange Pi 3G-IOT is for anyone who wants to start creating with technology
– not just consuming it. It's a simple, fun, useful tool that you can use to start taking control of the world around you.
Orange Pi 3G-IOT Hardware Specification
OrangePi 3G-IoT-256MB Hardware Specification | |
Processor | MT6572 |
CPU | Quad core ARM® Cortex-A7, Main frequency up to 1.25GHz |
GPU | ARM Mali-400MP1 GPU |
Memory | Version A: 256MB DDR2+512MB EMMC Flash Version B: 512MB DDR2+4GB EMMC Flash |
Wireless | WIFI / BT / FM / GPS Four in one |
Radio frequency
GSM WCDMA TD-CDMA CDMA2000 |
850/900/1800/1900 |
B1/B2/B5/B8 | |
/ | |
/ | |
Display | FWVGA(FPC zif Connector) |
Capacitance touch | Support (FPC zif Connector) |
Camera | MIPI Connector |
SIM Card | mini Single SIM Card |
TF Card | Support hot-plugging |
Audio
Earphone Mic |
For audio input / output |
For audio input | |
USB Port | One USB Host, one Micro USB |
LED | Red for power indicator, Green for status indicator |
Key | Power button(SW602) |
Low-level peripherals | 40pin Expansion Headers: GPIO 1.8V, SPI × 2 , I2C × 3, UART×2 |
Power Supply | Micro USB(5V/2A),Battery(Optional) |
Software | |
OS | Android 4.4 |
Programming support | C, C++, Kotlin, Java, Shell, Python, etc |
256MB DDR2 + 512MB EMMC Version Specs:
512MB DDR2 + 4GB EMMC Version Specs:
GPIO Specs
PIN1 | VIO28 PMU | PIN21 | GPIO24 |
PIN2 | DC5V | PIN22 | GPIO109 |
PIN3 | SDA_1 | PIN23 | GPIO25 |
PIN4 | DC5V | PIN24 | GPIO139 |
PIN5 | SCL_1 | PIN25 | GND |
PIN6 | GND | PIN26 | EINT0/GPIO30/PWM B |
PIN7 | EINT4/GPIO26 | PIN27 | SDA_0 |
PIN8 | UTXD2 | PIN28 | SCL_0 |
PIN9 | GND | PIN29 | SPI_CS |
PIN10 | URXD2 | PIN30 | GND |
PIN11 | URXD1 | PIN31 | SPI_CK |
PIN12 | EINT10/GPIO56 | PIN32 | EINT15/GPIO90 |
PIN13 | UTXD1 | PIN33 | SPI_MO |
PIN14 | GND | PIN34 | GND |
PIN15 | EINT2/GPIO128/PW A | PIN35 | SPI_MI |
PIN16 | EINT12/GPIO58 | PIN36 | GPIO145/PWMBL |
PIN17 | VIO28 PMU | PIN37 | EINT3/GPIO27 |
PIN18 | EINT14/GPIO89 | PIN38 | EINT5/GPIO144/PWM B |
PIN19 | GPIO140 | PIN39 | GND |
PIN20 | GND | PIN40 | GPIO141 |
Using Method
Prepare the Hardware and Software
Hardware Requirement:
- Orange Pi 3G-IoT Development Board
- A PC for compilation with following specs:
64bit CPU
Up to 16GB RAM
UP to 40GB spare disk space
Operation system should up to Ubuntu12.04, it would be better if it is Ubuntu16.04
You could refer to Google file for more details: https://source.android.com/source/building
Software Requirement:
- Orange Pi 3G-IoT SDK
- Orange Pi 3G-IoT Firmware
- Android-image-flash-tool
Power Methods
There are two methods for power supply:
- 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.
Before Usage
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.
Android Compilation Environment Construction
Download SDK compression package
Orange Pi offers different versions of SDK initial compression packages to facilitate customer rapid development.
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
Create directory:
mkdir OrangePi_3G-IOT_Android4.4
Copy Volume Compression Packet to this directory:
cp -rf OrangePi_3G-IoT_Android4.4.tar.gz* OrangePi_3G-IOT_Android4.4/
Merge Compression Packet:
cat OrangePi_3G-IoT_Android4.4.tar.gz*>OrangePi_3G-IOT_Android4.4.tar.gz
Unzip:
tar xzvf OrangePi_3G-IOT_Android4.4.tar.gz
Construct Compilation Environment
It could also refer to Google file: http://source.android.com/source/initializing.html
- Install JDK
Compilation of Android4.4 is base on JAVA6, it needs to first install OpenJDK, gcc4.4 before compilation.
Command for installing:
sudo apt-get install openjdk-6-jdk
sudo apt-get install gcc-4.4
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.
export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_31
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
Install Software Package
For Ubuntu12.04:
sudo apt-get update
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
For Ubuntu14.04:
sudo apt-get update
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
We could process to SDK compilation after finished the above.
Compilation of SDK Source Code
Full compilation
There are many compilation shell scripts for development.
Directory is: SDK/code/orangepi/scripts
$ cd code/orangepi/scripts
$ ls
anr_kk.sh auto.sh clean.sh init_project.sh tar_img.sh
auto.sh is automatically compilation script
clean.sh is automatically scavenging the compiled result script
tar_img.sh is packing script
One the directory of code/orangepi/scripts, we could execute automatically compilation script:
If the board is: 32g4g
$ ./auto.sh IoT03_mt6572_emmc_b1258_32g4g_ry_smt_v1.1 v00 eng
If the board is: 4g2g
$ ./auto.sh IoT03L_mt6572_lca_b1258_wg_4g2g_ry_smt_v1.1 v00 eng
The meaning of the parameter is:
- $1 project_info [eg: IoT03L_mt6572_lca_b1258_wg_4g2g_ry_smt_v1.1]
- $2 version_info [eg: v00 v01 ...]
- $3 compile_mode [eng:user userdebug eng]
Module compilation
Usually use the following command to change Kernel file:
./mk -o=TARGET_BUILD_VARIANT=[user/userdebug/eng] projName n K && ./mk -o=TARGET_BUILD_VARIANT=[user/userdebug/eng] projName r bootimage
For example, if project is: hexing72_cwet_kk
./mk -o=TARGET_BUILD_VARIANT=eng hexing72_cwet_kk n k && ./mk -o=TARGET_BUILD_VARIANT=eng hexing72_cwet_kk r bootimage
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
Relevant keys and connectors for firmware flashing of 3G-IOT:
After compilation, all the firmware will generate on the directory of:
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.
IoT03L_b1258_wg_4g2g_ry_smt_v1.1
├── images
│ ├── boot.img
│ ├── lk.bin
│ ├── logo.bin
│ ├── MT6572_Android_scatter.txt
│ ├── preloader_hexing72_cwet_lca.bin
│ ├── ramdisk.img
│ ├── ramdisk-recovery.img
│ ├── recovery.img
│ ├── secro.img
│ ├── system.img
│ └── userdata.img
└── modem
├── APDB_MT6572_S01_MAIN2.1_W10.24
├── _APDB_MT6572_S01_MAIN2.1_W10.24.check
├── APDB_MT6572_S01_MAIN2.1_W10.24_ENUM
├── BPLGUInfoCustomAppSrcP_MT6572_S00_MOLY_WR8_W1315_MD_WG_MP_V47_1_wg_n
├── catcher_filter_1_wg_n.bin
├── 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
├── modem_1_wg_n.img
└── modem_1_wg_n.mak
After the above steps, you could refer to the previous section to flash image.
Or you could use the image we have compiled and pack: http://www.orangepi.online/downloadresources/ Unzip Android4.4 image via the following command:
$ rar x IoT03L_b1258_wg_4g2g_ry_smt_v1.1.rar
You could get the list of firmware after ran the above command, or you could also compile by yourself with reference of previous section.
Supporting OS of PC:
- Windows 10
- Windows 7 (32/64bit)
- Windows 8 (32/64bit)
- Ubuntu10.04 / 12.04 / 14.04 (32/64bit)
Flash Tool Introduction
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.
Interface like the following: