'port forced close' after failed ppp
Colin Helliwell
colin.helliwell at ln-systems.com
Tue Mar 7 09:43:36 UTC 2017
(Sorry - misformatted that last one)
> On 06 March 2017 at 16:47 Dan Williams <dcbw at redhat.com> wrote:
>
> On Mon, 2017-03-06 at 15:35 +0000, colin.helliwell at ln-systems.com
> wrote:
>
> > I have MM hooked into a Mux driver which is presenting two virtual
> > ports:
> > one as the Primary, one for PPP. I'm attempting to fire up the
> > data/PPP with
> > --enable and --simple-connect=.
> >
> > The PPP is failing, no doubt a problem with the config in that
> > itself, but I
> > have a couple of puzzlements:
> >
> > MM is getting a "[src/mm-port-serial.c:942] common_input_available():
> > (ttyMux1) unexpected port hangup!" . But I can't see in the source
> > where the
> > G_IO_HUP [?] would be originating - maybe a handshake signal on the
> > port?
>
> Correct. Something (driver? modem? MM?) cleared DTR or RTS and caused
> a serial port hangup. Any chance you can instrument the MUX driver to
> see if/when it calls tty_hangup() or tty_port_tty_hangup()?
>
> To figure out if MM is involved, you can strace MM and see what
> termio/tty operations it's doing, but usually this message is caused by
> external things.
>
It looks like this is pppd (which is configured with the 'modem' parameter) which is clearing DTR with a tty_operations->tiocmset. Changing 'modem' to 'local' however still causes a port hangup - I can see the driver ioctl handler getting a TCFLSH and a TCSETSF.
But since the ppp negotiation *is* failing (tho I don't yet know why), I guess the 'hangup' *is* probably correct. Which comes back to why the port is then 'dead' and unretry-able (+ see below). Especially since it is ppp's use of the port which has been hung up, not MM's own use of it.
Just wondering about a) the "When connected ignore let PPP have all the data" in port_connected(); and b) that data_watch_enable(false) doesn't seem to take much 'disabling' actions?
(Thought I'd got all of this, even the ppp, working right a few weeks ago :( maybe that was before I'd got the two ports going on the modem)
> > I'm unable to retry - even with a '--simple-disconnect'/'
> > --disable'/+retry,
> > MM is giving "[src/mm-iface-modem-simple.c:221]
> > connect_bearer_ready():
> > Couldn't connect bearer: 'Couldn't connect: cannot keep data port
> > open.Could
> > not open serial device ttyMux1: it has been forced closed". Only
> > restarting
> > MM seems to get rid of this - should/could this error state get
> > cleared down
> > somehow?
>
> Have you tried deleting the bearer and retrying the connection?
> Bearers don't get deleted automatically when they are terminated since
> the connection manager might need to do some cleanup tasks, so that's
> left to something external to MM.
>
No, deleting doesn't help. It seems force_close is simply left set, hence mm_port_serial_open() is never going to work again?
More information about the ModemManager-devel
mailing list