我是靠谱客的博主 精明溪流,这篇文章主要介绍移植移远4G模块EC20过程记录2-QMI+PPP拨号上网1、背景2、移植QMI_WWAN驱动3、ppp拨号最后,现在分享给大家,希望可以做个参考。

目录

1、背景

2、移植QMI_WWAN驱动

2.1 准备源码

2.2 修改源码

2.3 make

2.4 安装

2.5 编译cdc_wdm

2.6 再次安装

2.7 验证QMI驱动

3、ppp拨号

3.1 修改内核配置

3.2 打包和更换内核

3.3 验证

最后

1、背景

前文讲移植移远Gobinet驱动,拨号报错,无法上网。原厂支持现场支援,换用QMI_WWAN拨号。Gobinet问题需要给原厂提单,由研发人员解决。

2、移植QMI_WWAN驱动

Gobinet和QMI_WWAN驱动是二选一的关系,不能同时使用。Gobinet和QMI_WWAN均属于网卡范畴,和移远的4G模块EC20驱动没有直接关系。所以EC20驱动编入内核,Gobinet和QMI_WWAN编成KO模块,需要时安装,不需要时卸载。

移远的指引《Quectel_LTE&5G_Linux_USB_Driver_User_Guide_V2.0.pdf》中关于QMI_WWAN驱动的移植,是编入内核的,这里不做介绍。下面说说编成模块的方法:

2.1 准备源码

将移远提供的源码放在编译环境的任意位置。不一定是内核路径。

我用的编辑环境是VMware的ubuntu18.04,已经预先安装了智芯指定的交叉编译工具。

源码内容是这样的:

复制代码
1
2
3
root@ubuntu:/home/wang/WWAN/qmi_wwan_q# ls log Makefile qmi_wwan_q.c ReleaseNote.txt rmnet_nss.c

2.2 修改源码

修改其中的Makefile文件:

修改前: 

修改后:

 这里无法修改一下ARCH OUTPUTDIR和KDIR,ARCH是架构(arm或是x86,也可以通过export指定),KDIR是内核源码路径,OUTPUTDIR是依赖的其他文件路径。

2.3 make

指定框架  工具链和工具链路径,直接敲:

复制代码
1
2
3
export ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- export PATH=$PATH:/usr/src/toolchain/gcc-linaro-7.5.0-arm-linux-gnueabihf/bin

在上述路径下敲make,没有报错便会在当前目录下得到qmi_wwan_q.ko文件。

复制代码
1
2
root@ubuntu:/home/wang/WWAN/qmi_wwan_q# ls log Makefile modules.order Module.symvers qmi_wwan_q.c qmi_wwan_q.ko qmi_wwan_q.mod.c qmi_wwan_q.mod.o qmi_wwan_q.o ReleaseNote.txt rmnet_nss.c

2.4 安装

将生产的qmi_wwan_q.ko导入板子中,insmod qmi_wwan_q.ko发现报错:

复制代码
1
2
root@scm801:/home/wang# insmod qmi_wwan_q.ko insmod: ERROR: could not insert module qmi_wwan_q.ko: Unknown symbol in module

这是因为qmi_wwan_q.ko有依赖的东西没有加载。我的内核没有编译cdc_wdm。

我是怎么知道这里缺少的是cdc_wdm,而不是其他东西呢?我记得在“2.3 make”这步没有那么顺利,会报和cdc_wdm相关的错误。该文就不深究了。

USB的CDC类是USB通信设备类 (Communication Device Class)的简称。CDC类是USB组织定义的一类专门给各种通信设备(电信通信设备和中速网络通信设备)使用的USB子类。而CDC_WDM驱动程序是用来管理USB CDC WCM设备。QMI就是依赖这种驱动拨号上网的。

2.5 编译cdc_wdm

编译cdc_wdm有两种方法:第一编入内核(我还没研究),第二是编成ko模块,在加载qmi_wwan_q.ko之前,先加载cdc_wdm.ko。具体步骤如下:

在内核源码中找到文件,我的路径是:

复制代码
1
/usr/src/kernel/drivers/usb/class/cdc-wdm.c

其中/usr/src/kernel/是我的内核的父路径。 

 将它复制到一个刚新建的目录cdc_wdm中,再复制原qmi_wwan_q的Makefile然后改改:

复制代码
1
2
3
root@ubuntu:/home/wang/WWAN/cdc_wdm# ls cdc-wdm.c Makefile

只需要修改makefile文件的抬头,生产什么样的.o文件就行了:

 编译qmi驱动时指定过了交叉链和路径了,我们在cdc_wdm目录下直接make就可以了:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
root@ubuntu:/home/wang/WWAN/cdc_wdm# make make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C /usr/src/kernel M=/home/wang/WWAN/cdc_wdm modules make[1]: Entering directory '/usr/src/kernel' CC [M] /home/wang/WWAN/cdc_wdm/cdc-wdm.o Building modules, stage 2. MODPOST 1 modules CC /home/wang/WWAN/cdc_wdm/cdc-wdm.mod.o LD [M] /home/wang/WWAN/cdc_wdm/cdc-wdm.ko make[1]: Leaving directory '/usr/src/kernel' root@ubuntu:/home/wang/WWAN/cdc_wdm# ls cdc-wdm.c cdc-wdm.ko cdc-wdm.mod.c cdc-wdm.mod.o cdc-wdm.o Makefile modules.order Module.symvers root@ubuntu:/home/wang/WWAN/cdc_wdm#

这样就生成了cdc-wdm.ko文件。我们将该文件传入板子加载。

2.6 再次安装

复制代码
1
2
3
root@scm801:/home/wang# insmod cdc-wdm.ko root@scm801:/home/wang# insmod qmi_wwan_q.ko

在/dev路径下能看到cdc-wdm0驱动节点:

2.7 验证QMI驱动

前文编译出来的执行文件quectel-CM是通用文件,即用Gobinet网卡和QMI_WWAN网卡都能拨号,二选一。如果之前将Gobinet网卡编入了内核,先去掉,不然和QMI冲突。

复制代码
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
root@scm801:/home/wang# ./quectel-CM [06-21_09:31:37:496] QConnectManager_Linux_V1.6.2 [06-21_09:31:37:498] Find /sys/bus/usb/devices/2-1 idVendor=0x2c7c idProduct=0x125, bus=0x002, dev=0x002 [06-21_09:31:37:498] Auto find qmichannel = /dev/cdc-wdm0 [06-21_09:31:37:498] Auto find usbnet_adapter = wwan0 [06-21_09:31:37:499] netcard driver = qmi_wwan_q, driver version = V1.2.1 [06-21_09:31:37:499] Modem works in QMI mode [06-21_09:31:37:507] cdc_wdm_fd = 7 [06-21_09:32:07:555] QmiWwanInit message timeout [06-21_09:32:37:595] QmiWwanGetClientID message timeout [06-21_09:32:42:605] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_09:33:12:645] QmiWwanGetClientID message timeout [06-21_09:33:17:655] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_09:33:47:695] QmiWwanGetClientID message timeout [06-21_09:33:52:705] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_09:34:22:745] QmiWwanGetClientID message timeout [06-21_09:34:27:755] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_09:34:57:795] QmiWwanGetClientID message timeout [06-21_09:34:57:795] QMIType 2 has no clientID [06-21_09:34:57:795] requestBaseBandVersion err = -19 [06-21_09:34:57:795] QMIType 26 has no clientID [06-21_09:34:57:795] requestSetEthMode err = -19 [06-21_09:34:57:795] QMIType 11 has no clientID [06-21_09:34:57:795] requestGetSIMStatus err = -19 [06-21_09:34:57:795] QMIType 1 has no clientID [06-21_09:34:57:796] requestGetProfile err = -19 [06-21_09:34:57:796] QMIType 3 has no clientID [06-21_09:34:57:796] requestRegistrationState2 err = -19 [06-21_09:34:57:796] QMIType 1 has no clientID [06-21_09:34:57:796] requestQueryDataCall err = -19 [06-21_09:34:57:796] ifconfig wwan0 0.0.0.0

报错,无法拨通。我们加-v试试,-v打印详细的拨号过程。

