ZTE MF195 3G hack on Ubuntu 11.10

If you connect this modem to a machine running Ubuntu, it mounts and opens the virtual driver disk. If you unmount the partition, usb_modeswitch automatically kicks in and switches the device from CD-ROM emulation to modem mode. Unfortunately, Network Manager would not connect regardless of configuration. However, after some trial and error, wvdial was able to establish connection and start transferring data.

After reducing the unknowns, I've devised a small script which waits until the drive gets automatically mounted, unmounts the device, waits for settling and then establishes a connection with wvdial. This script was hooked up to a specific device addition udev rule to make it run automagically. As the devised udev rule did not narrow down the event good enough, actually two such invocations are done for each insertion, so a bit of an ugly hacking was involved to implement mutual exclusion.

Comments

  1. The magic script is uploaded:

    http://code.google.com/p/bkil-open/source/browse/trunk/volatile/os/tmobile_mf195.sh

    ReplyDelete
  2. Could you please upload your /etc/wvdial.conf (striped from pin/passwords of course) as well? It would be very helpful!

    Thanks

    ReplyDelete
  3. @Anonymous: Well, actually that setup was not on my computer, but I can ask for the file from the guy that uses it. I remember that I've made minimal changes to the file - perhaps just the modem device and a standard HS init string was added.

    I myself use an MF637, and that is supported out of the box with network manager. After setting up a new connection for it in the GUI, it comes up in the interface dropdown in about half a minute from insertion without any trickery.

    Although, I do also use this on a different environment with wvdial occasionally, so I can also paste one of my own soon. Stay tuned.

    ReplyDelete
  4. Hm. Looks like it's taking more time than anticipated, as I've recently switched machines and don't have enough cables for the old one... What a pity. Will get back with wvdial.conf ASAP.

    ReplyDelete
  5. I still couldn't grab wvdial.conf from the tested config, but we've encountered the very same issue on the same MF195 modem on KDE, and in this instance we used pretty much a default wvdial.conf and it worked like a charm. Again the modem device node, APN value and user/password is provider specific. PIN was disabled for testing.

    [Dialer Defaults]
    New PPPD = yes
    Phone = *99#
    Modem = /dev/ttyACM0
    Modem Type = USB Modem
    Baud = 460800
    ISDN = 0
    Username = web
    Password = web
    Init1 = ATZ
    Init2 = AT+CGDCONT=1,"IP","internet"
    Stupid mode = 1
    Auto DNS = 1

    ReplyDelete
  6. Which driver is used to the MF195?

    ReplyDelete
  7. Sorry, I don't have such a device to check, but I could ask when I meet one. We were basically using one of the built-in kernel modules, nothing custom needed. Did you check your USB ID on the net USB? Are you using an up to date distribution?

    ReplyDelete
  8. lsusb outputs the following when in modem mode:
    ID 19d2:1516 ZTE WCDMA Technologies MSM

    ReplyDelete
  9. The good news is that testing on live shows that the current Ubuntu can automatically handle the modem, so no hack is needed anymore.

    ReplyDelete
  10. Good news: the modem works out of the box with network manager after upgrading to Ubuntu 14.04.

    ReplyDelete

Post a Comment

Popular posts from this blog

Hidden TFTP of TP-Link routers

Tftp secret of TL-WR740N uncovered

When both Google *and* AppStatus is down