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.
The magic script is uploaded:
ReplyDeletehttp://code.google.com/p/bkil-open/source/browse/trunk/volatile/os/tmobile_mf195.sh
Could you please upload your /etc/wvdial.conf (striped from pin/passwords of course) as well? It would be very helpful!
ReplyDeleteThanks
@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.
ReplyDeleteI 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.
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.
ReplyDeleteI 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.
ReplyDelete[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
Which driver is used to the MF195?
ReplyDeleteSorry, 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?
ReplyDeletelsusb outputs the following when in modem mode:
ReplyDeleteID 19d2:1516 ZTE WCDMA Technologies MSM
The good news is that testing on live shows that the current Ubuntu can automatically handle the modem, so no hack is needed anymore.
ReplyDeleteGood news: the modem works out of the box with network manager after upgrading to Ubuntu 14.04.
ReplyDelete