[SOLVED] USB CDMA modem always disconnects after 50 minutes

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
pepalogik

Re: USB CDMA modem always disconnects after 50 minutes

Post by pepalogik »

I was hoping for a reply, but I have now realized the first idea: debugging. My current pppd configuration is (assuming that wvdial uses peer file "wvdial"):

Code: Select all

jenda@NovyKomp ~ $ egrep -v '#|^ *$' /etc/ppp/options
asyncmap 0
noauth
crtscts
lock
hide-password
modem
debug
lcp-echo-interval 30
lcp-echo-failure 4
noipx
jenda@NovyKomp ~ $ cat /etc/ppp/peers/wvdial
noauth
name wvdial
usepeerdns
And here is the log:

Code: Select all

jenda@NovyKomp /var/log $ grep pppd syslog
Aug 10 10:31:07 NovyKomp pppd[3076]: pppd 2.4.5 started by root, uid 0
Aug 10 10:31:07 NovyKomp pppd[3076]: using channel 1
Aug 10 10:31:07 NovyKomp pppd[3076]: Using interface ppp0
Aug 10 10:31:07 NovyKomp pppd[3076]: Connect: ppp0 <--> /dev/ttyACM0
Aug 10 10:31:07 NovyKomp pppd[3076]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe04778eb> <pcomp> <accomp>]
Aug 10 10:31:08 NovyKomp pppd[3076]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xe04778eb> <pcomp> <accomp>]
Aug 10 10:31:10 NovyKomp pppd[3076]: rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MD5> <magic 0x90150b4> <pcomp> <accomp>]
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [LCP ConfAck id=0x2 <asyncmap 0x0> <auth chap MD5> <magic 0x90150b4> <pcomp> <accomp>]
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [LCP EchoReq id=0x0 magic=0xe04778eb]
Aug 10 10:31:10 NovyKomp pppd[3076]: rcvd [CHAP Challenge id=0x1 <78163bb8b0e9dfc745c3edc0b3498192>, name = ""]
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [CHAP Response id=0x1 <92b5f37a6cb6549dfe3c4b2f6755ebd2>, name = "ufon"]
Aug 10 10:31:10 NovyKomp pppd[3076]: rcvd [CHAP Success id=0x1 ""]
Aug 10 10:31:10 NovyKomp pppd[3076]: CHAP authentication succeeded
Aug 10 10:31:10 NovyKomp pppd[3076]: CHAP authentication succeeded
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Aug 10 10:31:10 NovyKomp pppd[3076]: rcvd [IPCP ConfReq id=0x1 <addr 172.18.55.1>]
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [IPCP ConfAck id=0x1 <addr 172.18.55.1>]
Aug 10 10:31:10 NovyKomp pppd[3076]: rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f 00 00 00 f1 f8 fb e5 35 29 8f d6 cf 14 93 0a ...]
Aug 10 10:31:10 NovyKomp pppd[3076]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Aug 10 10:31:10 NovyKomp pppd[3076]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Aug 10 10:31:10 NovyKomp pppd[3076]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Aug 10 10:31:11 NovyKomp pppd[3076]: rcvd [IPCP ConfNak id=0x2 <addr 78.136.157.98> <ms-dns1 78.136.128.4> <ms-dns2 78.136.128.12>]
Aug 10 10:31:11 NovyKomp pppd[3076]: sent [IPCP ConfReq id=0x3 <addr 78.136.157.98> <ms-dns1 78.136.128.4> <ms-dns2 78.136.128.12>]
Aug 10 10:31:11 NovyKomp pppd[3076]: rcvd [IPCP ConfAck id=0x3 <addr 78.136.157.98> <ms-dns1 78.136.128.4> <ms-dns2 78.136.128.12>]
Aug 10 10:31:11 NovyKomp pppd[3076]: local  IP address 78.136.157.98
Aug 10 10:31:11 NovyKomp pppd[3076]: remote IP address 172.18.55.1
Aug 10 10:31:11 NovyKomp pppd[3076]: primary   DNS address 78.136.128.4
Aug 10 10:31:11 NovyKomp pppd[3076]: secondary DNS address 78.136.128.12
Aug 10 10:31:11 NovyKomp pppd[3076]: Script /etc/ppp/ip-up started (pid 3093)
Aug 10 10:31:11 NovyKomp pppd[3076]: Script /etc/ppp/ip-up finished (pid 3093), status = 0x0
Aug 10 11:21:43 NovyKomp pppd[3076]: rcvd [LCP TermReq id=0x4]
Aug 10 11:21:43 NovyKomp pppd[3076]: LCP terminated by peer
Aug 10 11:21:43 NovyKomp pppd[3076]: Connect time 50.6 minutes.
Aug 10 11:21:43 NovyKomp pppd[3076]: Sent 2063974 bytes, received 14358315 bytes.
Aug 10 11:21:43 NovyKomp pppd[3076]: Script /etc/ppp/ip-down started (pid 4002)
Aug 10 11:21:43 NovyKomp pppd[3076]: sent [LCP TermAck id=0x4]
Aug 10 11:21:44 NovyKomp pppd[3076]: Script /etc/ppp/ip-down finished (pid 4002), status = 0x0
Aug 10 11:21:46 NovyKomp pppd[3076]: rcvd [LCP TermReq id=0x5]
Aug 10 11:21:46 NovyKomp pppd[3076]: sent [LCP TermAck id=0x5]
Aug 10 11:21:46 NovyKomp pppd[3076]: Connection terminated.
Aug 10 11:21:46 NovyKomp pppd[3076]: Modem hangup
Aug 10 11:21:46 NovyKomp pppd[3076]: Exit.
Aug 10 11:21:56 NovyKomp pppd[4041]: pppd 2.4.5 started by root, uid 0
Aug 10 11:21:56 NovyKomp pppd[4041]: using channel 2
Aug 10 11:21:56 NovyKomp pppd[4041]: Using interface ppp0
Aug 10 11:21:56 NovyKomp pppd[4041]: Connect: ppp0 <--> /dev/ttyACM0
Aug 10 11:21:56 NovyKomp pppd[4041]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xf6894b> <pcomp> <accomp>]
Aug 10 11:21:56 NovyKomp pppd[4041]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xf6894b> <pcomp> <accomp>]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [LCP ConfReq id=0x3 <asyncmap 0x0> <auth chap MD5> <magic 0x901515d> <pcomp> <accomp>]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [LCP ConfAck id=0x3 <asyncmap 0x0> <auth chap MD5> <magic 0x901515d> <pcomp> <accomp>]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [LCP EchoReq id=0x0 magic=0xf6894b]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [CHAP Challenge id=0x1 <4266c4dfe260cfb353b062198c80fdd1>, name = ""]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [CHAP Response id=0x1 <e0ccb15bae28cc257a3911c001f72e61>, name = "ufon"]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [CHAP Success id=0x1 ""]
Aug 10 11:21:59 NovyKomp pppd[4041]: CHAP authentication succeeded
Aug 10 11:21:59 NovyKomp pppd[4041]: CHAP authentication succeeded
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [IPCP ConfReq id=0x1 <addr 172.18.55.1>]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [IPCP ConfAck id=0x1 <addr 172.18.55.1>]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [LCP ProtRej id=0x4 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f 00 00 00 9a e0 21 cf ac 12 40 01 22 42 08 84 ...]
Aug 10 11:21:59 NovyKomp pppd[4041]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [IPCP ConfNak id=0x2 <addr 78.136.178.73> <ms-dns1 78.136.128.4> <ms-dns2 78.136.128.12>]
Aug 10 11:21:59 NovyKomp pppd[4041]: sent [IPCP ConfReq id=0x3 <addr 78.136.178.73> <ms-dns1 78.136.128.4> <ms-dns2 78.136.128.12>]
Aug 10 11:21:59 NovyKomp pppd[4041]: rcvd [IPCP ConfAck id=0x3 <addr 78.136.178.73> <ms-dns1 78.136.128.4> <ms-dns2 78.136.128.12>]
Aug 10 11:21:59 NovyKomp pppd[4041]: local  IP address 78.136.178.73
Aug 10 11:21:59 NovyKomp pppd[4041]: remote IP address 172.18.55.1
Aug 10 11:21:59 NovyKomp pppd[4041]: primary   DNS address 78.136.128.4
Aug 10 11:21:59 NovyKomp pppd[4041]: secondary DNS address 78.136.128.12
Aug 10 11:21:59 NovyKomp pppd[4041]: Script /etc/ppp/ip-up started (pid 4051)
Aug 10 11:22:00 NovyKomp pppd[4041]: Script /etc/ppp/ip-up finished (pid 4051), status = 0x0
Can you deduce something helpful from it?
PatH57

