Difference between revisions of "Template:Linux-SIM800C"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
Line 1: Line 1:
测试SIM800C前请先插入可以使用的SIM卡,并装配GSM/GPRS天线。<br>
+
To test SIM800C you need to insert a SIM card and install a GSM/GPRS antenna.<br>
NanoPi-Duo2的FriendlyCore系统里默认集成了一个用于测试SIM800C的Python demo程序,其使用方法如下:
+
By default the FriendlyCore system FriendlyElec provides has a Python demo for testing SIM800C. Run the following commands to test it:
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
 
$ cd /root/Python/GSM-GPRS/sim800c
 
$ cd /root/Python/GSM-GPRS/sim800c
Line 6: Line 6:
 
$ pip install --upgrade pip
 
$ pip install --upgrade pip
 
$ pip install pyserial
 
$ pip install pyserial
$ ./sim800c-test.py -h              # 查看帮助信息
+
$ ./sim800c-test.py -h              # Check help information
 
./sim800c-test.py -p <phone_number> -o <operator, cmcc> -w <website>
 
./sim800c-test.py -p <phone_number> -o <operator, cmcc> -w <website>
$ ./sim800c-test.py -p 136xxxxxxxx  -o cmcc -w www.baidu.com  # 访问百度
+
$ ./sim800c-test.py -p 136xxxxxxxx  -o cmcc -w www.baidu.com  # Visit baidu.com
 
</syntaxhighlight>
 
</syntaxhighlight>
 
::{| class="wikitable"
 
::{| class="wikitable"
 
|-
 
|-
| 参数与 || 作用
+
| Option || Comment
 
|-
 
|-
| -p || 指定sim卡的电话号码,请填写真实的电话号码
+
| -p || specifies a telephone number for sim card.
 
|-
 
|-
| -o || 指定运营商,cmcc是China Mobile Communication Corporation的缩写
+
| -o || specifies a telecom operator. For example "cmcc" stands for China Mobile Communication Corporation.
 
|-
 
|-
| -w || 指定要访问的网站的网址
+
| -w || specifies a website to visit
 
|}
 
|}
  
程序默认会拉取1K的网站数据,请耐心等候。如果访问成功,会有类似下面的信息:<br>
+
By default this demo will load 1K bytes' data from the specified website. If it is successful you will see the following information:<br>
 
[[File:sim800c-surf.png|frameless|800px|]]<br>
 
[[File:sim800c-surf.png|frameless|800px|]]<br>

Revision as of 07:56, 21 January 2019

To test SIM800C you need to insert a SIM card and install a GSM/GPRS antenna.
By default the FriendlyCore system FriendlyElec provides has a Python demo for testing SIM800C. Run the following commands to test it:

$ cd /root/Python/GSM-GPRS/sim800c
$ apt-get install python-pip
$ pip install --upgrade pip
$ pip install pyserial
$ ./sim800c-test.py -h              # Check help information
./sim800c-test.py -p <phone_number> -o <operator, cmcc> -w <website>
$ ./sim800c-test.py -p 136xxxxxxxx  -o cmcc -w www.baidu.com  # Visit baidu.com
Option Comment
-p specifies a telephone number for sim card.
-o specifies a telecom operator. For example "cmcc" stands for China Mobile Communication Corporation.
-w specifies a website to visit

By default this demo will load 1K bytes' data from the specified website. If it is successful you will see the following information:
Sim800c-surf.png