各位大虾,我采用了sim300d gprs模块,北京的神州行wap gprs 卡,通过ppp协议来连接cmwap,现在通过了pap验证,可以拿到ISP server的ip address和分配的本地ip address。有几个问题:
1,如何自动获取dns。如果在ipcp请求中请求分配dns1和dns2,服务器回应reject请求。如果只请求ip address,则可以获取nak回应,得到ip address. 是否在北京的卡只能自动获取ip address,不能自动获取dns,需要手工配置?
2,中国移动的服务器不断的发请求来协商isp server的ip address。每次我都给了ack的回应。不明白为什么在模块已经确认isp server ip address情况下,服务器不断的请求协商isp ip address?
3,拿到了分配的动态ip地址和remote isp ip地址,就可以认为ppp协议建立成功了吗?如何验证?必须手工实现tcp/ip,通过wap 发http请求吗?
4,用wap可以发送icmp协议吗?我使用icmp来发送ping,来验证ppp协议链接成功。可是没有任何回应。
因为是新手,所以有的问题可能比较基础,请大家帮忙看一下。谢谢!
下面是程序打印的log
PPP Tx:发给移动的数据
PPP Rx:接受到的数据
Set modem baud rate as 115200
NetSystemInitial completed
AT+CGATT=1, OK
AT+CGDCONT=1,IP,CMNET, OK
ATD*99***1#, CONNECT
PppOpenRequest completed
no_data_rx_number:1
PPP Rx: 0x7e 0xff 0x3 0xc0 0x21 0x1 0x14 0x0 0x1c 0x1 0x4 0x6 0x40 0x3 0x4 0xc0 0x23 0x5 0x6 0xc 0x3c 0x65 0xc9 0x2 0x6 0x0 0x0 0x0 0x0 0x7 0x2 0x8 0x2
To handle LCP package
configuration request-Accept PAP authen
Refuse Asyn control character mapping
Tx, PPPF_LCP, code:0x4, id:0x14
PPP Tx<0xc021>: 0x7e 0xff 0x3 0xc0 0x21 0x4 0x14 0x0 0xa 0x2 0x6 0x0 0x0 0x0 0x0 0x6f 0x6a 0x7e
Tx, PPPF_LCP, code:0x1, id:0x14
PPP Tx<0xc021>: 0x7e 0xff 0x3 0xc0 0x21 0x1 0x14 0x0 0xa 0x2 0x6 0x0 0xa 0x0 0x0 0xae 0x85 0x7e
PPP Rx: 0x7e 0xff 0x3 0xc0 0x21 0x1 0x15 0x0 0x16 0x1 0x4 0x6 0x40 0x3 0x4 0xc0 0x23 0x5 0x6 0xc 0x3c 0x65 0xc9 0x7 0x2 0x8 0x2
To handle LCP package
configuration request-Accept PAP authen
PPP enter authencation phase
Tx, PPPF_LCP, code:0x2, id:0x15
PPP Tx<0xc021>: 0x7e 0xff 0x3 0xc0 0x21 0x2 0x15 0x0 0x16 0x1 0x4 0x6 0x40 0x3 0x4 0xc0 0x23 0x5 0x6 0xc 0x3c 0x65 0xc9 0x7 0x2 0x8 0x2 0x43 0xfb 0x7e
Send username and password
Tx, PPPF_PAP, code:0x1, id:0x15
PPP Tx<0xc023>: 0x7e 0xff 0x3 0xc0 0x23 0x1 0x15 0x0 0x6 0x0 0x0 0xd1 0xb0 0x7e
PPP Rx: 0x7e 0xff 0x3 0xc0 0x21 0x2 0x14 0x0 0xa 0x2 0x6 0x0 0xa 0x0 0x0
To handle LCP package
configuration response
PPP Rx: 0x7e 0xff 0x3 0xc0 0x23 0x2 0x15 0x0 0x27 0x22 0x54 0x54 0x50 0x20 0x43 0x6f 0x6d 0x20 0x50 0x50 0x50 0x20 0x2d 0x20 0x50 0x61 0x73 0x73 0x77 0x6f 0x72 0x64 0x20 0x56 0x65 0x72 0x69 0x66 0x69 0x65 0x64 0x20 0x4f 0x4b
To handle PAP package
PAP success
PPP enter network configuration phaseRequest network ip address, DNS1, DNS2
Tx, PPPF_NCP, code:0x1, id:0x15
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x1 0x15 0x0 0xa 0x3 0x6 0x0 0x0 0x0 0x0 0x62 0xe8 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x3 0x15 0x0 0xa 0x3 0x6 0xa 0x8d 0xf4 0xa4
To handle NCP package
ISP deny IP address request, NCPF_NAK
ISP suggest new address, use new address to request network address
Tx, PPPF_NCP, code:0x1, id:0x15
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x1 0x15 0x0 0xa 0x3 0x6 0xa 0x8d 0xf4 0xa4 0x19 0x3f 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x30 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x30
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x30 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xd 0xd4 0x7e
Request network ip address, DNS1, DNS2
Tx, PPPF_NCP, code:0x1, id:0x30
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x1 0x30 0x0 0xa 0x3 0x6 0x0 0x0 0x0 0x0 0x43 0x6d 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x2 0x15 0x0 0xa 0x3 0x6 0xa 0x8d 0xf4 0xa4
To handle NCP package
ISP ack IP address request, NCPF_ACK
Receive IP:10.141.244.164.
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x31 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x31
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x31 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xf0 0x99 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x3 0x30 0x0 0xa 0x3 0x6 0xa 0x8d 0xf4 0xa4
To handle NCP package
ISP deny IP address request, NCPF_NAK
ISP suggest new address, use new address to request network address
Tx, PPPF_NCP, code:0x1, id:0x30
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x1 0x30 0x0 0xa 0x3 0x6 0xa 0x8d 0xf4 0xa4 0x38 0xba 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x32 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x32
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x32 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xf7 0x4f 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x33 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x33
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x33 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xa 0x2 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x34 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x34
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x34 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xe8 0xeb 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x2 0x30 0x0 0xa 0x3 0x6 0xa 0x8d 0xf4 0xa4
To handle NCP package
ISP ack IP address request, NCPF_ACK
Receive IP:10.141.244.164.
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x35 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x35
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x35 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0x15 0xa6 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x36 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x36
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x36 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0x12 0x70 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x37 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x37
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x37 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xef 0x3d 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x38 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x38
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x38 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0xc7 0xab 0x7e
PPP Rx: 0x7e 0xff 0x3 0x80 0x21 0x1 0x39 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1
To handle NCP package
ISP send IP address request, NCPF_REQ
Receive ISP IP:10.0.0.1.
Tx, PPPF_NCP, code:0x2, id:0x39
PPP Tx<0x8021>: 0x7e 0xff 0x3 0x80 0x21 0x2 0x39 0x0 0xa 0x3 0x6 0xa 0x0 0x0 0x1 0x3a 0xe6 0x7e
no_data_rx_number:1
no_data_rx_number:2
no_data_rx_number:3
no_data_rx_number:4
no_data_rx_number:5
No data received, PPP state is PPPS_OPENED
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x0 0x0 0x0 0xff 0x1 0xd0 0xe4 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xfe 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0xd4 0x5c 0x7e
Send ICMP ping command
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x1 0x0 0x0 0xff 0x1 0xd0 0xe3 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xfd 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0xf1 0xf4 0x7e
Send ICMP ping command
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x2 0x0 0x0 0xff 0x1 0xd0 0xe2 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xfc 0x0 0x3 0x0 0x0 0x0 0x0 0x0 0x0 0x6d 0xe7 0x7e
Send ICMP ping command
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x3 0x0 0x0 0xff 0x1 0xd0 0xe1 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xfb 0x0 0x4 0x0 0x0 0x0 0x0 0x0 0x0 0x6b 0xc2 0x7e
Send ICMP ping command
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x4 0x0 0x0 0xff 0x1 0xd0 0xe0 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xfa 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0xc6 0x90 0x7e
Send ICMP ping command
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x5 0x0 0x0 0xff 0x1 0xd0 0xdf 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xf9 0x0 0x6 0x0 0x0 0x0 0x0 0x0 0x0 0x87 0x38 0x7e
Send ICMP ping command
Pinging 202.108.33.90 whith 4 bytes of data:
Tx, PPPF_IP
PPP Tx<0x21>: 0x7e 0xff 0x3 0x0 0x21 0x45 0x0 0x0 0x20 0x0 0x6 0x0 0x0 0xff 0x1 0xd0 0xde 0xa 0x8d 0xf4 0xa4 0xca 0x6c 0x21 0x5a 0x8 0x0 0xf7 0xf8 0x0 0x7 0x0 0x0 0x0 0x0 0x0 0x0 0x1b 0x2b 0x7e
Send ICMP ping command
上边使用了cmnet接入点,用cmwap接入点,结果一样。
我的卡是北京神州行。
此外,在移动的网内,可以ping外部的ip吗?
1、移动有些服务器是不提供DNS地址的
2、既然已经获取了IP地址,你可以试一下TCP、HTTP的操作是否可以成功
3、可以请教下模块厂家的FAE