Chinaunix首页 | 论坛 | 博客
  • 博客访问: 530818
  • 博文数量: 116
  • 博客积分: 2063
  • 博客等级: 大尉
  • 技术积分: 1174
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-26 16:44
个人简介

none

文章分类

全部博文(116)

文章存档

2023年(2)

2020年(3)

2019年(4)

2018年(7)

2017年(6)

2016年(17)

2015年(13)

2014年(19)

2013年(6)

2012年(13)

2011年(5)

2010年(11)

2008年(10)

分类: 嵌入式

2016-08-22 14:40:41

# cat /ko/load3521 |grep "usb"
    insmod extdrv/usbserial.ko vendor=0x19d2 product=0x0199  #YF4108 4G Module
    #insmod extdrv/usbserial.ko vendor=0x1c9e product=0x9b05  #LongShang 4G Module
    #insmod  extdrv/usbserial.ko vendor=0x19d2 product=0x0199  # ZTE ME3760
    #insmod  extdrv/usbserial.ko vendor=0x05c6 product=0x9025  # SLM630
[ 2497.491805] usb 1-2.4: new high speed USB device number 17 using hiusb-ehci
[ 2497.629405] usbserial_generic 1-2.4:1.0: generic converter detected
[ 2497.641859] usb 1-2.4: generic converter now attached to ttyUSB0
[ 2497.651353] usbserial_generic 1-2.4:1.1: generic converter detected
[ 2497.663820] usb 1-2.4: generic converter now attached to ttyUSB1
[ 2497.673501] usbserial_generic 1-2.4:1.2: generic converter detected
[ 2497.685881] usb 1-2.4: generic converter now attached to ttyUSB2
[ 2497.695492] usbserial_generic 1-2.4:1.3: generic converter detected
[ 2497.707964] usb 1-2.4: generic converter now attached to ttyUSB3
[ 2497.717487] usbserial_generic 1-2.4:1.4: generic converter detected
[ 2497.729750] usb 1-2.4: generic converter now attached to ttyUSB4
[ 2497.739272] usbserial_generic 1-2.4:1.5: generic converter detected
[ 2497.751618] usb 1-2.4: generic converter now attached to ttyUSB5

# cat /etc/ppp/peers/gprs |grep -v "^#" /dev/ttyUSB2 115200 nocrtscts
modem
debug
nodetach
usepeerdns
noipdefault
defaultroute
user "cmnet" 0.0.0.0:0.0.0.0 ipcp-accept-local
ipcp-accept-remote
# cat /etc/ppp/options  |grep -v "^#" crtscts
defaultroute
noauth
noipdefault
debug
lcp-max-configure 8 #
# comport -d /dev/ttyUSB2

+ZMSRI
at+cgmi

+CGMI: Balanstech

OK
at+cgmm

+CGMM:YF

OK
at+BOARDNUM?

+ZICCID: 89860066173947297690 +BOARDNUM: 4410805242969925 OK
at
+ZPBIC: 1,0 ^HVER

YF-HV1.0.0B01

OK
at+cgmr

YF-V1.0.0B01_T

OK
at+zgmr

+ZGMR: 7510MV1.3.0B03P22_L

OK
AT+CPIN?

+CPIN: READY

OK
AT+CFUN?

+CFUN: 0 OK

+ZPBIC: 1,1 AT+CGDCONT?

+CGDCONT: 1,"IP","CMNET","0.0.0.0",0,0,0,0,0,0 OK
at+cfun=1 OK

+CREG: 2 +CGREG: 2 +CEREG: 2 +CGEV: ME PDN ACT 1 +CREG: 1 ^MODE: 17,9 +CREG: 1 +CEREG: 1 AT^SYSCONFIG?

^SYSCONFIG: 2,0,1,3 OK
AT^SYSINFO

^SYSINFO: 2,4,0,17,1,,9 OK
at+cops?

+COPS: 0,0,"CHINA MOBILE",7,0 OK
at+cereg?

+CEREG: 1,1 OK
at+creg?

+CREG: 1,1 OK
at+cgreg?

+CGREG: 1,2 OK
at+csq

