lsusb Bus 001 Device 003: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
➜ ~ sudo wvdial T --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# CONNECT 150000000 --> Carrier detected. Waiting for prompt. --> Don't know what to do! Starting pppd and hoping for the best. --> Starting pppd at Wed Feb 12 16:16:27 2025 --> Pid of pppd: 43894 --> Using interface ppp0 --> local IP address 10.61.4.81 --> remote IP address 10.64.64.64 --> primary DNS address 61.139.2.69 --> secondary DNS address 218.6.200.139
1 2 3
➜ ppp0 ip a | grep ppp0 23: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 3 inet 10.61.4.81 peer 10.64.64.64/32 scope global ppp0
已经成功拨号
测试
1 2 3 4 5 6
➜ ~ ping -I ppp0 8.8.8.8 PING 8.8.8.8 (8.8.8.8) from 10.61.4.81 ppp0: 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=133 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=44.1 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=46.1 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=54 time=52.8 ms
# This is a generated gammurc file. # It was generated by Gammu configurator 0.4
# In Unix/Linux : copy it into your home directory and name it .gammurc # or into /etc and name it gammurc # In Win32 : copy it into directory with Gammu.exe and name gammurc
# Port : in Windows/DOS: "com*:", # (instead of "*" please put "1", "2", etc.) # in other (Linux/Unix) "/dev/ttyS%" # or "/dev/ircomm%" ("irda" connection) # (instead of "%" please put "0", "1", "2", etc.) # Model : use only, when Gammu doesn't recognize your phone model. # Put it here. Example values: "6110", "6150", "6210", "8210" # Connection : type of connection. Use "fbus" or "mbus" or "dlr3" or # "irda" (Infrared over sockets) or "infrared" (DirectIR) # or "at19200" (AT commands on 19200, 8 bits, None parity, # 1 stop bit, no flow control) or "at115200" (AT commands on # 115200, 8 bits, None parity, 1 stop bit, no flow control) # or "atblue" (AT over BlueTooth) or "dlr3blue" (FBUS # over BlueTooth) # SynchronizeTime: if you want to set time from computer to phone during # starting connection. Do not rather use this option when want # to reset phone during connection (in some phones need to # set time again after restart) # Logfile : Use, when want to have logfile from communication. # Logformat : What debug info and format should be used: # "nothing" - no debug level, "text" - transmission dump in # text format, "textall" - all possible info in text format, # "errors" - errors in text format, "binary" - transmission # dump in binary format # Use_Locking : under Unix/Linux use "yes", if want to lock used device # to prevent using it by other applications # GammuLoc : name of localisation file
[gammu]
port = /dev/ttyUSB3 model = connection = at19200 synchronizetime = yes logfile = logformat = nothing use_locking = gammuloc =
EC20 挂载系统成功后,在 Windows 环境下会有三个 com 口,分别为 AT Port、DM Port、NMEA Port。其中 AT Port 用于 AT 指令的收发,而 NMEA Port 用于 GPS NMEA 数据的接收。 在 Linux 系统下,EC20 被成功识别并加载后,会有四个/dev/ttyUSBx 设备文件, ttyUSB2 用于 AT 指令收发,ttyUSB1 用于 GPS NMEA 的接收。
1 2 3 4
/dev/ttyUSB0:DM 功能(Diagnostic and Monitoring,诊断和监控) /dev/ttyUSB1:GPS NMEA 数据接收 /dev/ttyUSB2:AT 指令收发 /dev/ttyUSB3:PPP 连接或者 AT 指令收发