Page tree
Skip to end of metadata
Go to start of metadata

PanGu开发板搭载的Linux系统己经支持USB接口的4G通信模块,支持列表如下:

型号USB VID/PID厂商通讯方式安装方式通讯速度

EC20CFD-512-STD

EC20CEHC-128-SNNS

2c7c:0125Quectel(移远)USBMini PCIeCAT.4
ME909s-82112d1:15c1HUAWEI(华为)USBMini PCIeCAT.4
EC20CEFAG-512-SGNS
Quectel(移远)USB贴片CAT.4
CLM920-AC3m1286:4e3cYUGA(域格)USBMini PCIeCAT.4
EC200S-CN2c7c:6002Quectel(移远)USBMini PCIeCAT.1

以上型号的模块插入USB Host接口或连接至USB信号线后,系统后识别到模块,并出现对应的操作串口或网络设备。


Linux kernel中要启用以下功能项:

CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOE=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m


移远EC20

下面以EC20为例,来检查LTE模块是否正常识别。

Linux系统启动后,使用dmesg可以查看到启动时USB设备。

# dmesg | grep usb
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4


驱动加载成功后"/dev"目录下有会出现五个设备。

Device NodeDescriptionNote
/dev/ttyUSB0DM port

Diagnose port

/dev/ttyUSB1NEMA port

For GPS NMEA message output

/dev/ttyUSB2AT port

For AT commands

/dev/ttyUSB3Modem port

For PPP connections and AT commands

/dev/ttyUSB4Wireless Ethernet Adapter portNetwork Driver Interface


4G网络接口驱动

内核要启用以下模块选项:

CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_QMI_WWAN=m


移远EC200S-CN

查看设备

root@pangu:~# lsusb
Bus 001 Device 003: ID 0424:9e00 Standard Microsystems Corp. LAN9500A/LAN9500Ai
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 2c7c:6002 Quectel Wireless Solutions Co., Ltd.
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@pangu:~# dmesg| grep rndis
[    1.862859] usbcore: registered new interface driver rndis_host
[    3.655113] rndis_host 1-1.3:1.0 usb0: register 'rndis_host' at usb-5800d000.usbh-ehci-1.3, RNDIS device, fa:68:6e:ed:ed:ae

以上信息可以知道,EC200S-CN模块的USB设备已经被USB总线识别,并且设备为usb0。

联网方法

# ifconfig usb0 up
# udhcpc -i usb0
udhcpc: started, v1.29.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.43.100
udhcpc: lease of 192.168.43.100 obtained, lease time 86400
/etc/udhcpc.d/50default: Adding DNS 192.168.43.1

测连接是否正常

root@pangu:~# ping bing.com
PING bing.com (204.79.197.200) 56(84) bytes of data.
64 bytes from a-0001.a-msedge.net (204.79.197.200): icmp_seq=1 ttl=116 time=70.4 ms
64 bytes from a-0001.a-msedge.net (204.79.197.200): icmp_seq=4 ttl=116 time=79.2 ms
64 bytes from a-0001.a-msedge.net (204.79.197.200): icmp_seq=5 ttl=116 time=69.2 ms
64 bytes from a-0001.a-msedge.net (204.79.197.200): icmp_seq=6 ttl=116 time=72.5 ms
64 bytes from a-0001.a-msedge.net (204.79.197.200): icmp_seq=7 ttl=116 time=73.6 ms
64 bytes from a-0001.a-msedge.net (204.79.197.200): icmp_seq=8 ttl=116 time=72.5 ms


测试速度

root@pangu:~# ./speedtest-linux-arm-speed-issues
github.com/zpeters/speedtest -- unofficial cli for speedtest.net
Server: 26380 - xi‘an (Shaanxi china mobile)
2019/11/09 10:25:56 Testing download speed
..........
2019/11/09 10:27:46 Testing upload speed
.....
Ping (Lowest): 93.44 ms | Download (Max): 7.26 Mbps | Upload (Max): 4.19 Mbps

可以看到,下载速度为7.26Mbps,上传速度为4.19Mbps。

YUGA CLM920 AC3模块

CLM920 AC3模块被识别后有三个串口和一个网络设备

root@pangu:~# ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2
root@pangu:~# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr AC:9E:E7:0B:46:78
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::ae9e:e7ff:fe0b:4678/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:201 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1236 (1.2 KiB)  TX bytes:57050 (55.7 KiB)

串口设备分别表示如下

串口设备描述
ttyUSB0RNDIS
ttyUSB1CDC-DATA
ttyUSB2DIAG

网络设备有IP地址后,配置好DNS服务器信息,就可以使用ping工具来测试互联网的连通性了。

FAQ

1.如何确认设备驱动正常可用?

可以从两个方面来确认驱动加载成功。

A. 设备连接后,系统有发现USB设备,并且使用lsusb命令可以查看到是否有对应VID/PID的设备。如果未发现USB设备,应检查USB信号或外围电路是否正确。

B. USB识别正常后,检查是否有ttyUSB串口设备。如果没有说明模块的驱动未加载成功。

  • No labels