+ing interface ppp0 Connect: ppp0 <--> /dev/ttyUSB2
sent [LCP ConfReq id=0x1 0x0> 0xe107dd46>  ]
rcvd [LCP ConfAck id=0x1 0x0> 0xe107dd46>  ]
rcvd [LCP ConfReq id=0x0 0x0> 0x11223344>  ]
sent [LCP ConfAck id=0x0 0x0> 0x11223344>  ]
sent [CCP ConfReq id=0x1 15> 15> 15>]
sent [IPCP ConfReq id=0x1 0f 01> 0.0.0.0> 0.0.0.0> 0.0.0.0>]
rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfNak id=0x1 10.11.12.13> 10.11.12.14>]
sent [IPCP ConfReq id=0x2 0f 01> 0.0.0.0> 10.11.12.13> 10.11.12.14>]
rcvd [IPCP ConfReq id=0x0 0.0.0.0>]
sent [IPCP ConfRej id=0x0 0.0.0.0>]
rcvd [IPCP ConfRej id=0x2 0f 01>]
sent [IPCP ConfReq id=0x3 0.0.0.0> 10.11.12.13> 10.11.12.14>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfNak id=0x3 10.66.136.222> 211.137.58.20> 211.137.64.163>]
sent [IPCP ConfReq id=0x4 10.66.136.222> 211.137.58.20> 211.137.64.163>]
rcvd [IPCP ConfAck id=0x4 10.66.136.222> 211.137.58.20> 211.137.64.163>]
Could not determine remote IP address: defaulting to 10.64.64.64 local  IP address 10.66.136.222 remote IP address 10.64.64.64 primary   DNS address 211.137.58.20 secondary DNS address 211.137.64.163 # route  -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0 10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 192.168.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
#
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:00:C9:A8:C7:D3
          inet addr:192.168.200.200 Bcast:0.0.0.0 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1 RX packets:655217 errors:0 dropped:8315 overruns:0 frame:0 TX packets:122 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:62249201 (59.3 MiB)  TX bytes:12785 (12.4 KiB)
          Interrupt:119 lo        Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING  MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:10.66.136.222 P-t-P:10.64.64.64 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:84 (84.0 B)  TX bytes:129 (129.0 B)

#
# ping 202.103.24.68 PING 202.103.24.68 (202.103.24.68): 56 data bytes 64 bytes from 202.103.24.68: seq=0 ttl=53 time=842.072 ms 64 bytes from 202.103.24.68: seq=1 ttl=53 time=75.478 ms


==============================================================================================================
# ps
  PID USER       VSZ STAT COMMAND 1 root 1720 S    init 2 root 0 SW   [kthreadd] 3 root 0 SW   [ksoftirqd/0] 4 root 0 SW   [kworker/0:0] 6 root 0 SW   [rcu_kthread] 7 root 0 SW<  [khelper] 8 root 0 SW   [kworker/u:1] 180 root 0 SW   [sync_supers] 182 root 0 SW   [bdi-default] 183 root 0 SW<  [kintegrityd] 185 root 0 SW<  [kblockd] 191 root 0 SW<  [ata_sff] 202 root 0 SW   [khubd] 213 root 0 SW<  [cfg80211] 214 root 0 SW   [kworker/0:1] 227 root 0 SW<  [rpciod] 233 root 0 SW   [kswapd0] 284 root 0 SW   [fsnotify_mark] 301 root 0 SW<  [nfsiod] 317 root 0 SW   [khvcd] 326 root 0 DW   [Vintage] 390 root 0 SW   [scsi_eh_0] 393 root 0 SW   [scsi_eh_1] 396 root 0 SW   [kworker/u:2] 407 root 0 SW   [mtdblock0] 412 root 0 SW   [mtdblock1] 417 root 0 SW   [mtdblock2] 422 root 0 SW   [mtdblock3] 427 root 0 SW   [mtdblock4] 432 root 0 SW   [mtdblock5] 435 root 0 SW   [romblock0] 438 root 0 SW   [romblock1] 441 root 0 SW   [romblock2] 444 root 0 SW   [romblock3] 447 root 0 SW   [romblock4] 450 root 0 SW   [romblock5] 556 root 0 SW   [yaffs-bg-1] 574 root 872 S <  udevd --daemon 842 root 1708 S    /usr/sbin/telnetd 848 root 1704 S    /usr/sbin/httpd -p 80 -h /home/http 851 root 1108 S    /usr/sbin/automount --timeout=3 /usb file /etc/auto. 927 root 1708 S    /bin/sh /usr/sbin/sysCheck 929 root 1704 S    syslogd -m 0 -O /dev/messages 942 root 1740 S    -sh 2289 root 1732 S    -sh 6022 root 0 SW   [flush-31:5] 6386 root 1524 S    pppd call gprs 6577 root 1700 S    sleep 10 6580 root 1708 R    ps
