ModemManager can't open serial port after previously opening it successfully

Aleksander Morgado aleksander at aleksander.es
Thu Jul 19 19:16:05 UTC 2018


Hey,

On Thu, Jul 19, 2018 at 3:47 PM, Matthew Starr <mstarr at hedonline.com> wrote:
> I am running ModemManager 1.8.0 and NetworkManager 1.8.0 on an embedded device with the Linux OS built by buildroot.  I am using a u-blox TOBY-R200 cell modem connected over USB with virtual serial interfaces /dev/ttyACM0 through /dev/ttyACM5.
>
> Sometimes while connected to the cellular network for a longer period of time (sometimes around 200 minutes, other times I have reached over 800 minutes), ModemManager will report a modem hangup that was not initiated by user action or loss of signal since this is a stationary device that is being tested.  Usually ModemManager will reconnect with NetworkManager prompting for the associated cell profile to be reconnected.  My issue is that sometimes no matter how many times I try or auto reconnects are tried, ModemManager cannot reestablish a data connection.  ModemManager just keeps reporting that it can't open /dev/ttyACM0 which is was using just fine before.  The interesting thing is that if I restart ModemManager, it is able to open the /dev/ttyACM0 port right away and make a data connection again, so it doesn't look to be an issue with the modem causing serial port issues.  This looks to be some sort of serial port handling issue in ModemManager, maybe just related to u-blox but I am not sure.  I looked at the state of the /dev/ttyACM0 device using lsof and it is not reporting that any other process has that device file open or locked.
>

These seem relevant, yes:

> Jul 19 12:52:31 canect2 daemon.warn ModemManager[302]: <warn>  Couldn't load Operator Code: 'Cannot run sequence: 'Could not open serial device ttyACM0: it has been forced close''
> Jul 19 12:52:31 canect2 daemon.warn ModemManager[302]: <warn>  Couldn't load Operator Name: 'Cannot run sequence: 'Could not open serial device ttyACM0: it has been forced close''
...

Any chance you can get a debug output of MM while reproducing this issue?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list