Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 2G-IoT

No change in size, 19:08, 29 June 2022
Connect to Network via GSM
=== '''Connect to Network via GSM''' ===
<br>
1)Use 2G-IOT IoT to send message<br>
<br>
For now the version of Ubuntu,Debian and Raspbian could support SMS sending message. Before using the SMS function, please make sure the SIM card you use is active.<br>
i.Prepare <br>
<br>
First you need to prepare an activated Micro SIM card and insert into Orange Pi 2G-IOTIoT, the Orange PI 2G-IOT IoT could support the following frequency:<br>
Frequency Range: 850,900,1800,1900 <br>
Standard: GSM800<br>
a.With Serial Port<br>
<br>
You need to install the tool of minicom on Orange Pi 2G-IOT IoT before using SMS. Please make sure the board has already connect to wifi.<br>
You could install minicom with the following command:<br>
<div style="padding-left:40px;"><span style="background:#fffaa5;">sudo apt-get install minico</span></div>
<div>[[File:Orange-pi-2g-iot-img36.png|600px]]</div>
<br>
Detail steps you could refer to the following: “'''OrangePi_2G_IOT_GSM_DemoOrangePi_2G_IoT_GSM_Demo.c'''”<br>
Here is the reflect of running C:<br>
<br>
<div>[[File:Orange-pi-2g-iot-img39.png|600px]]</div>
<br>
Finally you will receive the message from OrangePi 2G-IOTIoT<br>
<br>
<div>[[File:Orange-pi-2g-iot-img40.png|300px]]</div>
<br>
* OrangePi_2G_IOT_GSM_DemoOrangePi_2G_IoT_GSM_Demo.c
<br>
<div style="background:#fbfaf8;padding:20px;">
<nowiki>/*</nowiki><br>
<nowiki>* OrangePi 2G-IOT IoT GSM Demo</nowiki><br>
<nowiki>*  (C) Copyright 2017 OrangePi</nowiki><br>
<nowiki>*/</nowiki><br>
<br>
    printf("************************************************\n");<br>
    printf("\tWelcome to OrangePi 2G-IOTIoT\n");<br>
    printf("\tModem version %s\n", VERSION);<br>
    printf("************************************************\n");<br>
</div>
<br>
The open source project WiringPi is working on OrangePi 2G-IOTIoT. This section will introduce how to utilize WiringPi on OrangePi 2G-IOTIoT. The following is definition of 40pin.<br>
<br>
<div>[[File:Orange-pi-2g-iot-img17.png|500px|]]</div>
Usage:<br>
<br>
1)Download WiringPi image of OrangePi 2G-IOTIoT<br>
<br>
env GIT_SSL_NO_VERIFY=true git clone https://github.com/OrangePiLibra/WiringPi.git<br>
<br>
cd WiringPi<br>
sudo ./build OrangePi_2G-IOTIoT<br>
sudo ./build install<br>
<br>
<br>
Reality Test<br>
OrangePi 2G-IOT IoT contains GPIOA, GPIOB, GPIOC and GPIOD. Each of group has 32 gpio. The type of GPIO is "Input", "Output" and "specify function" such as "I2C", "I2S" and so on. On board, OrangePi 2G-IOT exports 40 pins as different function. User can utilize these, GPIO on different application scenarios. For example, User can configure the type of GPIO as "Input", and get current voltage from program. Another hand, User can configure GPIO as specify function, such as "Uart", "I2C" and "SPI".<br>
<br>
<div>[[File:Orange-pi-2g-iot-img54.png|500px|]]</div>
<br>
Please note that: On OrangePi 2G-IOTIoT, GPIOA, GPIOB and GPIOD tract as general GPIO, but GPIOC as non-general GPIO. Because of some hardware design. The host of GPIOC is modem not CPU. So, If CPU wanna control GPIOC, it must send message to Modem, and Moden get message and control GPIOC, it's not good news. In other words. on version 0.1, GPIOC only support "OUTPUT" mode. <br>
The size of GPIOx group is 32, so we can get gpio map:<br>
GPIOA: 0   -  31<br>