<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
</head><body><blockquote><p>On 06 March 2017 at 16:47 Dan Williams <dcbw@redhat.com> wrote:</p><p>On Mon, 2017-03-06 at 15:35 +0000, colin.helliwell@ln-systems.com<br>wrote:</p><blockquote><p>I have MM hooked into a Mux driver which is presenting two virtual<br>ports:<br>one as the Primary, one for PPP. I'm attempting to fire up the<br>data/PPP with<br>--enable and --simple-connect=.</p><p>The PPP is failing, no doubt a problem with the config in that<br>itself, but I<br>have a couple of puzzlements:</p><p>MM is getting a "[src/mm-port-serial.c:942] common_input_available():<br>(ttyMux1) unexpected port hangup!" . But I can't see in the source<br>where the<br>G_IO_HUP [?] would be originating - maybe a handshake signal on the<br>port?</p></blockquote><p>Correct. Something (driver? modem? MM?) cleared DTR or RTS and caused<br>a serial port hangup. Any chance you can instrument the MUX driver to<br>see if/when it calls tty_hangup() or tty_port_tty_hangup()?</p><p>To figure out if MM is involved, you can strace MM and see what<br>termio/tty operations it's doing, but usually this message is caused by<br>external things.</p></blockquote><p>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.</p><p>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.<br>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?</p><p>(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)</p><p><br></p><blockquote><blockquote><p>I'm unable to retry - even with a '--simple-disconnect'/'<br>--disable'/+retry,<br>MM is giving "[src/mm-iface-modem-simple.c:221]<br>connect_bearer_ready():<br>Couldn't connect bearer: 'Couldn't connect: cannot keep data port<br>open.Could<br>not open serial device ttyMux1: it has been forced closed". Only<br>restarting<br>MM seems to get rid of this - should/could this error state get<br>cleared down<br>somehow?</p></blockquote><p>Have you tried deleting the bearer and retrying the connection?<br>Bearers don't get deleted automatically when they are terminated since<br>the connection manager might need to do some cleanup tasks, so that's<br>left to something external to MM.</p></blockquote><p>No, deleting doesn't help. It seems force_close is simply left set, hence mm_port_serial_open() is never going to work again?</p></body></html>