-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathreadme
63 lines (26 loc) · 1.49 KB
/
readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Pay attention: Donot modify the 3 files in Windows.
Pay attention: It will make the 3 file become Dos format.
Pay attention: Dos Format files cannot be parsed by pppd and chat.
Pay attention: dos2unix command can convert files in DOS format to Unix format.
customize your 'serial device name' & 'user' & 'passowrd' in quectel-ppp
customize your 'apn' in quectel-chat-connect
copy the 3 file to /etc/ppp/peers/
exec command 'pppd call quectel-ppp'
注意不要在 windows 下编辑该目录下的文件、否则会使得这些文件变成 dos 格式.
windows 的 dos 格式是指文件的每行以 \r\n 结尾,而 linux 的文件默认是以 \n 结尾的。
pppd 和 chat 不能解析 dos 格式的文件。
工具 dos2unix 可以把 dos 格式的文件转成 linux 格式。
有2种方法启动ppp拨号
方式1: 拷贝 quectel-chat-connect quectel-chat-disconnect quectel-ppp 到 /etc/ppp/peers 目录下。
并在 quectel-ppp 里修改你的串口设备名,pppd 拨号使用的 username,password。
在 quectel-chat-connect 里修改你的 APN。APN/username/password 是从你的网络提供商那里获取的。
然后使用下面的命令启动 ppp 拨号, 命令最后的 & 可以让 pppd 后台运行
pppd call quectel-ppp &
方式2:使用quectel-pppd.sh 拨号,命令形式如下:
./quectel-pppd.sh 串口设备名(比如/dev/ttyUSB3) APN username password
ip-up:pppd 在获取 ip 和 dns 之后,会自动调用这个脚本文件来设置系统的 DNS
嵌入式系统一般需要拷贝这个文件到 /etc/ppp 目录下。
请确保该文件在你的系统里有可执行权限。
quectel-ppp-kill 用来挂断拨号的,pppd必须被正常的挂断,否则可能会导致你下次ppp拨号失败。
使用下面方式来调用这个脚本
./quectel-ppp-kill