2015-11-29

I have got a ZTE MF-193E modem which worked fine before. When I bought this modem more than a year ago, it worked readily out of the box.
Now, as Ubuntu is progressing in version, things are becoming more and more difficult for me.

This modem even worked a couple of months back with Ubuntu 15.04 (64-bit). Now, in Ubuntu 15.10 (64-bit), it can not connect.

I have set up a mobile broadband connection. I have tried various strings for APN, but this has not been an issue before.

(The modem works fine in Windows 10, so, this is not a hardware issue at all. Also, Modem Manager GUI nicely detects this device. SMSs can be sent and received without any problem.)

When I insert the modem, it gets detected alright, a CD icon is displayed in Unity with the name of the modem. A few seconds later,
I get a message box

`Mobile Broadband Network: you are registered on the home network'

near the network icon.

When I try to connect, the wireless icon in network manager applet starts those centrifugal motions, but eventually it fails to connect and a message tells me that I am offline.

The line I could isolate from /var/log/syslog is this,

NetworkManager[628]: (ttyUSB1): device state change: ip-config
-> failed (reason 'ip-config-unavailable') [70 120 5]

Though, I am not sure whether this is the relevant one.

More lines from
/var/log/syslog can be found here.

Update 1 - December 06 2015

As pointed out by one kind member, tried the nf_conntrack_pptp module approach.

Executed the following commands,

Then tried my modem, the same failure. No discernable change in the log either.

Update 2 - December 06 2015

Executed as root,

systemctl restart network-manager.service

No output on screen (terminal).

Corresponding log from the above point to an attempt to connect using the modem can be found here.

Update 3 - December 06 2015

Installed ofono and then tried the modem again.

Please see the log here.

Update 4 - December 06 2015

Again executed as root,

systemctl restart network-manager.service

Corresponding log from the above point to an attempt to connect using the modem can be found here.

Update 5 - December 06 2015

Changed all "deny" to "allow" in /etc/dbus-1/system.d/nm-dispatcher.conf.

Tried connecting. No luck.

A few network connect and disconnect with Ethernet connection.

Followed by sudo systemctl restart network-manager.service.

Modem plug out and plug in.

Tried connecting again. Does not connect.

The log is here.

Update 6 - December 06 2015

Executed

and

Could not run mm-test.py due to multiple errors. Did find the file at the indicated location. Got this from, https://github.com/openshine/ModemManager/blob/master/test/mm-test.py.

The above commands are somewhat different from those in the Wiki.

The log files are here.

Update 7 - December 07 2015

Executed again (after the suggested change in /lib/udev/rules.d/40-usb_modeswitch.rules and reboot)

and

The /var/log/syslog is included as well.

The log files are here.

Update 8 - December 08 2015

The updated set of logs are here.

Update 9 - December 08 2015

Test 1

This time booted the computer from an Ubuntu 14.04 32 bit DVD. As soon as the computer booted, started capturing the MM log.

Inserted the modem. lsusb showed that it was being recognized as a
19d2:1232 device which needs to be swithced to a 19d2:2003
device. Since installation of usb-modeswitch requires reboot of the
machine (and hence loose the installation for DVD run), I prepared a
custom switch file and switched the modem from command line (sudo
usb_modeswitch -I -c 19d2:2003).

As soon as the switching was accomplished, I was informed that I was
on Mobile Broadband Network and a New Broadband Connection appreard
in network manager menu.

I setup the above connection in the usual way (APN name was not an
issue), and the connection was established automatically.

I disconnected and ejected the modem.

Stopped capturing the MM log.

The complete MM log and syslog for the session start to modem eject can be found here.

Test 2

The same test with an Ubuntu 14.04 64 bit DVD.

The logs can be found here.

Update 10 - December 09 2015

This time tested with wvdial and found that if wvdial is run as root,
we get a successful connection.

The wvdial conf and log, and corresponding syslog are here

Primary conjecture: the situation might have something to do with user group of the corresponding user.

But as indicated here,

With all these tools, to establish a dialup connection, the user has
to be member of the "dip" and "dialout" groups, so put all users who
are supposed to connect via dialup into these groups.

But as we can find,

So, the user is already a
member of the indicated groups.

Now, perhaps the issue boils down to either of these points,

Which additional group does the user need to be?

How do we run the mobile broadband connection setup process as root? (security issues?)

Update 11 - December 09 2015

wvdial works with USB3 and does not work with USB1.

Please find the syslog here.

Also included is the output of dmesg | grep tty > /tmp/dmesg.tty.txt. But see those four lines near start of the file?

Update 12 - December 10 2015

Commented out line 4 (SUBSYSTEM!="tty", GOTO="mm_zte_port_types_end") in /lib/udev/rules.d/77-mm-zte-port-types.rules.

Rebooted my machine. Soft disconnected the cable and inserted the modem.

Tried to connect. Unsuccessful.

The syslog file is here.

Update 13 - December 10 2015

Out of sheer desperation, to see whether some local changes are affecting the connection, tested the machine with Ubuntu 15.04 and 15.10 DVDs.

Booted the machine with Xubuntu 15.04 64 bit DVD. The connection was successful like a charm.

Booted the machine with Ubuntu 15.10 64 bit DVD. The connection failed just like before.

What happened between 15.04 and 15.10?

So frustrating.

Update 14 - December 10 2015

Created a new file /lib/udev/rules.d/78-mm-zte-port-types-RALPH.rules as instructed in the answer.

Rebooted my machine (or executed sudo udevadm control --reload, actually tried both). Inserted the modem.

The modem got recognized.

lsusb

Bus 001 Device 005: ID 19d2:2003 ZTE WCDMA Technologies MSM

Soft disconnected the cable and tried to connect using the modem. Unsuccessful.

Ejected the modem.

The machine hangs once, is that a random event? My machine does not
usually hang once in year.

The syslog file and the created rule files are here.

Update 15 - December 11 2015

Added the following lines to /lib/udev/rules.d/40-usb_modeswitch.rules.

Left the file /lib/udev/rules.d/78-mm-zte-port-types-RALPH.rules intact.

Rebooted my machine. Inserted the modem.

The modem got recognized.

Bus 001 Device 005: ID 19d2:2003 ZTE WCDMA Technologies MSM

Soft disconnected the cable and tried to connect. Unsuccessful.

Ejected the modem.

Removed /lib/udev/rules.d/78-mm-zte-port-types-RALPH.rules.

Rebooted and tried the whole process again. Unsuccessful again.

The syslog file (complete, I did not take the risk of missing any
important part) and the mentioned rule file (40) are here.

Update 16 - December 11 2015

Left only one 1232 rule in
/lib/udev/rules.d/40-usb_modeswitch.rules, removed the other
one.

Executed sudo udevadm control --reload.

Inserted the modem.

The modem got recognized.

Bus 001 Device 005: ID 19d2:2003 ZTE WCDMA Technologies MSM

Soft disconnected the cable and tried to connect. Unsuccessful.

Ejected the modem.

But did not we test the default system above? Did you mean to leave /lib/udev/rules.d/78-mm-zte-port-types-RALPH.rules in its place?

The syslog file (complete, I did not take the risk of missing any
important part) and the mentioned rule file (40) are here

Update 17 - December 11 2015

Commented out the 1232 rule in
/lib/udev/rules.d/40-usb_modeswitch.rules, added one for 2003.

Executed sudo udevadm control --reload.

Inserted the modem.

The modem got recognized as a 1232 device. I am not offered to try connecting (as far as my knowledge goes, it will not be registered to broadband network unless switching has happened to 2003)

Bus 001 Device 008: ID 19d2:1232 ZTE WCDMA Technologies MSM

Ejected the modem.

The syslog file and the mentioned rule file (40) are here

Update 18 - December 11 2015

Put all the rule files in their original form.

Watched lsusb output every one second using a shell
script. Captured output in time stamped files.

Inserted the modem. (The modem first appears in the file
lssuboutouput.Fri Dec 11 16:56:29 BDT 2015.txt). As we can find
from the captures, it is clear that it switches from a 1232 device to
a 2003 one.

Tried to connect. Unsuccessful.

Ejected the modem.

The syslog file, time stamped lsusb outputs and the mentioned rule files are here.

Now, you may want to match the syslog outputs with the time stamps.

Update 19 - December 11 2015

Performed this test in a completley new direction with the wish that I
could isolate the issues.

Saved in a portable media /lib/udev/rules.d/40-usb-media-players.rules and /lib/udev/rules.d/77-mm-zte-port-types.rules (from the Ubuntu 15.10 machine).

Booted the machine using Xubuntu 15.04 64 bit DVD.

Executed diff 77-mm-zte-port-types.rules
/lib/udev/rules.d/77-mm-zte-port-types.rules >
diff15.10and15.04_77-mm.txt. The first file is from the one saved
from 15.10.

Examination of the diff file shows no idProduct 1232 or 2003.

Executed diff 40-usb_modeswitch.rules
/lib/udev/rules.d/40-usb_modeswitch.rules >
diff15.10and15.04_40-usb.txt. Again, the first file is from the one
saved from 15.10.

Again, examination of the diff file shows no idProduct 1232 or 2003.

Inserted the modem. The modem got recognized as a modem.

lsusb

Bus 001 Device 008: ID 19d2:2003 ZTE WCDMA Technologies MSM

Could connect readily after setting up a mobile broadband connection.

Ejected the modem.

Installed the latest USB_ModeSwitch.

diff 40-usb_modeswitch.rules /lib/udev/rules.d/40-usb_modeswitch.rules

Now returns NULL, as expected.

Executed sudo udevadm control --reload-rules.

Inserted the modem. The modem got recognized as a modem.

lsusb

Bus 001 Device 008: ID 19d2:2003 ZTE WCDMA Technologies MSM

Could connect readily.

I could have tried upgrading MM and NM to that of Ubuntu 15.10, just to see where it breaks. I actually tried but gave up due to endless dependency problems.

All the above mentioned diff files are here.

Show more