Re: USB CDMA modem always disconnects after 50 minutes

Post by PatH57 »

this is really strange:
Aug 10 11:21:43 NovyKomp pppd[3076]: rcvd [LCP TermReq id=0x4]
Aug 10 11:21:43 NovyKomp pppd[3076]: LCP terminated by peer
Aug 10 11:21:43 NovyKomp pppd[3076]: Connect time 50.6 minutes.
I would check with the ISP and see if we missed a setting but it seems the disconnection is not random so I doubt it is a driver issue.
pepalogik

Re: USB CDMA modem always disconnects after 50 minutes

Post by pepalogik »

I can ask the ISP, but I doubt they can help me. Moreover, the problem arose with upgrading Linux Mint from 15 to 17, so I would rather focus on this subject.

I have just downloaded Mint 15 and extracted it (ISO and then filesystem.squashfs). To my disappointment, the ppp options in Mint 15 and 17 are the same. Can you please tell me where or how to look for a difference, that could make the difference? I can also create a live USB, boot from it and connect. Is a syslog created in RAM disk?
PatH57

Re: USB CDMA modem always disconnects after 50 minutes

Post by PatH57 »

my point was to get the exact settings from your ISP and then compare with what we have so far. Also they may have noticed other customers with similar problems, doesn't cost anything to ask or send a mail....
The real big difference between Mint 15 and 17 is the kernel (most drivers in linux are in the kernel or provided by the kernel)

