Hi,
I'm running raspbian on, surprise-surprise, Raspberry Pi, which is set up as a 3G router and Wifi AP. Devices being used for this purpose are TP-LINK
TL-WN721N as a wifi adapter and ZTE
MF636 as a 3G modem.
Connection is set up and kept alive using sakis3g and umtskeeper scripts.
Everything seems to be working, but the ppp interface seems to be dropping rather irregularly. Sometimes replugging the 3G modem resets, sometimes it doesn't. Checking sakis3g info says connection is up and running, although clearly it isn't.
If I check ifconfig after the connection is lost, ppp0 is not listed anymore. Sometimes ifconfig -a displays it, sometimes not.
Some outputs of ifconfig after connection has come down:
Just before the connection drops:
Code:
$ ifconfig
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:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr 64-70-02-2A-90-64-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5293 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:856413 (836.3 KiB) TX bytes:0 (0.0 B)
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.27.xxx.xxx P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:3587 errors:0 dropped:0 overruns:0 frame:0
TX packets:5550 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1403780 (1.3 MiB) TX bytes:533652 (521.1 KiB)
wlan0 Link encap:Ethernet HWaddr 64:70:02:2a:90:64
inet addr:10.10.0.1 Bcast:10.10.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6653 errors:0 dropped:0 overruns:0 frame:0
TX packets:3697 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:711535 (694.8 KiB) TX bytes:1552993 (1.4 MiB)
Just after:
Code:
$ ifconfig
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:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr 64-70-02-2A-90-64-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5317 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:860102 (839.9 KiB) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 64:70:02:2a:90:64
inet addr:10.10.0.1 Bcast:10.10.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6686 errors:0 dropped:0 overruns:0 frame:0
TX packets:3722 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:713870 (697.1 KiB) TX bytes:1557887 (1.4 MiB)
------------------------------------------
$ ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:27:eb:79:da:d2
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
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr 64-70-02-2A-90-64-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6195 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:1003236 (979.7 KiB) TX bytes:0 (0.0 B)
ppp0 Link encap:Point-to-Point Protocol
POINTOPOINT NOARP MULTICAST MTU:1500 Metric:1
RX packets:3587 errors:0 dropped:0 overruns:0 frame:0
TX packets:5550 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1403780 (1.3 MiB) TX bytes:533652 (521.1 KiB)
wlan0 Link encap:Ethernet HWaddr 64:70:02:2a:90:64
inet addr:10.10.0.1 Bcast:10.10.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7007 errors:0 dropped:0 overruns:0 frame:0
TX packets:3766 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:738845 (721.5 KiB) TX bytes:1565135 (1.4 MiB
Some parts of /var/log/messages:
Code:
Sep 20 02:13:42 raspberrypi pppd[4275]: pppd 2.4.5 started by root, uid 0
Sep 20 02:13:43 raspberrypi chat[4300]: abort on (NO CARRIER)
Sep 20 02:13:43 raspberrypi chat[4300]: abort on (NO DIALTONE)
Sep 20 02:13:43 raspberrypi chat[4300]: abort on (BUSY)
Sep 20 02:13:43 raspberrypi chat[4300]: abort on (ERROR)
Sep 20 02:13:43 raspberrypi chat[4300]: abort on (NO ANSWER)
Sep 20 02:13:43 raspberrypi chat[4300]: send (ATZ^M)
Sep 20 02:13:43 raspberrypi chat[4300]: expect (OK)
Sep 20 02:13:43 raspberrypi chat[4300]: ATZ^M^M
Sep 20 02:13:43 raspberrypi chat[4300]: OK
Sep 20 02:13:43 raspberrypi chat[4300]: -- got it
Sep 20 02:13:43 raspberrypi chat[4300]: send (ATD*99#^M)
Sep 20 02:13:43 raspberrypi pppd[4275]: Serial connection established.
Sep 20 02:13:43 raspberrypi pppd[4275]: Using interface ppp0
Sep 20 02:13:43 raspberrypi pppd[4275]: Connect: ppp0 <--> /dev/ttyUSB2
Sep 20 02:13:44 raspberrypi pppd[4275]: CHAP authentication succeeded
Sep 20 02:13:44 raspberrypi pppd[4275]: CHAP authentication succeeded
Sep 20 02:14:03 raspberrypi pppd[4275]: Hangup (SIGHUP)
Sep 20 02:14:03 raspberrypi pppd[4275]: Modem hangup
Sep 20 02:14:03 raspberrypi pppd[4275]: Connection terminated.
Sep 20 02:14:04 raspberrypi pppd[4275]: Exit.
Sep 20 02:14:06 raspberrypi pppd[4828]: pppd options in effect:
Sep 20 02:14:06 raspberrypi pppd[4828]: -detach#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: logfd -1#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: maxfail 3#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: ktune#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: dump#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: noauth#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: name raspberrypi#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: user 0#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: password ??????#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: usehostname#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: /dev/ttyUSB2#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: 460800#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: lock#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: connect /usr/sbin/chat -v -f /tmp/pppd.tmp.1729#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: crtscts#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: modem#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: asyncmap 0#011#011# (from /etc/ppp/options)
Sep 20 02:14:06 raspberrypi pppd[4828]: lcp-echo-failure 4#011#011# (from /etc/ppp/options)
Sep 20 02:14:06 raspberrypi pppd[4828]: lcp-echo-interval 30#011#011# (from /etc/ppp/options)
Sep 20 02:14:06 raspberrypi pppd[4828]: hide-password#011#011# (from /etc/ppp/options)
Sep 20 02:14:06 raspberrypi pppd[4828]: noipdefault#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: defaultroute#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: usepeerdns#011#011# (from command line)
Sep 20 02:14:06 raspberrypi pppd[4828]: noipx#011#011# (from /etc/ppp/options)
Sep 20 02:14:06 raspberrypi pppd[4828]: pppd 2.4.5 started by root, uid 0
Sep 20 02:14:07 raspberrypi chat[4852]: abort on (NO CARRIER)
Sep 20 02:14:07 raspberrypi chat[4852]: abort on (NO DIALTONE)
Sep 20 02:14:07 raspberrypi chat[4852]: abort on (BUSY)
Sep 20 02:14:07 raspberrypi chat[4852]: abort on (ERROR)
Sep 20 02:14:07 raspberrypi chat[4852]: abort on (NO ANSWER)
Sep 20 02:14:07 raspberrypi chat[4852]: send (ATZ^M)
Sep 20 02:14:07 raspberrypi chat[4852]: expect (OK)
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZDONR: "Not Found"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZPASR: "Limited Service"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZDONR: "Not Found"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZPASR: "Limited Service"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZDONR: "Not Found"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZPASR: "Limited Service"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZDONR: "Not Found"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZPASR: "Limited Service"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ATZ^M^M
Sep 20 02:14:07 raspberrypi chat[4852]: OK
Sep 20 02:14:07 raspberrypi chat[4852]: -- got it
Sep 20 02:14:07 raspberrypi chat[4852]: send (ATD*99#^M)
Sep 20 02:14:07 raspberrypi pppd[4828]: Serial connection established.
Sep 20 02:14:07 raspberrypi pppd[4828]: Using interface ppp0
Sep 20 02:14:07 raspberrypi pppd[4828]: Connect: ppp0 <--> /dev/ttyUSB2
'----------------------
Sep 19 18:31:48 raspberrypi pppd[7238]: Modem hangup
Sep 19 18:31:48 raspberrypi pppd[7238]: Exit.
Sep 19 18:31:48 raspberrypi kernel: [ 2738.582777] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
Sep 19 18:31:48 raspberrypi kernel: [ 2738.582880] option 1-1.2.2:1.3: device disconnected
Sep 19 18:32:02 raspberrypi kernel: [ 2752.629160] usb 1-1.2.2: new high-speed USB device number 7 using dwc_otg
Sep 19 18:32:02 raspberrypi kernel: [ 2752.732403] usb 1-1.2.2: New USB device found, idVendor=19d2, idProduct=0031
Sep 19 18:32:02 raspberrypi kernel: [ 2752.732435] usb 1-1.2.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
Sep 19 18:32:02 raspberrypi kernel: [ 2752.732452] usb 1-1.2.2: Product: ZTE CDMA Technologies MSM
Sep 19 18:32:02 raspberrypi kernel: [ 2752.732467] usb 1-1.2.2: Manufacturer: ZTE,Incorporated
Sep 19 18:32:02 raspberrypi kernel: [ 2752.732482] usb 1-1.2.2: SerialNumber: 1234567890ABCDEF
Sep 19 18:32:02 raspberrypi kernel: [ 2752.737093] option 1-1.2.2:1.0: GSM modem (1-port) converter detected
Sep 19 18:32:02 raspberrypi kernel: [ 2752.737546] usb 1-1.2.2: GSM modem (1-port) converter now attached to ttyUSB0
Sep 19 18:32:02 raspberrypi kernel: [ 2752.738100] option 1-1.2.2:1.1: GSM modem (1-port) converter detected
Sep 19 18:32:02 raspberrypi kernel: [ 2752.738544] usb 1-1.2.2: GSM modem (1-port) converter now attached to ttyUSB1
Sep 19 18:32:02 raspberrypi kernel: [ 2752.742461] scsi1 : usb-storage 1-1.2.2:1.2
Sep 19 18:32:02 raspberrypi kernel: [ 2752.743465] option 1-1.2.2:1.3: GSM modem (1-port) converter detected
Sep 19 18:32:02 raspberrypi kernel: [ 2752.745014] usb 1-1.2.2: GSM modem (1-port) converter now attached to ttyUSB2
Sep 19 18:32:03 raspberrypi kernel: [ 2753.741710] scsi 1:0:0:0: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2
Sep 19 18:32:03 raspberrypi kernel: [ 2753.750975] sd 1:0:0:0: [sda] Attached SCSI removable disk
Sep 19 18:32:44 raspberrypi pppd[20123]: pppd options in effect:
Sep 19 18:32:44 raspberrypi pppd[20123]: -detach#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: logfd -1#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: maxfail 3#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: ktune#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: dump#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: noauth#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: name raspberrypi#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: user 0#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: password ??????#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: usehostname#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: /dev/ttyUSB2#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: 460800#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: lock#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: connect /usr/sbin/chat -v -f /tmp/pppd.tmp.17503#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: crtscts#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: modem#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: asyncmap 0#011#011# (from /etc/ppp/options)
Sep 19 18:32:44 raspberrypi pppd[20123]: lcp-echo-failure 4#011#011# (from /etc/ppp/options)
Sep 19 18:32:44 raspberrypi pppd[20123]: lcp-echo-interval 30#011#011# (from /etc/ppp/options)
Sep 19 18:32:44 raspberrypi pppd[20123]: hide-password#011#011# (from /etc/ppp/options)
Sep 19 18:32:44 raspberrypi pppd[20123]: noipdefault#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: defaultroute#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: usepeerdns#011#011# (from command line)
Sep 19 18:32:44 raspberrypi pppd[20123]: noipx#011#011# (from /etc/ppp/options)
Sep 19 18:32:44 raspberrypi pppd[20123]: pppd 2.4.5 started by root, uid 0
Sep 19 18:32:45 raspberrypi chat[20148]: abort on (NO CARRIER)
Sep 19 18:32:45 raspberrypi chat[20148]: abort on (NO DIALTONE)
Sep 19 18:32:45 raspberrypi chat[20148]: abort on (BUSY)
Sep 19 18:32:45 raspberrypi chat[20148]: abort on (ERROR)
Sep 19 18:32:45 raspberrypi chat[20148]: abort on (NO ANSWER)
Sep 19 18:32:45 raspberrypi chat[20148]: send (ATZ^M)
Sep 19 18:32:45 raspberrypi chat[20148]: expect (OK)
Sep 19 18:32:45 raspberrypi chat[20148]: ATZ^M^M
Sep 19 18:32:45 raspberrypi chat[20148]: OK
Sep 19 18:32:45 raspberrypi chat[20148]: -- got it
Sep 19 18:32:45 raspberrypi chat[20148]: send (ATD*99#^M)
Sep 19 18:32:45 raspberrypi pppd[20123]: Serial connection established.
Sep 19 18:32:45 raspberrypi pppd[20123]: Using interface ppp0
Sep 19 18:32:45 raspberrypi pppd[20123]: Connect: ppp0 <--> /dev/ttyUSB2
Sep 19 18:32:46 raspberrypi pppd[20123]: CHAP authentication succeeded
Sep 19 18:32:46 raspberrypi pppd[20123]: CHAP authentication succeeded
Sep 19 18:32:51 raspberrypi pppd[20123]: Could not determine remote IP address: defaulting to 10.64.64.64
Sep 19 18:32:51 raspberrypi pppd[20123]: local IP address 10.26.117.213
Sep 19 18:32:51 raspberrypi pppd[20123]: remote IP address 10.64.64.64
Sep 19 18:32:51 raspberrypi pppd[20123]: primary DNS address 194.204.0.18
Sep 19 18:32:51 raspberrypi pppd[20123]: secondary DNS address 194.204.0.208
It can be seen from the log, that modem doesn't find valid signal:
Code:
Sep 20 02:14:07 raspberrypi chat[4852]: +ZDONR: "Not Found"^M
Sep 20 02:14:07 raspberrypi chat[4852]: ^M
Sep 20 02:14:07 raspberrypi chat[4852]: +ZPASR: "Limited Service"^M
But still, shouldn't it connect later nevertheless?