Bug 86658 - Huawei E3372, HUAWEI E3531 can not connect
Summary: Huawei E3372, HUAWEI E3531 can not connect
Status: RESOLVED FIXED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: high critical
Assignee: Aleksander Morgado
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 10:23 UTC by Tamir
Modified: 2014-12-04 20:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
my debug (4.27 KB, text/plain)
2014-11-24 10:23 UTC, Tamir
Details
ModemManager —debug (3.36 KB, text/plain)
2014-11-24 16:14 UTC, Tamir
Details
networkmanager debug (30.62 KB, text/plain)
2014-11-24 16:15 UTC, Tamir
Details
ModemManager--debug (32.83 KB, text/plain)
2014-11-24 17:01 UTC, Tamir
Details
full log debug networkmanager (18.49 KB, text/plain)
2014-11-24 18:11 UTC, Tamir
Details
debug modem manager (3.55 KB, text/plain)
2014-11-24 18:13 UTC, Tamir
Details
--debug ModemManager --full log (65.73 KB, text/plain)
2014-11-24 18:37 UTC, Tamir
Details
networkmanager full log (35.99 KB, text/plain)
2014-11-24 18:38 UTC, Tamir
Details
Expect "pcui" and "modem" in ^GETPORTMODE response (1.46 KB, patch)
2014-11-24 19:56 UTC, Aleksander Morgado
Details | Splinter Review
autogen (8.86 KB, text/plain)
2014-11-25 15:15 UTC, Tamir
Details
sudo /usr/local/sbin/ModemManager --debug (3.94 KB, text/plain)
2014-11-25 20:52 UTC, Tamir
Details

Description Tamir 2014-11-24 10:23:17 UTC
Created attachment 109929 [details]
my debug

