GPRS unreliable: long lasting connection fail

Eldon Koyle ekoyle at
Thu Jan 15 00:53:16 CET 2009

On  Jan 13 12:25-0700, Eldon Koyle wrote:
> I was looking at this once and I think the problem might be that pppd
> closes the device and re-opens it before reconnecting, and the mux
> device is no longer usable once it has been closed.
> I didn't verify this, but it seemed logical to me ;).

I decided to take another look, and here is what happens:

If you have the 'persist' option in /etc/ppp/peers/<connection name>,
pppd will reconnect after errors.  To reconnect, it closes the device then
reopens it.  With gsm0710muxd, when /dev/pts/N gets closed it is
deallocated.  Then, pppd is trying to reconnect to a device that doesn't

A hack-around for this might be to turn off the 'persist' option and make a script like:

	identvar=$(date +%s)
	while true; do
		# code ripped of from somewhere to get a mux device
	        ptsvar=$(dbus-send --system --print-reply --type=method_call --dest=org.pyneo.muxer /org/pyneo/Muxer org.freesmartphone.GSM.MUX.AllocChannel string:$identvar | grep string | awk -F '"' '{ print $2 }')
	        [ -z "$ptsvar" ] && exit 1
	        logger -s "[$$]: starting pppd using $ptsvar"
	        pppd "$ptsvar" 115200 call <connection name> nodetach
	        logger -s "[$$]: connection closed, waiting 10 seconds"
	        sleep 10

Eldon Koyle
Treaties are like roses and young girls -- they last while they last.
		-- Charles DeGaulle

More information about the community mailing list