复制代码
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
root@scm801:/home/wang# ./quectel-CM -v [06-21_07:02:22:668] QConnectManager_Linux_V1.6.2 [06-21_07:02:22:669] (/sys/bus/usb/devices/2-1/idVendor) = 2c7c [06-21_07:02:22:669] (/sys/bus/usb/devices/2-1/idProduct) = 125 [06-21_07:02:22:669] (/sys/bus/usb/devices/2-1/busnum) = 2 [06-21_07:02:22:669] (/sys/bus/usb/devices/2-1/devnum) = 2 [06-21_07:02:22:669] (/sys/bus/usb/devices/2-1/bNumInterfaces) = 5 [06-21_07:02:22:669] Find /sys/bus/usb/devices/2-1 idVendor=0x2c7c idProduct=0x125, bus=0x002, dev=0x002 [06-21_07:02:22:670] (/sys/bus/usb/devices/2-1:1.4/bNumEndpoints) = 3 [06-21_07:02:22:670] (/sys/bus/usb/devices/2-1:1.4/bInterfaceClass) = ff [06-21_07:02:22:670] (/sys/bus/usb/devices/2-1:1.4/bInterfaceSubClass) = ff [06-21_07:02:22:670] (/sys/bus/usb/devices/2-1:1.4/bInterfaceProtocol) = ff [06-21_07:02:22:670] driver -> ../../../../../../../bus/usb/drivers/qmi_wwan_q [06-21_07:02:22:670] /sys/bus/usb/devices/2-1:1.4/usbmisc [06-21_07:02:22:670] Auto find qmichannel = /dev/cdc-wdm0 [06-21_07:02:22:670] Auto find usbnet_adapter = wwan0 [06-21_07:02:22:670] netcard driver = qmi_wwan_q, driver version = V1.2.1 [06-21_07:02:22:671] Modem works in QMI mode [06-21_07:02:22:679] cdc_wdm_fd = 7 [06-21_07:02:22:679] 01 0b 00 00 00 00 00 01 27 00 00 00 [06-21_07:02:22:680] TransactionId: 01 QMICTLType: 0027 QMICTL_SYNC_REQ Length: 0000 [06-21_07:02:22:710] 01 12 00 80 00 00 01 01 27 00 07 00 02 04 00 00 00 00 00 [06-21_07:02:22:710] TransactionId: 01 QMICTLType: 0027 QMICTL_SYNC_RESP Length: 0007 {02, 0004, 00 00 00 00 } [06-21_07:02:22:710] 01 0f 00 00 00 00 00 02 21 00 04 00 01 01 00 ff [06-21_07:02:22:710] TransactionId: 02 QMICTLType: 0021 QMICTL_GET_VERSION_REQ Length: 0004 {01, 0001, ff } [06-21_07:02:52:743] QmiWwanInit message timeout [06-21_07:02:52:743] 01 0f 00 00 00 00 00 03 22 00 04 00 01 01 00 01 [06-21_07:02:52:743] TransactionId: 03 QMICTLType: 0022 QMICTL_GET_CLIENT_ID_REQ Length: 0004 {01, 0001, 01 } [06-21_07:03:22:783] QmiWwanGetClientID message timeout [06-21_07:03:22:783] 01 0f 00 00 00 00 00 04 22 00 04 00 01 01 00 02 [06-21_07:03:22:783] TransactionId: 04 QMICTLType: 0022 QMICTL_GET_CLIENT_ID_REQ Length: 0004 {01, 0001, 02 } [06-21_07:03:27:793] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_07:03:57:833] QmiWwanGetClientID message timeout [06-21_07:03:57:833] 01 0f 00 00 00 00 00 05 22 00 04 00 01 01 00 03 [06-21_07:03:57:833] TransactionId: 05 QMICTLType: 0022 QMICTL_GET_CLIENT_ID_REQ Length: 0004 {01, 0001, 03 } [06-21_07:04:02:843] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_07:04:32:883] QmiWwanGetClientID message timeout [06-21_07:04:32:883] 01 0f 00 00 00 00 00 06 22 00 04 00 01 01 00 0b [06-21_07:04:32:883] TransactionId: 06 QMICTLType: 0022 QMICTL_GET_CLIENT_ID_REQ Length: 0004 {01, 0001, 0b } [06-21_07:04:37:893] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_07:05:07:933] QmiWwanGetClientID message timeout [06-21_07:05:07:933] 01 0f 00 00 00 00 00 07 22 00 04 00 01 01 00 1a [06-21_07:05:07:933] TransactionId: 07 QMICTLType: 0022 QMICTL_GET_CLIENT_ID_REQ Length: 0004 {01, 0001, 1a } [06-21_07:05:12:943] QmiWwanSendQMI poll=0, revents = 0x0, errno: 2 (No such file or directory) [06-21_07:05:42:983] QmiWwanGetClientID message timeout [06-21_07:05:42:983] 01 0c 00 00 02 00 00 01 00 23 00 00 00 [06-21_07:05:42:983] TransactionId: 0001 Type: 0023 QMIDMS_GET_DEVICE_REV_ID_REQ Length: 0000 [06-21_07:05:42:983] QMIType 2 has no clientID [06-21_07:05:42:983] requestBaseBandVersion err = -19 [06-21_07:05:42:984] 01 1e 00 00 1a 00 00 02 00 20 00 12 00 10 01 00 00 11 04 00 01 00 00 00 13 04 00 00 00 00 00 [06-21_07:05:42:984] TransactionId: 0002 Type: 0020 QMIWDS_ADMIN_SET_DATA_FORMAT_REQ Length: 0012 {10, 0001, 00 } {11, 0004, 01 00 00 00 } {13, 0004, 00 00 00 00 } [06-21_07:05:42:984] QMIType 26 has no clientID [06-21_07:05:42:984] requestSetEthMode err = -19 [06-21_07:05:42:984] 01 0c 00 00 0b 00 00 03 00 2f 00 00 00 [06-21_07:05:42:984] TransactionId: 0003 Type: 002f QMIUIM_GET_CARD_STATUS_REQ Length: 0000 [06-21_07:05:42:984] QMIType 11 has no clientID [06-21_07:05:42:984] requestGetSIMStatus err = -19 [06-21_07:05:42:984] 01 11 00 00 01 00 00 04 00 2b 00 05 00 01 02 00 00 01 [06-21_07:05:42:984] TransactionId: 0004 Type: 002b QMIWDS_GET_PROFILE_SETTINGS_REQ Length: 0005 {01, 0002, 00 01 } [06-21_07:05:42:984] QMIType 1 has no clientID [06-21_07:05:42:984] requestGetProfile err = -19 [06-21_07:05:42:984] 01 0c 00 00 03 00 00 05 00 4d 00 00 00 [06-21_07:05:42:984] TransactionId: 0005 Type: 004d QMINAS_GET_SYS_INFO_REQ Length: 0000 [06-21_07:05:42:984] QMIType 3 has no clientID [06-21_07:05:42:984] requestRegistrationState2 err = -19 [06-21_07:05:42:984] 01 0c 00 00 01 00 00 06 00 22 00 00 00 [06-21_07:05:42:984] TransactionId: 0006 Type: 0022 QMIWDS_GET_PKT_SRVC_STATUS_REQ Length: 0000 [06-21_07:05:42:984] QMIType 1 has no clientID [06-21_07:05:42:985] requestQueryDataCall err = -19 [06-21_07:05:42:985] ifconfig wwan0 0.0.0.0