A connection is defined and a modem in the system, but an error while
connecting: "Connection deactivated". On Ubuntu 14.04 and Ubuntu 14.10
(usb-modeswitch (2.2.0)), kernel 3.13 - 3.16. Tried to debug, but I was not able to gather the necessary information. Here's a link to the video http://www.youtube.com/watch?v=Xn7IAqaYAyU&feature=youtu.be 
and attach multiple log files, all I could ((.
Comment 1 Aleksander Morgado 2014-11-24 14:30:52 UTC
Just watched the first 10s of the video :)

Before trying to run "$> sudo /usr/sbin/ModemManager --debug", did you do the steps from the previous paragraph? This is, did you do these?
$> sudo mv /usr/sbin/ModemManager /
$> sudo killall -TERM ModemManager
Comment 2 Tamir 2014-11-24 15:20:07 UTC
Enter all commands in a terminal? I have Ubuntu 14.10 i use system initialization upstart, and therefore enter commands for option without systemd:
$> sudo mv /usr/sbin/NetworkManager /
$> sudo mv /usr/sbin/ModemManager /
$> sudo killall -TERM NetworkManager
$> sudo killall -TERM ModemManager

thereafter
$> sudo /usr/sbin/ModemManager —debug
$> sudo /usr/sbin/NetworkManager --no-daemon --log-level=DEBUG


And then what? I typed these commands:
$> sudo mv /ModemManager /usr/sbin/
$> sudo mv /NetworkManager /usr/sbin/

But he writes: stat failed for «/ ModemManager»: No such file or directory
Comment 3 Tamir 2014-11-24 15:24:02 UTC
If my comments seem rude, then please make allowances for my terrible english ...
Comment 4 Aleksander Morgado 2014-11-24 15:37:44 UTC
(In reply to Tamir from comment #3)
> If my comments seem rude, then please make allowances for my terrible
> english ...

:) np

I actually just found out that the steps are *wrong* when not using systemd, your case. The steps should be these:

$> sudo mv /usr/sbin/NetworkManager /
$> sudo mv /usr/sbin/ModemManager /
$> sudo killall -TERM NetworkManager
$> sudo killall -TERM ModemManager
$> sudo /ModemManager —debug
$> sudo /NetworkManager --no-daemon --log-level=DEBUG
(do your tests here)
$> sudo mv /ModemManager /usr/sbin/
$> sudo mv /NetworkManager /usr/sbin/


So, the debug commands should be run in different terminals, and leave them running through your tests:
[terminal 1] $> sudo /ModemManager --debug
[terminal 2] $> sudo /NetworkManager --no-daemon --log-level=DEBUG

Those commands will dump to the standard output all the debug logs of both MM and NM. What we need to see is what those logs say.

I'll update the instructions page.
Comment 5 Tamir 2014-11-24 16:14:46 UTC
Created attachment 109948 [details]
ModemManager —debug
Comment 6 Tamir 2014-11-24 16:15:59 UTC
Created attachment 109949 [details]
networkmanager debug
Comment 7 Aleksander Morgado 2014-11-24 16:38:40 UTC
(In reply to Tamir from comment #5)
> Created attachment 109948 [details]
> ModemManager —debug

Seems that the MM wasn't run in debug mode; did you run it with "--debug" ?
Comment 8 Tamir 2014-11-24 16:58:44 UTC
Yes, sorry, now attach the new log to test
Comment 9 Tamir 2014-11-24 17:01:17 UTC
Created attachment 109952 [details]
ModemManager--debug
Comment 10 Aleksander Morgado 2014-11-24 17:46:04 UTC
(In reply to Tamir from comment #9)
> Created attachment 109952 [details]
> ModemManager--debug

Could you attach the full log? I'm missing all the initial part of the log, which is (among other things) where the decision of which port to use for data vs control is done...
Comment 11 Tamir 2014-11-24 17:51:05 UTC
Now I will try, I just run in different terminals debug, and so the two logs with incomplete data ... try to piece together
Comment 12 Tamir 2014-11-24 18:11:54 UTC
Created attachment 109953 [details]
full log debug networkmanager
Comment 13 Tamir 2014-11-24 18:13:42 UTC
Created attachment 109954 [details]
debug modem manager
Comment 14 Aleksander Morgado 2014-11-24 18:20:10 UTC
(In reply to Tamir from comment #13)
> Created attachment 109954 [details]
> debug modem manager

Sorry, but it isn't in debug mode... :/

Not sure why you put this:
  sudo /ModemManager —debug
instead of this:
  sudo /ModemManager --debug

Try to put dash-dash-debug, don't copy&paste it.
Comment 15 Tamir 2014-11-24 18:37:36 UTC
Created attachment 109956 [details]
--debug ModemManager --full log
Comment 16 Tamir 2014-11-24 18:38:23 UTC
Created attachment 109957 [details]
networkmanager full log
Comment 17 Tamir 2014-11-24 18:43:38 UTC
For NetvorkManager was such a message after entering commands (NetworkManager: 23798): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: The key file does not contain a group of «connectivity»
Comment 18 Aleksander Morgado 2014-11-24 18:45:39 UTC
(In reply to Tamir from comment #17)
> For NetvorkManager was such a message after entering commands
> (NetworkManager: 23798): GLib-WARNING **: GError set over the top of a
> previous GError or uninitialized memory.
> This indicates a bug in someone's code. You must ensure an error is NULL
> before it's set.
> The overwriting error message was: The key file does not contain a group of
> «connectivity»

That one is a bug in NetworkManager, shouldn't prevent you from connecting the modem.
Comment 19 Aleksander Morgado 2014-11-24 18:46:48 UTC
I believe the issue is that we don't properly parse the GETPORTMODE result:
 ^GETPORTMODE: TYPE: WCDMA: ,pcui:1,modem:2,ncm:3,mass:4,mass_two:5,

We don't expect those strings for pcui and modem, so we're not properly using the info to decide which port should be used for data. I'll prepare a patch.
Comment 20 Tamir 2014-11-24 18:52:33 UTC
Thank you for your time and willingness to correct mistakes, waiting to solve the problem
Comment 21 Aleksander Morgado 2014-11-24 19:56:31 UTC
Created attachment 109961 [details] [review]
Expect "pcui" and "modem" in ^GETPORTMODE response

Could you test with a self-compiled ModemManager with the attached patch applied?
Comment 22 Tamir 2014-11-24 20:57:21 UTC
All right. What should I do? Where to install the patch?
Comment 23 Tamir 2014-11-24 21:10:54 UTC
I will try to tell you about the request for launchpad Ubuntu, there is a bug-report on this subject - https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch/+bug/1354823
Comment 24 Aleksander Morgado 2014-11-25 08:13:44 UTC
(In reply to Tamir from comment #23)
> I will try to tell you about the request for launchpad Ubuntu, there is a
> bug-report on this subject -
> https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch/+bug/1354823

Not sure if that affects you, truth be told, you already have the TTYs.
Comment 25 Aleksander Morgado 2014-11-25 08:27:40 UTC
(In reply to Tamir from comment #22)
> All right. What should I do? Where to install the patch?

Which Ubuntu version are you using, and which arch?

The manual steps would involve (installing in /usr/local, so that it doesn't collide with your system installed MM):

$ sudo apt-get install git
$ sudo apt-get build-dep modem-manager
$ git clone git://anongit.freedesktop.org/ModemManager/ModemManager
$ cd ModemManager
$ wget https://bugs.freedesktop.org/attachment.cgi?id=109961
$ git am attachment.cgi?id=109961
$ ./autogen.sh
$ make
$ sudo make install
$ sudo mv /usr/sbin/ModemManager /
$ sudo killall -TERM ModemManager
$ sudo /usr/local/sbin/ModemManager --debug

(more or less I guess)
Comment 26 Tamir 2014-11-25 09:57:14 UTC
> $ sudo apt-get build-dep modem-manager
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
E: Could not find a source package for modem-manager
Comment 27 Tamir 2014-11-25 09:58:37 UTC
Ubuntu 14.10 
3.16.0-25-generic #33-Ubuntu SMP Tue Nov 4 12:06:54 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Comment 28 Aleksander Morgado 2014-11-25 12:16:37 UTC
(In reply to Tamir from comment #26)
> > $ sudo apt-get build-dep modem-manager
> Reading package lists ... Done
> Building dependency tree
> Reading state information ... Done
> E: Could not find a source package for modem-manager

Gah, you'll need to use the correct package name, I don't know what that is in Ubuntu.
Comment 29 Tamir 2014-11-25 12:29:28 UTC
Found written together modemmanager, like this:
sudo apt-get build-dep modemmanager
Comment 30 Tamir 2014-11-25 12:32:43 UTC
tr@tr-lp:~/ModemManager$ git am attachment.cgi?id=109961

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'tr@tr-lp.(none)')
You need to set your committer info first
Comment 31 Aleksander Morgado 2014-11-25 12:47:21 UTC
(In reply to Tamir from comment #30)
> tr@tr-lp:~/ModemManager$ git am attachment.cgi?id=109961
> 
> *** Please tell me who you are.
> 
> Run
> 
>   git config --global user.email "you@example.com"
>   git config --global user.name "Your Name"
> 
> to set your account's default identity.
> Omit --global to set the identity only in this repository.
> 
> fatal: unable to auto-detect email address (got 'tr@tr-lp.(none)')
> You need to set your committer info first


  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

:)
Comment 32 Tamir 2014-11-25 12:52:11 UTC
git am attachment.cgi ..my name Tamir or id...? What id?
Comment 33 Aleksander Morgado 2014-11-25 14:26:17 UTC
(In reply to Tamir from comment #32)
> git am attachment.cgi ..my name Tamir or id...? What id?

It doesn't matter what you put there. That is just to apply the patch.
Comment 34 Tamir 2014-11-25 14:43:46 UTC
sorry :). Here is another:
tr @ tr-lp: ~ / ModemManager $ make
make: *** No targets specified and is not found make-file. Stop.
Comment 35 Aleksander Morgado 2014-11-25 15:08:49 UTC
(In reply to Tamir from comment #34)
> sorry :). Here is another:
> tr @ tr-lp: ~ / ModemManager $ make
> make: *** No targets specified and is not found make-file. Stop.

did you ./autogen.sh ?
Comment 36 Tamir 2014-11-25 15:15:27 UTC
(In reply to Aleksander Morgado from comment #35)
> did you ./autogen.sh ?
Yes, attach
Comment 37 Tamir 2014-11-25 15:15:59 UTC
Created attachment 110006 [details]
autogen
Comment 38 Tamir 2014-11-25 15:26:01 UTC
there is an error:
configure: error: Couldn't find libmbim-glib. Install it, or otherwise configure using --without-mbim to disable MBIM support.
Comment 39 Aleksander Morgado 2014-11-25 20:26:26 UTC
(In reply to Tamir from comment #38)
> there is an error:
> configure: error: Couldn't find libmbim-glib. Install it, or otherwise
> configure using --without-mbim to disable MBIM support.

For the purpose of the test, just:
./autogen.sh --without-mbim --without-qmi
Comment 40 Tamir 2014-11-25 20:51:14 UTC
Reboot the system after installing the necessary? If not then tried, the result attached. Modem longer trying to connect, but the result is again - the detached
Comment 41 Tamir 2014-11-25 20:52:44 UTC
Created attachment 110013 [details]
sudo /usr/local/sbin/ModemManager --debug
Comment 42 Aleksander Morgado 2014-11-25 21:10:03 UTC
(In reply to Tamir from comment #41)
> Created attachment 110013 [details]
> sudo /usr/local/sbin/ModemManager --debug

Could not acquire the 'org.freedesktop.ModemManager1' service name

That just means that there is another ModemManager running. Did you mv the binary and killall -TERM before trying to run with --debug?
Comment 43 Tamir 2014-11-26 06:42:18 UTC
tr @ tr-lp: ~ $ sudo mv / usr / sbin / ModemManager /
[sudo] password for tr:
mv: stat failed for «/ usr / sbin / ModemManager»: No such file or directory
tr @ tr-lp: ~ $
Comment 44 Aleksander Morgado 2014-11-26 07:24:36 UTC
(In reply to Tamir from comment #43)
> tr @ tr-lp: ~ $ sudo mv / usr / sbin / ModemManager /
> [sudo] password for tr:
> mv: stat failed for «/ usr / sbin / ModemManager»: No such file or directory
> tr @ tr-lp: ~ $

There shouldn't be any whitespace between the elements of a path, so no whitespaces between "/" and "usr"  and so on...

Didn't know it would be so difficult for you to test this, do you prefer me to build a custom MM ubuntu package instead? It will take me longer, but will be easier for you to test.
Comment 45 Tamir 2014-11-26 07:48:49 UTC
In the terminal I typed without gaps:
sudo mv /usr/sbin/ModemManager /
mv: stat failed for «/usr/sbin/ModemManager»: No such file or directory
> tr @ tr-lp: ~ $
or
sudo mv /usr/sbin/ModemManager/
mv: after the «/usr/sbin/ModemManager/» missing operand target file
At the command «mv --help» to get more information.

If possible, it is likely to be more productive to have a ready-made package for testing. I have little experience with such things, unfortunately. Everything that I have a desire to correct mistakes for comfortable work in OS.
Comment 46 Aleksander Morgado 2014-12-03 18:05:32 UTC
The patch is really a minor change, plus Dan also reviewed it, so I pushed it to git master and the MM-1-4 branch. It should get into the next stable 1.4.x release soon.
Comment 47 Tamir 2014-12-04 20:40:28 UTC
Aleksander Morgado thank you very much for your time and effort spent to fix this problem. Let's try a new version)


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.