I spent about 4 hours debugging each issue. The problems were multiple, and I'll give the detailed solution here.
SUMMARY:
- 1) Comment the line "NeedResponse=1"
2) If you switch from command line, you need the "-I" argument.
3) Need an old version (0.4) of "modemmanager".
1) Disable NeedResponse.
The defaut usb_modeswitch configuration for my device (19d2:2000) contains three messages and a line requiring NeedResponse=1. Unless one waits about twenty seconds after connecting the device, my ZTF MF110 modem returns error -110 on the first message. When NeedResponse is enabled, the other two messages are not sent after the error. This is bad, because the switching happens on the third message.
NOTE: A POSSIBLE WORKAROUND FOR usb_modeswitch WOULD BE TO IGNORE THE ERROR IF IT IS -110
FIX: Create a file "/etc/usb_modeswitch.d/19d2:2000" with the following
contents:
After creating this file, automatic switching will work fine.# ZTE devices
TargetVendor= 0x19d2
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0157,1402,2002,2003"
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
#COMMENTED
#NeedResponse=1
#ADDED (unnecessary by udev, but necessary by console. Equivalent to -I):
InquireDevice=0
You can also verify manually, by running:
- sudo usb_modeswitch -I -W -v 19d2 -p 2000 -c /etc/usb_modeswitch.d/19d2\:2000
This is the other problem I was dealing with. This modem requires the -I switch or it will not switch. This switch is already present in the automatic switching. But it would have saved me a lot of time debugging in the command line, if I had known that -I was necessary for this modem.
Adding a line "InquireDevice=0" to the config is equivalent.
3) Use version 0.4 of modemmanager.
After switching was working (by following the steps in (1)), the modem was still not showing up in the network manager.
Ubuntu 13.10 comes with modemmanager version 0.6, which doesn't work. I found a forum post (in italian !!) which solved the same issues but with another modem, and in Fedora, by downgrading to 0.4: With 0.6, modemmanager produces the following error in my syslog:
- modem-manager[703]: <warn> plugin 'ZTE' claimed to support tty/ttyUSB1 but couldn't: (-1) (unknown)
modem-manager[703]: <warn> plugin 'ZTE' claimed to support tty/ttyUSB3 but couldn't: (-1) (unknown)
modem-manager[703]: <warn> plugin 'ZTE' claimed to support tty/ttyUSB0 but couldn't: (-1) (unknown)
- modem-manager[728]: <info> (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 claimed port ttyUSB0
FIX: Download the .DEB package from: the file is named "modemmanager_0.4+git.20110124t203624.00b6cce-2ubuntu1_amd64.deb"
Install by typing:
- sudo dpkg -i modemmanager_0.4+git.20110124t203624.00b6cce-2ubuntu1_amd64.deb
- sudo apt-mark hold modemmanager
THAT'S IT!!!!.
Replug the modem and it should work now.
TIP: I noticed that it gets recognized much faster when plugged to a USB 3.0 port. I don't know why this is. Plugging to normal usb 2.0 ports takes a long time to get the modem recognized.
PD:
I will not file bug reports to usb_modeswitch and modemmanager. I just don't have the time and I wasted too much time already, finding the solution that works. I'll just enjoy my modem, and I encourage others to post the relevant bug reports.