I'm using 3.15.x and it did fix a lot of strange things (fan not working correctly, power management not set correctly and I couldn't disable bluetooth on 3.13)
It would be nice to see if by chance it doesn't fix your problem and you can always boot back to the old kernel anyway.
http://www.yourownlinux.com/2014/08/how ... linux.html
pepalogik

Re: USB CDMA modem always disconnects after 50 minutes

Post by pepalogik »

Hi,

I have finally found a solution. 8)

Short version:
Edit the connection in the Network Manager, and on the "PPP settings" tab, uncheck "Send PPP echo packets".

Full story:
First I tried to update the kernel but it failed - nvidia module build failed. I found a patch here, so I modified both copies of nv-linux.h that I could find in my system. This solved the kernel install problem, but the new kernel did not solve my connection problem. (I have now found that here is probably a more elegant way to resolve the nvidia problem).

Then I went quite deep into PPP debugging, but I found that it works poorly. The debug option does send some messages to syslog (through local2, not daemon facility), but it does so only during connecting or disconnecting, not in the meantime. Either the echo packets are not sent or (more likely) they are not logged. The kdebug option does nothing at all. I think these are bugs in pppd.

While I was trying to find how to make kdebug work, I found a discussion, where Ben Okopnik claims that the values of connect-delay, lcp-echo-failure and lcp-echo-interval are critical for a CDMA connection. This is basically what PatH57 had advised me through providing this link. I had not given it a try :oops: because it had looked senseless (based on the description of those options in the ppp options file) and because there had been no change in the default values since LM 15, which had had worked for me. But this time I did give it a try and found that the connection time scales linearly with the value of lcp-echo-interval! More precisely, the connection time is 100 times the lcp-echo-interval (for the default, i.e. 30 s, this gives 50 min). So I set lcp-echo-interval to 1 hour (i.e. 3600 s) to extend the connection time comfortably. (Changing lcp-echo-failure seems to have no effect.)

Until this point, I was using wvdial. I assumed that since the modified settings were global, they would apply as well if I used the Network Manager for connecting. Therefore, I was quite disappointed when it disconnected after 50 minutes! :evil: So I investigated how the NM calls pppd. There was no corresponding peer file, so I looked into htop and found that NM passes the options (including lcp-echo-interval 30) to pppd directly through command line. Then I took a look at the connection options in NM and noticed the "Send PPP echo packets" checkbox. Since the time I unchecked it, the connection behaves exactly the same as in LM 15: If it is in use, it stays connected indefinitely. If no data are transfered for a while, the connection is dropped. I guess the default state of "Send PPP echo packets" is the difference between LM 15 and 17 (but I have not verified it).

PatH57, thank you for your assistance and sorry for not following your advice. The thread you referred to suggests setting both lcp-echo-failure and lcp-echo-interval to zero and this is exactly what the Network Manager does now. :wink:
PatH57

Re: [SOLVED] USB CDMA modem always disconnects after 50 minu

Post by PatH57 »

looks horribly familiar to some issues I saw near;y 10 years ago on ATM cards and drivers, the cache or "buffer" used wasn't flushed correctly so after a set amount of time the card or usb stick has not option then to disconnect (some of these card were a bit more resistant (their internal cache was bigger)
I guess it could be the same here, my internal broadband does not present this issue and the usb stick from my provider seems also fine.
Locked

Return to “Networking”