You are not logged in.

#1 2013-01-17 10:17:41

crazystick
Member
Registered: 2012-11-22
Posts: 7

netcfg/wvdial reconnect issue with Vodafone K3772

I have configured the Vodafone 3G dongle to start via netcfg using the netcfg-wvdial package from AUR. I'm starting it via udev like so:

/etc/udev/rules.d/91-local.rules

ATTR{idVendor}=="12d1", ATTR{idProduct}=="14cf", TAG+="systemd", ENV{SYSTEMD_WANTS}="netcfg@wvdial.service"

/etc/network.d/wvdial

CONNECTION="wvdial"
WVDIAL_PROFILE=""
INTERFACE="ignore"
WVDIAL_CTL_FILE="/var/run/wvdial.pid"
WVDIAL_FLAGS=""

/etc/wvdial.conf

[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Modem Type = Analog Modem
ISDN = 0
Init1 = ATZ
Modem = /dev/ttyUSB0
Baud = 460800
Phone = *99#
Username = web
Password = web
Init3 = AT+CGDCONT=1,"IP", "smart"

The goal is to have it permanently connected, surviving both random disconnects (maybe due to signal issues) and physically removing and replugging the dongle.

The latest kernel doesn't seem to require usb_modeswitch anymore - the modem is in the correct mode when inserted. On boot, things seem to go well. netcfg@wvdial service starts correctly and starts pppd. However, sometimes when the connection drops it does not reconnect. This is a log of a single session, where the connection is started on boot, gets disconnected and automatically reconnects at 20:33, then disconnects again at 08:34 and does not reconnect:

Jan 16 19:21:49 marmosetVB5 netcfg[184]: :: wvdial up [done]
Jan 16 19:22:31 marmosetVB5 pppd[346]: pppd 2.4.5 started by root, uid 0   <-- first successful connect
Jan 16 19:22:31 marmosetVB5 pppd[346]: Using interface ppp0
Jan 16 19:22:31 marmosetVB5 pppd[346]: Connect: ppp0 <--> /dev/ttyUSB0
Jan 16 19:22:31 marmosetVB5 pppd[346]: CHAP authentication succeeded: Welcome!!
Jan 16 19:22:31 marmosetVB5 pppd[346]: CHAP authentication succeeded
Jan 16 19:22:34 marmosetVB5 pppd[346]: Could not determine remote IP address: defaulting to 10.64.64.64
Jan 16 19:22:34 marmosetVB5 pppd[346]: not replacing existing default route via 10.0.2.2
Jan 16 19:22:34 marmosetVB5 pppd[346]: Cannot determine ethernet address for proxy ARP
Jan 16 19:22:34 marmosetVB5 pppd[346]: local  IP address 10.105.90.226
Jan 16 19:22:34 marmosetVB5 pppd[346]: remote IP address 10.64.64.64
Jan 16 19:22:34 marmosetVB5 pppd[346]: primary   DNS address 88.82.13.44
Jan 16 19:22:34 marmosetVB5 pppd[346]: secondary DNS address 88.82.13.44
Jan 16 20:33:01 marmosetVB5 pppd[346]: IPCP terminated by peer
Jan 16 20:33:01 marmosetVB5 pppd[346]: Connect time 70.5 minutes.
Jan 16 20:33:01 marmosetVB5 pppd[346]: Sent 0 bytes, received 4 bytes.
Jan 16 20:33:01 marmosetVB5 pppd[346]: LCP terminated by peer
Jan 16 20:33:01 marmosetVB5 pppd[346]: Modem hangup
Jan 16 20:33:01 marmosetVB5 pppd[346]: Connection terminated.
Jan 16 20:33:01 marmosetVB5 pppd[346]: Exit.
Jan 16 20:33:43 marmosetVB5 pppd[382]: pppd 2.4.5 started by root, uid 0    <-- successful auto-reconnect
Jan 16 20:33:43 marmosetVB5 pppd[382]: Using interface ppp0
Jan 16 20:33:43 marmosetVB5 pppd[382]: Connect: ppp0 <--> /dev/ttyUSB0
Jan 16 20:33:43 marmosetVB5 pppd[382]: CHAP authentication succeeded: Welcome!!
Jan 16 20:33:43 marmosetVB5 pppd[382]: CHAP authentication succeeded
Jan 16 20:33:46 marmosetVB5 pppd[382]: Could not determine remote IP address: defaulting to 10.64.64.64
Jan 16 20:33:46 marmosetVB5 pppd[382]: not replacing existing default route via 10.0.2.2
Jan 16 20:33:46 marmosetVB5 pppd[382]: Cannot determine ethernet address for proxy ARP
Jan 16 20:33:46 marmosetVB5 pppd[382]: local  IP address 10.103.216.250
Jan 16 20:33:46 marmosetVB5 pppd[382]: remote IP address 10.64.64.64
Jan 16 20:33:46 marmosetVB5 pppd[382]: primary   DNS address 88.82.13.60
Jan 16 20:33:46 marmosetVB5 pppd[382]: secondary DNS address 88.82.13.60
Jan 17 08:34:43 marmosetVB5 pppd[382]: IPCP terminated by peer
Jan 17 08:34:43 marmosetVB5 pppd[382]: Connect time 721.0 minutes.
Jan 17 08:34:43 marmosetVB5 pppd[382]: Sent 0 bytes, received 4 bytes.
Jan 17 08:34:43 marmosetVB5 pppd[382]: LCP terminated by peer
Jan 17 08:34:43 marmosetVB5 pppd[382]: Modem hangup
Jan 17 08:34:43 marmosetVB5 pppd[382]: Connection terminated.
Jan 17 08:34:43 marmosetVB5 pppd[382]: Exit.    <-- no auto-reconnect

After the second disconnect, there is no wvdial process, and systemctl status netcfg@wvdial shows the following:

netcfg@wvdial.service - Netcfg networking service for profile wvdial
	  Loaded: loaded (/usr/lib/systemd/system/netcfg@.service; disabled)
	  Active: active (exited) since Thu, 2013-01-17 10:36:01 GMT; 8h ago
	 Process: 575 ExecStop=/usr/bin/netcfg down %i (code=exited, status=0/SUCCESS)
	 Process: 607 ExecStart=/usr/bin/netcfg check-iface %i (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/netcfg@.service/wvdial

At this point, replugging the device does not restart the connection, first I have to manually run systemctl stop netcfg@wvdial and then replug the device.

So the question is, is there some configuration I'm missing? Or is there some modification I could make to the script in the netcfg-wvdial package? The way I understand systemd is that it is configuring the desired state of the system, so the status "Active (exited)" doesn't make that much sense to me. Which bit of software should be responsible for getting the connection back up and running again?

Thanks for any advice, and will be happy to write up something in the wiki once I get this all figured out.

Finally, I had previously posted this as an issue with ArchLinuxARM on a Raspberry Pi, and that was (quite correctly) binned. I have now reproduced the issue on standard Arch: Linux marmosetVB5 3.6.11-1-ARCH #1 SMP PREEMPT Tue Dec 18 08:57:15 CET 2012 x86_64 GNU/Linux

Last edited by crazystick (2013-01-17 18:43:16)

Offline

Board footer

Powered by FluxBB