这些详细的交互过程,我们也看不懂呀。

除了拨不通以外,我们还发现后台有两个quectel-CM进程,而且还杀不掉。

不知道是系统问题还是拨号工具quectel-CM的问题,待研究。

3、ppp拨号

这个就简单了,它是通过运行脚本文件,对虚拟串口ttyUSB2/3写AT指令。这里就不翻译移远教程了。

ppp拨号脚本及相关的connect和杀进程脚本,请下载我的资源:

ppp拨号脚本,包含拨号和杀进程脚本等等-网管软件文档类资源-CSDN下载

脚本quectel-pppd.sh是移远给的,具体内容如下:

复制代码
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
#!/bin/sh #quectel-pppd devname apn user password echo "quectel-pppd options in effect:" QL_DEVNAME=/dev/ttyUSB3 QL_APN=3gnet QL_USER=user QL_PASSWORD=passwd if [ $# -ge 1 ]; then QL_DEVNAME=$1 echo "devname $QL_DEVNAME # (from command line)" else echo "devname $QL_DEVNAME # (default)" fi if [ $# -ge 2 ]; then QL_APN=$2 echo "apn $QL_APN # (from command line)" else echo "apn $QL_APN # (default)" fi if [ $# -ge 3 ]; then QL_USER=$3 echo "user $QL_USER # (from command line)" else echo "user $QL_USER # (default)" fi if [ $# -ge 4 ]; then QL_PASSWORD=$4 echo "password $QL_PASSWORD # (from command line)" else echo "password $QL_PASSWORD # (default)" fi CONNECT="'chat -s -v ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT ERROR ABORT "NO ANSWER" TIMEOUT 30 "" AT OK ATE0 OK ATI;+CSUB;+CSQ;+CPIN?;+COPS?;+CGREG?;&D2 OK AT+CGDCONT=1,\"IP\",\"$QL_APN\",,0,0 OK ATD*99# CONNECT'" pppd $QL_DEVNAME 115200 user "$QL_USER" password "$QL_PASSWORD" connect "'$CONNECT'" disconnect 'chat -s -v ABORT ERROR ABORT "NO DIALTONE" SAY "nSending break to the modemn" "" +++ "" +++ "" +++ SAY "nGood bayn"' noauth debug defaultroute noipdefault novj novjccomp noccp ipcp-accept-local ipcp-accept-remote ipcp-max-configure 30 local lock modem dump nodetach nocrtscts usepeerdns &

