Internet connection over GSM module + PPP
1
vote
0
answers
1283
views
I am trying to get internet connection in my raspberry pi 3 (Raspbian) with a GSM (SIM900a) module, connecting it to RXD/TXD Serial ports (/dev/ttyS0), I already got an ip address and DNSs, but I can't even ping any host, so I think it must be a routing problem.
I think that what I am missing may be an iptables rule... something with POSTROUTING MASQUERADE? I don't know...
**ppp output in /var/log/messages:**
Oct 18 22:09:35 NULL chat: abort on (BUSY)
Oct 18 22:09:35 NULL chat: abort on (NO CARRIER)
Oct 18 22:09:35 NULL chat: abort on (VOICE)
Oct 18 22:09:35 NULL chat: abort on (NO DIALTONE)
Oct 18 22:09:35 NULL chat: abort on (NO DIAL TONE)
Oct 18 22:09:35 NULL chat: abort on (NO ANSWER)
Oct 18 22:09:35 NULL chat: abort on (DELAYED)
Oct 18 22:09:35 NULL chat: report (CONNECT)
Oct 18 22:09:35 NULL chat: timeout set to 6 seconds
Oct 18 22:09:35 NULL chat: send (ATQ0^M)
Oct 18 22:09:35 NULL chat: expect (OK)
Oct 18 22:09:35 NULL chat: ATQ0^M^M
Oct 18 22:09:35 NULL chat: OK
Oct 18 22:09:35 NULL chat: -- got it
Oct 18 22:09:35 NULL chat: send (ATZ^M)
Oct 18 22:09:35 NULL chat: timeout set to 3 seconds
Oct 18 22:09:35 NULL chat: expect (OK)
Oct 18 22:09:35 NULL chat: ^M
Oct 18 22:09:35 NULL chat: ATZ^M^M
Oct 18 22:09:35 NULL chat: OK
Oct 18 22:09:35 NULL chat: -- got it
Oct 18 22:09:35 NULL chat: send (AT+CPIN=5503^M)
Oct 18 22:09:35 NULL chat: expect (OKd)
Oct 18 22:09:35 NULL chat: ^M
Oct 18 22:09:35 NULL chat: AT+CPIN=5503^M^M
Oct 18 22:09:35 NULL chat: ERROR^M
Oct 18 22:09:38 NULL chat: alarm
Oct 18 22:09:38 NULL chat: send (AT^M)
Oct 18 22:09:38 NULL chat: expect (OK)
Oct 18 22:09:38 NULL chat: AT^M^M
Oct 18 22:09:38 NULL chat: OK
Oct 18 22:09:38 NULL chat: -- got it
Oct 18 22:09:38 NULL chat: send (ATI^M)
Oct 18 22:09:38 NULL chat: expect (OK)
Oct 18 22:09:38 NULL chat: ^M
Oct 18 22:09:38 NULL chat: ATI^M^M
Oct 18 22:09:38 NULL chat: SIM900 R11.0^M
Oct 18 22:09:38 NULL chat: ^M
Oct 18 22:09:38 NULL chat: OK
Oct 18 22:09:38 NULL chat: -- got it
Oct 18 22:09:38 NULL chat: send (ATZ^M)
Oct 18 22:09:38 NULL chat: expect (OK)
Oct 18 22:09:38 NULL chat: ^M
Oct 18 22:09:38 NULL chat: ATZ^M^M
Oct 18 22:09:38 NULL chat: OK
Oct 18 22:09:38 NULL chat: -- got it
Oct 18 22:09:38 NULL chat: send (ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M)
Oct 18 22:09:39 NULL chat: expect (OK)
Oct 18 22:09:39 NULL chat: ^M
Oct 18 22:09:39 NULL chat: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0^M^M
Oct 18 22:09:39 NULL chat: OK
Oct 18 22:09:39 NULL chat: -- got it
Oct 18 22:09:39 NULL chat: send (AT^M)
Oct 18 22:09:39 NULL chat: expect (OK)
Oct 18 22:09:39 NULL chat: ^M
Oct 18 22:09:39 NULL chat: AT^M^M
Oct 18 22:09:39 NULL chat: OK
Oct 18 22:09:39 NULL chat: -- got it
Oct 18 22:09:39 NULL chat: send (AT+CGDCONT=1,"IP","lowi.private.omv.es"^M)
Oct 18 22:09:39 NULL chat: expect (OK)
Oct 18 22:09:39 NULL chat: ^M
Oct 18 22:09:39 NULL chat: AT+CGDCONT=1,"IP","lowi.private.omv.es"^M^M
Oct 18 22:09:39 NULL chat: OK
Oct 18 22:09:39 NULL chat: -- got it
Oct 18 22:09:39 NULL chat: send (ATDT*99***1#^M)
Oct 18 22:09:39 NULL chat: timeout set to 30 seconds
Oct 18 22:09:39 NULL chat: expect (CONNECT)
Oct 18 22:09:39 NULL chat: ^M
Oct 18 22:09:39 NULL chat: ATDT*99***1#^M^M
Oct 18 22:09:39 NULL chat: CONNECT
Oct 18 22:09:39 NULL chat: -- got it
Oct 18 22:09:39 NULL chat: send (^M)
Oct 18 22:09:39 NULL pppd: Script /usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat finished (pid 1276), status = 0x0
Oct 18 22:09:39 NULL pppd: Serial connection established.
Oct 18 22:09:39 NULL pppd: using channel 1
Oct 18 22:09:39 NULL pppd: Using interface ppp0
Oct 18 22:09:39 NULL pppd: Connect: ppp0 /dev/ttyS0
Oct 18 22:09:40 NULL pppd: sent [LCP ConfReq id=0x1 ]
Oct 18 22:09:41 NULL pppd: rcvd [LCP ConfReq id=0x1 ]
Oct 18 22:09:41 NULL pppd: sent [LCP ConfAck id=0x1 ]
Oct 18 22:09:41 NULL pppd: rcvd [LCP ConfRej id=0x1 ]
Oct 18 22:09:41 NULL pppd: sent [LCP ConfReq id=0x2 ]
Oct 18 22:09:41 NULL pppd: rcvd [LCP ConfAck id=0x2 ]
Oct 18 22:09:41 NULL pppd: sent [LCP EchoReq id=0x0 magic=0x0]
Oct 18 22:09:41 NULL pppd: sent [PAP AuthReq id=0x1 user="NULL" password=]
Oct 18 22:09:41 NULL pppd: rcvd [LCP EchoRep id=0x0 magic=0x0]
Oct 18 22:09:41 NULL pppd: rcvd [PAP AuthAck id=0x1 "Login OK"]
Oct 18 22:09:41 NULL pppd: Remote message: Login OK
Oct 18 22:09:41 NULL pppd: PAP authentication succeeded
Oct 18 22:09:41 NULL pppd: sent [CCP ConfReq id=0x1 ]
Oct 18 22:09:41 NULL pppd: sent [IPCP ConfReq id=0x1 ]
Oct 18 22:09:41 NULL pppd: rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Oct 18 22:09:41 NULL pppd: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Oct 18 22:09:44 NULL pppd: sent [IPCP ConfReq id=0x1 ]
Oct 18 22:09:44 NULL pppd: rcvd [IPCP ConfReq id=0x1 ]
Oct 18 22:09:44 NULL pppd: sent [IPCP ConfAck id=0x1 ]
Oct 18 22:09:44 NULL pppd: rcvd [IPCP ConfNak id=0x1 ]
Oct 18 22:09:44 NULL pppd: sent [IPCP ConfReq id=0x2 ]
Oct 18 22:09:44 NULL pppd: rcvd [IPCP ConfAck id=0x2 ]
Oct 18 22:09:44 NULL pppd: not replacing default route to wlan0 [192.168.1.1]
Oct 18 22:09:44 NULL pppd: local IP address 10.242.68.43
Oct 18 22:09:44 NULL pppd: remote IP address 192.200.1.21
Oct 18 22:09:44 NULL pppd: primary DNS address 195.219.66.42
Oct 18 22:09:44 NULL pppd: secondary DNS address 87.119.194.34
Oct 18 22:09:44 NULL pppd: Script /etc/ppp/ip-up started (pid 1286)
Oct 18 22:09:44 NULL pppd: Script /etc/ppp/ip-up finished (pid 1286), status = 0x0
**ifconfig output:**
pi@NULL:~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:34:7a:5e
inet6 addr: fe80::e8a7:c560:2f66:73a2/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:200 errors:0 dropped:0 overruns:0 frame:0
TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:16656 (16.2 KiB) TX bytes:16656 (16.2 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.242.68.43 P-t-P:192.200.1.21 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:54 (54.0 B) TX bytes:91 (91.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:61:2f:0b
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::509e:723a:2fb:453/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7937 errors:0 dropped:759 overruns:0 frame:0
TX packets:1040 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1477582 (1.4 MiB) TX bytes:199477 (194.8 KiB)
PD: I've set my hostname to "NULL", which may be confused at some points of the log, I'm sorry
Asked by Mc Kernel
(531 rep)
Oct 18, 2016, 10:55 PM
Last activity: Aug 20, 2018, 11:44 PM
Last activity: Aug 20, 2018, 11:44 PM