华为ME909S-821 4G全网通无线通信模块,4G无线数据卡。
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_OPTION=y
CONFIG_USB_SERIAL_WWAN=y
CONFIG_USB_USBNET=y
CONFIG_NETDEVICES=y
CONFIG_USB_NET_CDCETHER=y
~ # usb 1-1: new high-speed USB device number 4 using xhci-hcd
~ # cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-12310000.xhci_1-1, CDC Ethernet Device, 02:1e:10:1f:00:00
option 1-1:2.2: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1:2.3: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1:2.4: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
option 1-1:2.5: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
option 1-1:2.6: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
~ # lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 004: ID 12d1:15c1 华为ME909S-821
Bus 002 Device 001: ID 1d6b:0003
~ # microcom -s 115200 /dev/ttyUSB0
^SAT
OK
AT+CPIN?
+CPIN: READY
OK
AT+CSQ
+CSQ: 11,99
OK
AT+CEREG?
+CEREG: 0,1
OK
^RSSI: 10
^HCSQ: "LTE",29,20,131,22
AT^SYSINFOEX
^SYSINFOEX: 2,2,0,1,,6,"LTE",101,"LTE"
OK
^RSSI: 11
^HCSQ: "LTE",31,25,136,30
AT+CGDCONT?
+CGDCONT: 0,"IPV4V6","","",0,0,0,0,0,0
OK
^RSSI: 10
^HCSQ: "LTE",29,19,131,22
^RSSI: 11
^HCSQ: "LTE",30,24,136,30
AT^NDISDUP?
OK
AT^NDISDUP=1,1
OK
^NDISSTAT: 1,,,"IPV4"
AT+CGATT?
+CGATT: 1
OK
~ # ifconfig usb0 up
cdc_ether 1-1:2.0 usb0: kevent 12 may have been dropped
cdc_ether 1-1:2.0 usb0: kevent 11 may have been dropped
cdc_ether 1-1:2.0 usb0: kevent 11 may have been dropped
~ #
~ #
~ # ifconfig
usb0 Link encap:Ethernet HWaddr 02:1E:10:1F:00:00
inet6 addr: fe80::1e:10ff:fe1f:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:322 (322.0 B) TX bytes:508 (508.0 B)
~ # udhcpc -i usb0
udhcpc: started, v1.26.2
Setting IP address 0.0.0.0 on usb0
udhcpc: sending discover
udhcpc: sending select for 10.32.191.3
udhcpc: lease of 10.32.191.3 obtained, lease time 518400
Setting IP address 10.32.191.3 on usb0
Deleting routers
route: SIOCDELRT: No such process
Adding router 10.32.191.1
Recreating /etc/resolv.conf
Adding DNS server 61.139.2.69
Adding DNS server 218.6.200.139
~ #
~ #
~ # ifconfig
usb0 Link encap:Ethernet HWaddr 02:1E:10:1F:00:00
inet addr:10.32.191.3 Bcast:10.32.191.7 Mask:255.255.255.248
inet6 addr: fe80::1e:10ff:fe1f:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1142 (1.1 KiB) TX bytes:1332 (1.3 KiB)
~ # ping 114.114.114.114
PING 114.114.114.114 (114.114.114.114): 56 data bytes
64 bytes from 114.114.114.114: seq=0 ttl=81 time=189.162 ms
64 bytes from 114.114.114.114: seq=1 ttl=77 time=49.077 ms
64 bytes from 114.114.114.114: seq=2 ttl=64 time=58.076 ms
64 bytes from 114.114.114.114: seq=3 ttl=76 time=49.224 ms
64 bytes from 114.114.114.114: seq=98 ttl=86 time=44.598 ms
64 bytes from 114.114.114.114: seq=99 ttl=77 time=44.696 ms
64 bytes from 114.114.114.114: seq=100 ttl=65 time=43.575 ms
64 bytes from 114.114.114.114: seq=101 ttl=69 time=49.573 ms
64 bytes from 114.114.114.114: seq=102 ttl=77 time=41.697 ms
64 bytes from 114.114.114.114: seq=103 ttl=73 time=40.588 ms
^C
--- 114.114.114.114 ping statistics ---
104 packets transmitted, 98 packets received, 5% packet loss
round-trip min/avg/max = 39.449/53.899/189.162 ms
~ # ^C
~ # ^C
~ # ping www.baidu.com
PING www.baidu.com (14.215.177.38): 56 data bytes
64 bytes from 14.215.177.38: seq=0 ttl=54 time=57.574 ms
64 bytes from 14.215.177.38: seq=1 ttl=54 time=50.699 ms
64 bytes from 14.215.177.38: seq=2 ttl=54 time=43.701 ms
64 bytes from 14.215.177.38: seq=3 ttl=54 time=49.697 ms
^C
--- www.baidu.com ping statistics ---
5 packets transmitted, 4 packets received, 20% packet loss
round-trip min/avg/max = 43.701/50.417/57.574 ms
~ #
参考文档链接:[4G模块]华为ME909S-821 NDIS拨号指令流程