Re: Modems access fails after pppd hang up



Hey,

> 
> after doing a lot of testing with bad UMTS connections, I was able to solve most of my problems with my patches from http://mail.gnome.org/archives/networkmanager-list/2011-September/msg00040.html .
> 
> There is one problem still left, which I am not able to solve on my own.
> 
> If pppd hangs up for whatever reason (for example because of on lcp echo failure), often the modem remains in an unusable state, because the modem is still in data mode and modem manger tries to send AT commands and does not get an answer.
> 
> In this state it often helps to disable UMTS at all (using the right mouse menu) and enable it again. Then the modem gets reseted and everything works again.
> 
> I have tried to automatically disable/enable the modem in case there is no response to the AT commands and also tried to send flash or AT hangup command on the secondary line (as far as available), but I was not able to get the different state machines of network manager and modem manger to do the right thing.
> 

I've got a similar case in mind, which is when trying to detect that a
given RS232 modem was disconnected from the RS232 port. In that case,
the modem will of course not reply to any new command. What I did for
this RS232 case is to have a maximum number of timeouts allowed for AT
commands; if the maximum is reached, the modem is assumed to be
disconnected and therefore the modem object is removed. You can try to
enable these max timeouts with the MM_MODEM_BASE_MAX_TIMEOUTS property
set to 3 (for example, as done in the Cinterion plugin).

Once a modem gets removed by having reached the max timeouts, we could
try to automatically force a re-scan of all ports and see if getting the
modem booted from scratch helps in having it recovered. You can try to
request the re-scan manually with ScanDevices() in DBus.

Of course, the best thing would be to avoid having the modem in the
inconsistent state of not replying to any AT command, we shouldn't just
rely on falling back to removing and reseting the modem. But it's
probably a good fallback anyway, better than letting the modem stuck.

-- 
Aleksander



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]