3.1 修改内核配置

该脚本需要内核支持ppp拨号。

内核源码的父目录下执行:make menuconfig,按照下面的层级找到“PPP (point-to-point protocol) support”,并按y,使其编入内核。

复制代码
1
2
3
[*] Device Drivers → [*] Network device support → [*] PPP (point-to-point protocol) support

注意:PPP选项在打星号前是一个条目,在按y选中后,该条目下面会多出好多条目,我们不用关心,用默认配置保存退出即可。

 

修改了配置了,make -j4,编译内核,在目录/usr/src/kernel/arch/arm/boot下有文件zImage,这就是内核镜像,用该镜像打包成内核文件供板子直接使用。复制它到板子上,更新内核。(打包和更新的命令是智芯微给的,不一定具有通用性,大家可以参考一下)。

3.2 打包和更换内核

智芯微提供的文件夹是这样的:

 

3.3 验证

更换内核后,在目录/dev/下能看到ppp的驱动节点。

注意:在拨号前先删除系统的默认路由,不然即使拨通了也无法上网。在系统上直接敲:

复制代码
1
route del default

再使用脚本quectel-pppd.sh拨号:

复制代码
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
root@scm801:/home/wang/linux-ppp-scripts# ./quectel-pppd.sh /dev/ttyUSB2 quectel-pppd options in effect: devname /dev/ttyUSB2 # (from command line) apn 3gnet # (default) user user # (default) password passwd # (default) pppd options in effect: debug # (from command line) nodetach # (from command line) dump # (from command line) noauth # (from command line) user user # (from command line) password ?????? # (from command line) /dev/ttyUSB2 # (from command line) 115200 # (from command line) lock # (from command line) connect ''chat -s -v ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT ERROR ABORT "NO ANSWER" TIMEOUT 30 "" AT OK ATE0 OK ATI\;+CSUB\;+CSQ\;+CPIN?\;+COPS?\;+CGREG?\;\&D2 OK AT+CGDCONT=1,\"IP\",\"3gnet\",,0,0 OK ATD*99# CONNEC # (from command line) disconnect chat -s -v ABORT ERROR ABORT "NO DIALTONE" SAY "\nSending break to the modem\n" "" +++ "" +++ "" +++ SAY "\nGood bay\n" # (from command line) nocrtscts # (from command line) modem # (from command line) asyncmap 0 # (from /etc/ppp/options) lcp-echo-failure 4 # (from /etc/ppp/options) lcp-echo-interval 30 # (from /etc/ppp/options) hide-password # (from /etc/ppp/options) novj # (from command line) novjccomp # (from command line) ipcp-accept-local # (from command line) ipcp-accept-remote # (from command line) noipdefault # (from command line) ipcp-max-configure 30 # (from command line) defaultroute # (from command line) usepeerdns # (from command line) noccp # (from command line) noipx # (from /etc/ppp/options) root@scm801:/home/wang/linux-ppp-scripts# abort on (BUSY) abort on (NO CARRIER) abort on (NO DIALTONE) abort on (ERROR) abort on (NO ANSWER) timeout set to 30 seconds send (AT^M) expect (OK) AT^M^M OK -- got it send (ATE0^M) expect (OK) ^M ATE0^M^M OK -- got it send (ATI;+CSUB;+CSQ;+CPIN?;+COPS?;+CGREG?;&D2^M) expect (OK) ^M ^M Quectel^M EC20F^M Revision: EC20CEHDLGR06A05M1G^M ^M SubEdition: V03^M ^M +CSQ: 31,99^M ^M +CPIN: READY^M ^M +COPS: 0,0,"CHN-UNICOM",7^M ^M +CGREG: 0,1^M ^M OK -- got it send (AT+CGDCONT=1,"IP","3gnet",,0,0^M) expect (OK) ^M ^M OK -- got it send (ATD*99#^M) expect (CONNECT) ^M ^M CONNECT -- got it Script ''chat -s -v ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT ERROR ABORT "NO ANSWER" TIMEOUT 30 "" AT OK ATE0 OK ATI;+CSUB;+CSQ;+CPIN?;+COPS?;+CGREG?;&D2 OK AT+CGDCONT=1,"IP","3gnet",,0,0 OK ATD*99# CONNECT'' finished (pid 364), status = 0x0 Serial connection established. using channel 1 Using interface ppp0 Connect: ppp0 <--> /dev/ttyUSB2 sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xaee1219c> <pcomp> <accomp>] rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xc63dcf81> <pcomp> <accomp>] sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xc63dcf81> <pcomp> <accomp>] rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xaee1219c> <pcomp> <accomp>] sent [LCP EchoReq id=0x0 magic=0xaee1219c] rcvd [LCP DiscReq id=0x1 magic=0xc63dcf81] rcvd [CHAP Challenge id=0x1 <2e750da5c19ad54e1b3f558a3cf46c95>, name = "UMTS_CHAP_SRVR"] sent [CHAP Response id=0x1 <61712dbe7c3685e20e294713ff4f0a6b>, name = "user"] rcvd [LCP EchoRep id=0x0 magic=0xc63dcf81 ae e1 21 9c] rcvd [CHAP Success id=0x1 ""] CHAP authentication succeeded CHAP authentication succeeded sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>] rcvd [IPCP ConfReq id=0x0] sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>] rcvd [IPCP ConfNak id=0x1 <addr 10.18.14.216> <ms-dns1 221.6.4.66> <ms-dns2 58.240.57.33>] sent [IPCP ConfReq id=0x2 <addr 10.18.14.216> <ms-dns1 221.6.4.66> <ms-dns2 58.240.57.33>] rcvd [IPCP ConfReq id=0x1] sent [IPCP ConfAck id=0x1] rcvd [IPCP ConfAck id=0x2 <addr 10.18.14.216> <ms-dns1 221.6.4.66> <ms-dns2 58.240.57.33>] Could not determine remote IP address: defaulting to 10.64.64.64 local IP address 10.18.14.216 remote IP address 10.64.64.64 primary DNS address 221.6.4.66 secondary DNS address 58.240.57.33 Script /etc/ppp/ip-up started (pid 373) Script /etc/ppp/ip-up finished (pid 373), status = 0x0

