Bug 89368 - ZTE MF628: failed to connect modem: Cannot recover from a power off
Summary: ZTE MF628: failed to connect modem: Cannot recover from a power off
Status: RESOLVED FIXED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: plugins (show other bugs)
Version: 1.4
Hardware: Other All
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 13:59 UTC by Nerijus Baliūnas
Modified: 2015-03-02 15:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
NetworkManager debug log (193.81 KB, text/plain)
2015-03-02 13:15 UTC, Nerijus Baliūnas
Details
ModemManager debug log (73.11 KB, text/plain)
2015-03-02 13:16 UTC, Nerijus Baliūnas
Details

Description Nerijus Baliūnas 2015-02-28 13:59:18 UTC
ModemManager 1.4.0-1.fc21 does not connect:
NetworkManager[663]: <warn> (ttyUSB0) failed to connect modem: Cannot recover from a power off
(NetworkManager:663): NetworkManager-wwan-CRITICAL **: modem_prepare_result: assertion 'state == NM_DEVICE_STATE_PREPARE' failed

If I downgrade to ModemManager-1.1.0-2.git20130913.fc20.i686, then it connects. After connecting I upgrade again to ModemManager-1.4.0-1.fc21.i686, and then it connects too.

Modem is ZTE MF628. Logs with 1.4.0 and 1.1.0 versions are attached at https://bugzilla.redhat.com/show_bug.cgi?id=1177256

I've checked with other versions. ModemManager-1.3.0-2.fc21.i686.rpm and 1.4.4-1 do not work, version 1.2.0-3 works. So the breakage happened between 1.2.0 and 1.3.0.
Comment 1 Aleksander Morgado 2015-03-02 11:25:00 UTC
(In reply to Nerijus Baliūnas from comment #0)
> ModemManager 1.4.0-1.fc21 does not connect:
> NetworkManager[663]: <warn> (ttyUSB0) failed to connect modem: Cannot
> recover from a power off
> (NetworkManager:663): NetworkManager-wwan-CRITICAL **: modem_prepare_result:
> assertion 'state == NM_DEVICE_STATE_PREPARE' failed
> 
> If I downgrade to ModemManager-1.1.0-2.git20130913.fc20.i686, then it
> connects. After connecting I upgrade again to
> ModemManager-1.4.0-1.fc21.i686, and then it connects too.
> 
> Modem is ZTE MF628. Logs with 1.4.0 and 1.1.0 versions are attached at
> https://bugzilla.redhat.com/show_bug.cgi?id=1177256
> 
> I've checked with other versions. ModemManager-1.3.0-2.fc21.i686.rpm and
> 1.4.4-1 do not work, version 1.2.0-3 works. So the breakage happened between
> 1.2.0 and 1.3.0.

Are you able to get *debug* ModemManager logs with 1.4? Steps here:
http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/

I don't really think anything was changed in the ZTE plugin between those releases, apart from maybe the QMI support, but in the non-debug logs I saw I didn't find any QMI-related thing. That's why we need the debug logs; to see if we just need to blacklist this modem like we do with the MF60 so that it doesn't use QMI.
Comment 2 Nerijus Baliūnas 2015-03-02 13:15:03 UTC
Created attachment 113919 [details]
NetworkManager debug log
Comment 3 Nerijus Baliūnas 2015-03-02 13:16:13 UTC
Created attachment 113920 [details]
ModemManager debug log
Comment 4 Nerijus Baliūnas 2015-03-02 13:18:16 UTC
Debug logs attached. BTW, running /usr/sbin/NetworkManager --no-daemon --log-level=DEBUG gave no log in the console. /usr/sbin/NetworkManager --no-daemon --debug --log-level=DEBUG was needed. You may want to alter http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/ page.
Comment 5 Aleksander Morgado 2015-03-02 13:35:17 UTC
(In reply to Nerijus Baliūnas from comment #4)
> Debug logs attached. BTW, running /usr/sbin/NetworkManager --no-daemon
> --log-level=DEBUG gave no log in the console. /usr/sbin/NetworkManager
> --no-daemon --debug --log-level=DEBUG was needed. You may want to alter
> http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/ page.

Ah, thanks, will update it.
Comment 6 Aleksander Morgado 2015-03-02 13:39:33 UTC
Fixed in git master and mm-1-4:
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=6a8fbf917a220416913a5e64a40bd4d26c6448f5

Will go to the next stable bugfix release, thanks!
Comment 7 Nerijus Baliūnas 2015-03-02 14:26:39 UTC
(In reply to Aleksander Morgado from comment #5)
> Ah, thanks, will update it.
Now it's (2 places):
/usr/sbin/NetworkManager --debug --log-level=DEBUG
/NetworkManager --no-daemon --log-level=DEBUG
while it should be:
[/usr/sbin]/NetworkManager --no-daemon --debug --log-level=DEBUG
Comment 8 Aleksander Morgado 2015-03-02 14:42:24 UTC
(In reply to Nerijus Baliūnas from comment #7)
> (In reply to Aleksander Morgado from comment #5)
> > Ah, thanks, will update it.
> Now it's (2 places):
> /usr/sbin/NetworkManager --debug --log-level=DEBUG
> /NetworkManager --no-daemon --log-level=DEBUG
> while it should be:
> [/usr/sbin]/NetworkManager --no-daemon --debug --log-level=DEBUG


--no-daemon isn't needed when --debug is used, or am I wrong?

But you're right in that I needed to update it in two places; done now.
Comment 9 Nerijus Baliūnas 2015-03-02 14:56:03 UTC
You are right, --no-daemon isn't needed when --debug is used.
Comment 10 Nerijus Baliūnas 2015-03-02 14:58:16 UTC
BTW, you can add info how to get debug log output to file automatically. I used:
screen -L /usr/sbin/ModemManager --debug
it creates screenlog.0 file in the current dir.
Comment 11 Aleksander Morgado 2015-03-02 15:03:50 UTC
(In reply to Nerijus Baliūnas from comment #10)
> BTW, you can add info how to get debug log output to file automatically. I
> used:
> screen -L /usr/sbin/ModemManager --debug
> it creates screenlog.0 file in the current dir.

I would prefer to avoid requiring additional programs to do that (i.e. 'screen').

Still, yes, I could add it as:
 $ /usr/sbin/ModemManager --debug >MM.log 2>&1 &
But then I'd need to explain how to kill that process and all that. Saying that doing "Ctrl+C" is enough is just quicker... :) These steps are really for people that have no idea on how to run stuff; if you knew how to use "screen" I could probably just tell you "stop both NM/MM, run them with --debug and get me debug logs" and you probably would be able to do it :)

Note also that both NM and MM allow changing log level during runtime, but I also try to avoid that because MM spits a lot of debug output and usually syslog has some limit on the rate of log writing per process...
Comment 12 Nerijus Baliūnas 2015-03-02 15:27:58 UTC
(In reply to Aleksander Morgado from comment #11)
> Still, yes, I could add it as:
>  $ /usr/sbin/ModemManager --debug >MM.log 2>&1 &
Hmm, that's an idea. /usr/sbin/ModemManager --debug &> MM.log
is probably the simplest way (&> works from bash >=4).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.