Difference between revisions of "Orange Pi 4G- IoT"
Line 476: | Line 476: | ||
<div style="flex:1;text-align:center;">Pic 1</div> | <div style="flex:1;text-align:center;">Pic 1</div> | ||
<div style="flex:1;text-align:center;">Pic 2</div> | <div style="flex:1;text-align:center;">Pic 2</div> | ||
+ | </div> | ||
+ | <br> | ||
+ | == '''Android Compilation Environment Construction''' == | ||
+ | <br> | ||
+ | === '''Download SDK compression package''' === | ||
+ | <br> | ||
+ | * '''Android 6.0''' | ||
+ | Download the compression packages, corresponding to OrangePi_4G-IoT_Android 6.0_V1.0.tar.gz.00, OrangePi_4G-IoT_Android 6.0_V1.0.tar.gz.01, OrangePi_4G-IoT_Android 6.0_V1.0.tar.gz.14, a total of 15 volume compression packages. After obtaining the volume compressed packages, place all the compressed packages in the same directory, such as<br> | ||
+ | <br> | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | '''Create directory:'''<br> | ||
+ | mkdir OrangePi_4G-IOT_Android6.0 <br> | ||
+ | '''Copy Volume Compression Packet:'''<br> | ||
+ | cp -rf OrangePi_4G-IoT_Android6.0_V1.0.tar.gz.* <br> | ||
+ | OrangePi_4G-IOT_Android6.0/<br> | ||
+ | '''Merge Compression Packet:'''<br> | ||
+ | cat OrangePi_4G-IoT_Android6.0_V1.0.tar.gz.* > <br> | ||
+ | OrangePi_4G-IOT_Android6.0.tar.gz<br> | ||
+ | '''Unzip:'''<br> | ||
+ | tar xzvf OrangePi_4G-IOT_Android6.0.tar.gz | ||
+ | </div> | ||
+ | * '''Android 8.1''' | ||
+ | After downloaded compression package, you will have 11packages named x00, x01, x02, x03 ...x10.Put packages on the same directory like the following: | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | Create directory<br> | ||
+ | mkdir OrangePi_4G-IOT_Android8.1 <br> | ||
+ | Copy compress package<br> | ||
+ | cp -rf x00 x01 x02 ... x10 <br> | ||
+ | Merge compression package<br> | ||
+ | cat x*>OrangePi_4G-IOT_Android8.1.tar.gz <br> | ||
+ | Decompression<br> | ||
+ | tar xzvf OrangePi_4G-IOT_Android8.tar.gz | ||
+ | </div> | ||
+ | <br> | ||
+ | === '''Construct Compilation Environment''' === | ||
+ | <br> | ||
+ | It could also refer to Google file: [http://source.android.com/source/initializing.html | ||
+ | <span style="color:#6600ff;">http://source.android.com/source/initializing.html</span>]<br> | ||
+ | <br> | ||
+ | * '''Install JDK''' | ||
+ | Compilation of Android6.0 is based on JAVA7, it needs to first install OpenJDK before compilation.<br> | ||
+ | <br> | ||
+ | Command for installing: | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | sudo apt-get install openjdk-7-jdk | ||
+ | </div> | ||
+ | <br> | ||
+ | Configure environment variable of JAVA, here is the path for installation:<br> | ||
+ | <br> | ||
+ | /usr/lib/jvm/java-7-openjdk-amd64<br> | ||
+ | <br> | ||
+ | It could configure on the terminal with the following command:<br> | ||
+ | <br> | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 <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="background:#f1f1f1;border:1px solid #ddd;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="background:#f1f1f1;border:1px solid #ddd;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> | ||
+ | <br> | ||
+ | We could process to SDK compilation after finished the above.<br> | ||
+ | <br> | ||
+ | === '''Compilation of SDK Source Code''' === | ||
+ | <br> | ||
+ | There are many compilation shell scripts for development.<br> | ||
+ | <br> | ||
+ | * '''Android 6.0''' | ||
+ | <br> | ||
+ | The directory would be: SDK/code/orangepi/scripts<br> | ||
+ | <br> | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | $ cd code/orangepi/scripts<br> | ||
+ | $ ls<br> | ||
+ | anr_LM.sh auto.sh clean.sh codegen.sh init_project.sh tar_img.sh | ||
+ | </div> | ||
+ | auto.sh is automatically compilation script<br> | ||
+ | clean.sh automatically scavenging the compiled result script<br> | ||
+ | <br> | ||
+ | On the directory of code/orangepi/scripts, execute the automatically compilation script: | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | $ ./auto.sh IoT_bd6737m_35g_b_m0_op_smt_hd720_pcb_v2 v00 eng | ||
+ | </div> | ||
+ | The meaning of the parameter is:<br> | ||
+ | #$1 project_info [eg: IoT_bd6737m_35g_b_m0_op_smt_hd720_pcb_v2] <br> | ||
+ | #$2 version_info [eg: v00 v01 ...]<br> | ||
+ | #$3 compile_mode [eng:user userdebug eng] | ||
+ | * '''Android 8.1''' | ||
+ | <br> | ||
+ | The directory would be: SDK/code/orangepi/scripts<br> | ||
+ | <br> | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | $ cd code/orangepi/scripts<br> | ||
+ | $ ls<br> | ||
+ | anr_LM.sh auto.sh clean.sh codegen.sh init_project.sh tar_img.sh | ||
+ | </div> | ||
+ | auto.sh--scripts for automatic compilation<br> | ||
+ | clean.sh--scripts for automatically cleaning the compiled result<br> | ||
+ | <br> | ||
+ | On the directory of code/orangepi/scripts, execute automatic compilation scripts: | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | $ ./auto.sh IoT_k37mv1_bsp_ry_smt_hd720_pcb_v2 v00 eng | ||
+ | </div> | ||
+ | Definition of the three parameters:<br> | ||
+ | #$1 project_info [eg: IoT_k37mv1_bsp_ry_smt_hd720_pcb_v2] <br> | ||
+ | #$2 version_info [eg: v00 v01 ...]<br> | ||
+ | #$3 compile_mode [eng:user userdebug eng]<br> | ||
+ | <br> | ||
+ | Execute command to compile:<br> | ||
+ | source build/envsetup.sh<br> | ||
+ | luncher >full_k37mv1_bsp-eng<br> | ||
+ | make -j4<br> | ||
+ | <br> | ||
+ | '''Module compilation''' | ||
+ | <br> | ||
+ | Here would take an example of only compilation launcer:<br> | ||
+ | mm packages/apps/Launcher3/ or enter into directory of packages/apps/Launcher3/, execute mm<br> Please note that some modules depend on the relationship of package, you need to run mma. | ||
+ | <br> | ||
+ | <br> | ||
+ | === '''Generated Firmware''' === | ||
+ | <br> | ||
+ | * '''Android6.0''' | ||
+ | After compiled, the firmware will gather in the directory of: code/IoT_op_smt_hd720_pcb_v2, pack it and name it like the following: IoT_op_smt_hd720_pcb_v2_v00_eng_20180126140300.tar.gz | ||
+ | <div style="background:#f1f1f1;border:1px solid #ddd;padding:5px;"> | ||
+ | $ tree IoT_op_smt_hd720_pcb_v2 IoT_op_smt_hd720_pcb_v2<br> | ||
+ | ├── images<br> | ||
+ | │ ├── boot.img<br> | ||
+ | │ ├── cache.img<br> | ||
+ | │ ├── lk.bin<br> | ||
+ | │ ├── logo.bin<br> | ||
+ | │ ├── MT6737M_Android_scatter.txt<br> | ||
+ | │ ├── preloader_bd6737m_35g_b_m0.bin<br> | ||
+ | │ ├── recovery.img<br> | ||
+ | │ ├── secro.img<br> | ||
+ | │ ├── system.img<br> | ||
+ | │ ├── trustzone.bin<br> | ||
+ | │ └── userdata.img<br> | ||
+ | └── modem<br> | ||
+ | ├── APDB_MT6735_S01_alps-mp-m0.mp1_W17.21<br> | ||
+ | ├── _APDB_MT6735_S01_alps-mp-m0.mp1_W17.21.check<br> | ||
+ | └── APDB_MT6735_S01_alps-mp-m0.mp1_W17.21_ENUM | ||
</div> | </div> |
Revision as of 10:53, 21 June 2022
Orange Pi Introduction
What is Orange Pi 4G-IoT?
It’s an open-source single-board computer. It can run Android 6.0 Image. It uses the MTK serial MT6737 SoC, and has 1GB DDR3 SDRAM.
What can I do with Orange Pi 4G-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 4G-IOT is open source.
Who is it for?
Orange Pi 4G-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 4G-IoT Hardware Specification
Orange Pi 4G-IoT Specification | |
Processor | MT6737 |
CPU | Quad core ARM® Cortex-A53, Main frequency up to 1.25GHz |
GPU | ARM Mali-T720 MP1 |
Memory | 1GB DDR3 |
Emmc | 8GB EMMC Flash |
Wireless | WIFI / BT / FM / GPS Four in one |
Radio frequency
GSM WCDMA TD-CDMA CDMA2000 FDD-LTE TDD-LTE |
900/1800 (850/1900 optional) |
B1/B8 (B2/B4/B5 optional) | |
/ | |
/ | |
B1/B3/B7/B20 (B2/B4/B17optional) | |
B38/40/41B | |
Display | HD |
Capacitance touch | Support |
Camera | 13M (25pin ZIF Connector) |
Accelerometer Sensor | Support |
IR Control | Support (Adapted iDroid remote controller) |
Fingerprint Identification | Support |
SIM Card | mini Single SIM Card |
TF Card | Support hot-plugging |
Audio
Earphone Mic |
For audio input / output |
For audio input | |
USB
USB Host × 3 Micro USB × 1 |
Support OTG |
Only for writing image | |
LED
Power Indicator LED Status Indicator LED |
Red |
Green | |
Key | Power |
HDMI | Support |
Low-level peripherals
40pin Headers |
1.8V, SPI × 2 , I2C × 3, UART × 2 |
Power
DC Battery |
5V 2A |
Connection through a weld plate | |
OS/Software | |
OS | Android 6.0 |
Programming support | C、C++、Kotlin、Java、Shell、Python |
Interface definition | |
Size | 55mm*85mm |
Weight | 43g |
Orange Pi™ is trademark of Shenzhen Xunlong Software CO., Limited |
Orange Pi 4G-IoT 40pins GPIO Specification
OrangePi(4G-IOT) | ||
P01 | VIO28_PMU | |
P02 | DC5V | |
P03 | SDA1 | GPIO49 |
P04 | DC5V | |
P05 | SCL1 | GPIO50 |
P06 | GND | |
P07 | EINT87 | GPIO87 |
P08 | UTXD2 | |
P09 | GND | |
P10 | URXD2 | GPIO57 |
P11 | URXD1 | |
P12 | EINT8 | EINT8 |
P13 | UTXD1 | |
P14 | GND | |
P15 | UCTS1 | |
P16 | EINT9 | EINT9 |
P17 | VIO28_PMU | |
P18 | EINT11 | EINT11 |
P19 | SPI2_MI | EINT3 |
P20 | GND | |
P21 | SPI2_MO | EINT4 |
P22 | URTS1 | |
P23 | SPI2_CK | EINT6 |
P24 | SPI2_CS | EINT5 |
P25 | GND | |
P26 | EINT12 | |
P27 | SDA2 | GPIO51 |
P28 | SCL2 | GPIO52 |
P29 | SPI_CS | GPIO65 |
P30 | GND | |
P31 | SPI_CK | GPIO66 |
P32 | URTS2 | GPIO60 |
P33 | SPI_MO | PA9 |
P34 | GND | |
P35 | SPI_MI | GPIO67 |
P36 | UCTS2 | GPIO59 |
P37 | EINT_123 | GPIO123 |
P38 | SCL3 | GPIO54 |
P39 | GND | |
P40 | SDA3 | GPIO53 |
Interface instructions:
Using Method
Prepare the Hardware and Software
Hardware Requirement:
- Orange Pi 4G-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 4G-IoT SDK
- Orange Pi 4G-IoT Firmware
- Android-image-flash-tool
Power Methods
There are two methods for power supply:
- DC (5V 2A)in for power:
- Battery in for power:
Usually use 3.7V 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
- Android 6.0
Download the compression packages, corresponding to OrangePi_4G-IoT_Android 6.0_V1.0.tar.gz.00, OrangePi_4G-IoT_Android 6.0_V1.0.tar.gz.01, OrangePi_4G-IoT_Android 6.0_V1.0.tar.gz.14, a total of 15 volume compression packages. After obtaining the volume compressed packages, place all the compressed packages in the same directory, such as
Create directory:
mkdir OrangePi_4G-IOT_Android6.0
Copy Volume Compression Packet:
cp -rf OrangePi_4G-IoT_Android6.0_V1.0.tar.gz.*
OrangePi_4G-IOT_Android6.0/
Merge Compression Packet:
cat OrangePi_4G-IoT_Android6.0_V1.0.tar.gz.* >
OrangePi_4G-IOT_Android6.0.tar.gz
Unzip:
tar xzvf OrangePi_4G-IOT_Android6.0.tar.gz
- Android 8.1
After downloaded compression package, you will have 11packages named x00, x01, x02, x03 ...x10.Put packages on the same directory like the following:
Create directory
mkdir OrangePi_4G-IOT_Android8.1
Copy compress package
cp -rf x00 x01 x02 ... x10
Merge compression package
cat x*>OrangePi_4G-IOT_Android8.1.tar.gz
Decompression
tar xzvf OrangePi_4G-IOT_Android8.tar.gz
Construct Compilation Environment
It could also refer to Google file: [http://source.android.com/source/initializing.html
http://source.android.com/source/initializing.html]
- Install JDK
Compilation of Android6.0 is based on JAVA7, it needs to first install OpenJDK before compilation.
Command for installing:
sudo apt-get install openjdk-7-jdk
Configure environment variable of JAVA, here is the path for installation:
/usr/lib/jvm/java-7-openjdk-amd64
It could configure on the terminal with the following command:
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
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
There are many compilation shell scripts for development.
- Android 6.0
The directory would be: SDK/code/orangepi/scripts
$ cd code/orangepi/scripts
$ ls
anr_LM.sh auto.sh clean.sh codegen.sh init_project.sh tar_img.sh
auto.sh is automatically compilation script
clean.sh automatically scavenging the compiled result script
On the directory of code/orangepi/scripts, execute the automatically compilation script:
$ ./auto.sh IoT_bd6737m_35g_b_m0_op_smt_hd720_pcb_v2 v00 eng
The meaning of the parameter is:
- $1 project_info [eg: IoT_bd6737m_35g_b_m0_op_smt_hd720_pcb_v2]
- $2 version_info [eg: v00 v01 ...]
- $3 compile_mode [eng:user userdebug eng]
- Android 8.1
The directory would be: SDK/code/orangepi/scripts
$ cd code/orangepi/scripts
$ ls
anr_LM.sh auto.sh clean.sh codegen.sh init_project.sh tar_img.sh
auto.sh--scripts for automatic compilation
clean.sh--scripts for automatically cleaning the compiled result
On the directory of code/orangepi/scripts, execute automatic compilation scripts:
$ ./auto.sh IoT_k37mv1_bsp_ry_smt_hd720_pcb_v2 v00 eng
Definition of the three parameters:
- $1 project_info [eg: IoT_k37mv1_bsp_ry_smt_hd720_pcb_v2]
- $2 version_info [eg: v00 v01 ...]
- $3 compile_mode [eng:user userdebug eng]
Execute command to compile:
source build/envsetup.sh
luncher >full_k37mv1_bsp-eng
make -j4
Module compilation
Here would take an example of only compilation launcer:
mm packages/apps/Launcher3/ or enter into directory of packages/apps/Launcher3/, execute mm
Please note that some modules depend on the relationship of package, you need to run mma.
Generated Firmware
- Android6.0
After compiled, the firmware will gather in the directory of: code/IoT_op_smt_hd720_pcb_v2, pack it and name it like the following: IoT_op_smt_hd720_pcb_v2_v00_eng_20180126140300.tar.gz
$ tree IoT_op_smt_hd720_pcb_v2 IoT_op_smt_hd720_pcb_v2
├── images
│ ├── boot.img
│ ├── cache.img
│ ├── lk.bin
│ ├── logo.bin
│ ├── MT6737M_Android_scatter.txt
│ ├── preloader_bd6737m_35g_b_m0.bin
│ ├── recovery.img
│ ├── secro.img
│ ├── system.img
│ ├── trustzone.bin
│ └── userdata.img
└── modem
├── APDB_MT6735_S01_alps-mp-m0.mp1_W17.21
├── _APDB_MT6735_S01_alps-mp-m0.mp1_W17.21.check
└── APDB_MT6735_S01_alps-mp-m0.mp1_W17.21_ENUM