# killall pppd
Terminating on signal 15 Connect time 2.0 minutes.
Sent 252 bytes, received 252 bytes.
sent [LCP TermReq id=0x2 "User request"]
rcvd [LCP TermAck id=0x2]
Connection terminated.
#
[1]+  Done(5)                    pppd call gprs
#
#
# pppd connect 'chat -v "" "ATDT*99***1# CONNECT"' user password /dev/ttyUSB2 11 5200 nodetach crtscts debug usepeerdns defaultroute &
# Serial connection established.
using channel 17 Using interface ppp0 Connect: ppp0 <--> /dev/ttyUSB2
sent [LCP ConfReq id=0x1 0x0> 0xead32c23>  ]
sent [LCP ConfReq id=0x1 0x0> 0xead32c23>  ]
sent [LCP ConfReq id=0x1 0x0> 0xead32c23>  ]
sent [LCP ConfReq id=0x1 0x0> 0xead32c23>  ]
sent [LCP ConfReq id=0x1 0x0> 0xead32c23>  ] LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup

# comport -d /dev/ttyUSB2
at

+CME ERROR: 6004 at+cfun?

+CFUN: 1 OK
at+cops?

+COPS: 0,0,"CHINA MOBILE",7,0 OK
ATDT*99***1#

CONNECT
#
# pppd connect 'chat -v "" "ATDT*99***1# CONNECT"' user password /dev/ttyUSB2 11 5200 nodetach crtscts debug usepeerdns defaultroute &
# Serial connection established.
using channel 18 Using interface ppp0 Connect: ppp0 <--> /dev/ttyUSB2
sent [LCP ConfReq id=0x1 0x0> 0xbcff9e40>  ]
rcvd [LCP ConfAck id=0x1 0x0> 0xbcff9e40>  ]
rcvd [LCP ConfReq id=0x0 0x0> 0x11223344>  ]
sent [LCP ConfAck id=0x0 0x0> 0x11223344>  ]
sent [CCP ConfReq id=0x1 15> 15> 15>]
sent [IPCP ConfReq id=0x1 0f 01> 0.0.0.0> 0.0.0.0> 0.0.0.0>]
rcvd [LCP ProtRej id=0x1 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfNak id=0x1 10.11.12.13> 10.11.12.14>]
sent [IPCP ConfReq id=0x2 0f 01> 0.0.0.0> 10.11.12.13> 10.11.12.14>]
rcvd [IPCP ConfReq id=0x0 0.0.0.0>]
sent [IPCP ConfRej id=0x0 0.0.0.0>]
rcvd [IPCP ConfRej id=0x2 0f 01>]
sent [IPCP ConfReq id=0x3 0.0.0.0> 10.11.12.13> 10.11.12.14>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfNak id=0x3 10.66.136.222> 211.137.58.20> 211.137.64.163>]
sent [IPCP ConfReq id=0x4 10.66.136.222> 211.137.58.20> 211.137.64.163>]
rcvd [IPCP ConfAck id=0x4 10.66.136.222> 211.137.58.20> 211.137.64.163>]
Could not determine remote IP address: defaulting to 10.64.64.64 local  IP address 10.66.136.222 remote IP address 10.64.64.64 primary   DNS address 211.137.58.20 secondary DNS address 211.137.64.163 # route  -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0 10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 192.168.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

阅读(1220) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

k_ewell2017-04-19 14:14:19

# cat ppp0.sh 

ping -c 5 -W 1 202.103.24.68

at -d /dev/ttyUSB0 -req at\\r -res OK -t 9000
at -d /dev/ttyUSB0 -req at\\r -res OK -t 9000
at -d /dev/ttyUSB0 -req at+cfun=1\\r -res OK -t 9000
at -d /dev/ttyUSB1 -req at\\r -res OK -t 9000
at -d /dev/ttyUSB1 -req ATDT*99***1#\\r -res CONNECT -t 9000
pppd connect