ip分配到了,敲ifconfig能看到网卡ppp0:

ping一把百度能通:

复制代码
1
2
3
4
5
6
7
8
9
root@scm801:/home/wang/linux-ppp-scripts# ping www.baidu.com PING www.a.shifen.com (112.80.248.75) 56(84) bytes of data. 64 bytes from 112.80.248.75 (112.80.248.75): icmp_seq=1 ttl=56 time=23.9 ms 64 bytes from 112.80.248.75 (112.80.248.75): icmp_seq=2 ttl=56 time=19.5 ms ^C --- www.a.shifen.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1004ms rtt min/avg/max/mdev = 19.541/21.742/23.944/2.206 ms

注意:不是每次ppp拨号都能成功。可能需要多操作几次,可能需要reboot,可能板子需要断电重启。总是,ppp拨号不稳定。可能和智芯微裁剪的ubuntu系统有关。

最后

搞了这么多,终于有种方式能拨号上网了。Gobinet和qmi报错的问题,我会在下一篇文章,按照移远的要求抓log,给移远分析。这里的log是指usbmon log和Qlog。

最后

以上就是精明溪流最近收集整理的关于移植移远4G模块EC20过程记录2-QMI+PPP拨号上网1、背景2、移植QMI_WWAN驱动3、ppp拨号最后的全部内容,更多相关移植移远4G模块EC20过程记录2-QMI+PPP拨号上网1、背景2、移植QMI_WWAN驱动3、ppp拨号最后内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(156)

评论列表共有 0 条评论

立即
投稿
返回
顶部