2016-10-24 8 views
0

J'ai un modem cellulaire MultiTech MTD-H5-2.0 GPRS qui est connecté à une machine Linux via USB. Je peux voir l'appareil et communiquer directement avec lui sans problème. J'ai essayé de configurer PPP afin que je puisse accéder à Internet sur cet appareil. Je cours des ennuis. Lorsque PPP arrive, il attribue la même adresse IP pour les extrémités locales et distantes. Je m'attendais à ce qu'ils soient différents. Est-ce que quelqu'un a de l'expérience dans la configuration d'une connexion PPP avec un modem cellulaire? Vous pouvez voir mon script PPP et les commandes AT ci-dessous.Modem GPRS et problème PPP sous Linux

# pppd --version 
pppd version 2.4.5 

# cat pppd_script 
debug 
lcp-echo-failure 3 
lcp-echo-interval 3 
nodetach 
nomagic 
/dev/ttyACM0 
115200 
crtscts 
noauth 
noipdefault 
ipcp-accept-local 
ipcp-accept-remote 
usepeerdns 
novj 
nobsdcomp 
novjccomp 
nopcomp 
noaccomp 
lock 
connect "/usr/sbin/chat -v -f /root/multitech-connect" 
defaultroute 

# cat multitech-connect 
#!/bin/sh 
ABORT "BUSY" 
'' AT 
#OK ATE0\r 
OK AT+CREG? 
OK AT+CSQ 
OK AT+CGDCONT=1,"IP","M2M.COM.ATTZ" 
OK ATD*99***1# 
CONNECT '' 

# pppd file pppd_script & 
Script /usr/sbin/chat -v -f /root/multitech-connect finished (pid 1661), status = 0x0 
Serial connection established. 
using channel 28 
Using interface ppp0 
Connect: ppp0 <--> /dev/ttyACM0 
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth pap> <magic 0x754cbce> <pcomp> <accomp>] 
Warning - secret file /etc/ppp/pap-secrets has world and/or group access 
sent [LCP ConfReq id=0x1 <asyncmap 0x0>] 
No auth is possible 
sent [LCP ConfRej id=0x1 <auth pap> <magic 0x754cbce> <pcomp> <accomp>] 
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0>] 
rcvd [LCP ConfReq id=0x2 <asyncmap 0x0>] 
sent [LCP ConfAck id=0x2 <asyncmap 0x0>] 
sent [LCP EchoReq id=0x0 magic=0x0] 
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>] 
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>] 
rcvd [LCP EchoRep id=0x0 magic=0x0] 
rcvd [LCP ProtRej id=0x3 80 fd 80 fd 01 01 00 0c 1a 04 78 00] 
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received 
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>] 
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>] 
rcvd [IPCP ConfReq id=0x1] 
sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>] 
rcvd [IPCP ConfNak id=0x1 <addr 10.61.144.128> <ms-dns1 8.8.8.8> <ms-dns2 8.8.4.4>] 
sent [IPCP ConfReq id=0x2 <addr 10.61.144.128> <ms-dns1 8.8.8.8> <ms-dns2 8.8.4.4>] 
rcvd [IPCP ConfReq id=0x2 <addr 10.61.144.128>] 
sent [IPCP ConfAck id=0x2 <addr 10.61.144.128>] 
rcvd [IPCP ConfAck id=0x2 <addr 10.61.144.128> <ms-dns1 8.8.8.8> <ms-dns2 8.8.4.4>] 
not replacing existing default route via 172.20.72.1 
local IP address 10.61.144.128 
remote IP address 10.61.144.128 
primary DNS address 8.8.8.8 
secondary DNS address 8.8.4.4 
Script /etc/ppp/ip-up started (pid 1665) 
Script /etc/ppp/ip-up finished (pid 1665), status = 0x0 

# ifconfig ppp0 
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 metric 1 
     inet 10.61.144.128 netmask 255.255.255.255 destination 10.61.144.128 
     ppp txqueuelen 3 (Point-to-Point Protocol) 
     RX packets 4 bytes 58 (58.0 B) 
     RX errors 0 dropped 0 overruns 0 frame 0 
     TX packets 7 bytes 120 (120.0 B) 
     TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 

# ping 8.8.8.8 
PING 8.8.8.8 (8.8.8.8): 56 data bytes 
^C 
--- 8.8.8.8 ping statistics --- 
6 packets transmitted, 0 packets received, 100% packet loss 

# route -n 
Kernel IP routing table 
Destination  Gateway   Genmask   Flags Metric Ref Use Iface 
0.0.0.0   172.20.72.1  0.0.0.0   UG 0  0  0 wlan0 
0.0.0.0   10.0.1.254  0.0.0.0   UG 0  0  0 eth0 
10.0.0.2  10.0.1.2  255.255.255.255 UGH 0  0  0 eth0 
10.0.1.0  0.0.0.0   255.255.255.0 U  0  0  0 eth0 
172.20.72.0  0.0.0.0   255.255.252.0 U  0  0  0 wlan0 

PPP Oublier un instant et en utilisant quelques-unes des commandes AT-je peux voir que le modem est capable d'accéder à Internet. Me laisser penser que c'est juste un problème avec mon installation PPP.

#> AT+CREG? 
AT+CREG? 
+CREG: 0,1 
OK 
#> AT#PING="www.google.com" 
AT#PING=www.google.com 
#PING: 01,"216.58.195.68",27,55 
#PING: 02,"216.58.195.68",2,55 
#PING: 03,"216.58.195.68",2,55 
#PING: 04,"216.58.195.68",1,55 
#> AT#PING="8.8.8.8" 
AT#PING=8.8.8.8 
#PING: 01,"8.8.8.8",17,56 
#PING: 02,"8.8.8.8",1,56 
#PING: 03,"8.8.8.8",3,56 
#PING: 04,"8.8.8.8",1,56 

Nous vous remercions de vos suggestions.

Répondre

0

Supprimez nodetach de votre homologue ppp ou de votre fichier d'options.