User Tools

Site Tools


Sidebar

Go Back

Refresh

You are not allowed to add pages

Direct Link

library:rk3568:4gmodule

This is an old revision of the document!


连接4G模块

连接EC20模块

1. 主要命令

lsusb
quectel-CM
mmcli -m 0
ip address
ping

2. 基本命令例子

2.1 lsusb

root@firefly:/dev# lsusb
Bus 008 Device 005: ID 05e3:0620 Genesys Logic, Inc. USB3.0 Hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 007: ID 0fe6:9900 ICS Advent 
Bus 007 Device 006: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 007 Device 005: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

2.2 quectel-CM &

root@firefly:~# quectel-CM &
[1] 1176
root@firefly:~# [11-21_11:52:07:415] QConnectManager_Linux_V1.6.1
[11-21_11:52:07:419] Find /sys/bus/usb/devices/7-1.3 idVendor=0x2c7c idProduct=0x125, bus=0x007, dev=0x00b
[11-21_11:52:07:420] Auto find qmichannel = /dev/cdc-wdm0
[11-21_11:52:07:420] Auto find usbnet_adapter = wwan0
[11-21_11:52:07:420] netcard driver = qmi_wwan_q, driver version = 22-Aug-2005
[11-21_11:52:07:421] Modem works in QMI mode
[11-21_11:52:07:451] cdc_wdm_fd = 7
[11-21_11:52:07:539] Get clientWDS = 7
[11-21_11:52:07:571] Get clientDMS = 1
[11-21_11:52:07:603] Get clientNAS = 2
[11-21_11:52:07:635] Get clientUIM = 1
[11-21_11:52:07:668] Get clientWDA = 1
[11-21_11:52:07:700] requestBaseBandVersion EC20CEFILGR06A07M1G
[11-21_11:52:07:828] requestGetSIMStatus SIMStatus: SIM_READY
[11-21_11:52:07:859] requestGetProfile[1] cmnet///0/IPV4V6
[11-21_11:52:07:891] requestRegistrationState2 MCC: 460, MNC: 0, PS: Attached, DataCap: LTE
[11-21_11:52:07:923] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[11-21_11:52:07:924] ifconfig wwan0 0.0.0.0
[11-21_11:52:07:939] ifconfig wwan0 down
[11-21_11:52:08:275] requestSetupDataCall WdsConnectionIPv4Handle: 0x872bc680
[11-21_11:52:08:405] ifconfig wwan0 up
[11-21_11:52:08:420] No default.script found, it should be in '/usr/share/udhcpc/' or '/etc/udhcpc' depend on your udhcpc version!
[11-21_11:52:08:421] busybox udhcpc -f -n -q -t 5 -s /usr/share/udhcpc/default_quectel-CM.script -i wwan0
udhcpc: started, v1.30.1
udhcpc: sending discover
udhcpc: sending select for 10.22.39.214
udhcpc: lease of 10.22.39.214 obtained, lease time 7200
[11-21_11:52:08:547] ip -4 address flush dev wwan0
[11-21_11:52:08:557] ip -4 address add 10.22.39.214/30 dev wwan0
[11-21_11:52:08:569] ip -4 route add default via 10.22.39.213 dev wwan0

2.3 mmcli

mmcli -m MODEM_INDEX

root@firefly:~# mmcli -m 0
  --------------------------------
  General  |                 path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 317d14563a761d0bf018eaaa6173364371a4873e
  --------------------------------
  Hardware |         manufacturer: Quectel
           |                model: EC20F
           |    firmware revision: EC20CEFILGR06A07M1G
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 863617064431395
  --------------------------------
  System   |               device: /sys/devices/platform/usbhost/fd000000.dwc3/xhci-hcd.5.auto/usb7/7-1/7-1.3
           |              drivers: qmi_wwan_q, option
           |               plugin: quectel
           |         primary port: ttyUSB2
           |                ports: ttyUSB0 (qcdm), ttyUSB1 (gps), ttyUSB2 (at), ttyUSB3 (at), 
           |                       wwan0 (net)
  --------------------------------
  Status   |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                state: registered
           |          power state: on
           |          access tech: lte
           |       signal quality: 40% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g, 3g, 4g; preferred: none
           |              current: allowed: 2g, 3g, 4g; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 863617064431395
           |          operator id: 46000
           |        operator name: CHINA MOBILE
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0

2.4 ip address

root@firefly:~# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
3: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
4: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 4e:1b:4f:0f:6d:2f brd ff:ff:ff:ff:ff:ff
5: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 4a:1b:4f:0f:6d:2f brd ff:ff:ff:ff:ff:ff
6: wwan0: <BROADCAST,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 8a:b1:46:2f:ee:d6 brd ff:ff:ff:ff:ff:ff
    inet 10.22.91.212/29 scope global wwan0
       valid_lft forever preferred_lft forever
    inet6 fe80::88b1:46ff:fe2f:eed6/64 scope link 
       valid_lft forever preferred_lft forever
7: enx00e0996fdf14: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 00:e0:99:6f:df:14 brd ff:ff:ff:ff:ff:ff
library/rk3568/4gmodule.1669031835.txt.gz · Last modified: 2022/11/21 19:57 by lhaosen