SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I got a ZTE MF626 wireless modem. After some tweaking, I was able to use it successfully in Slackware to connect to the Internet. I am posting this information hoping that it would be useful to my fellow Slackers.
The modem is a hybrid that behaves both as a storage device and as a wireless modem. When plugged into GNU/Linux, it is first recognized as if it were just an USB storage device.
So, what we need to do is basically two tasks:
1. Disable the "flash drive" functionality.
2. Make the modem available to GNU/Linux.
1. Disabling the "flash-drive" functionality.
This step involves passing an AT command to the wireless modem. You can do that on Linux, but I really do not have the knowledge to do it. What I did, on the suggestion of a friend, is the following:
Go into a Windows box. Plug the modem and let it complete its automated install procedure. To be extra sure of the success of the procedure, you can even connect the windows box to the Internet.
If you used the modem to connect to the Internet, disconnect it. Then go to the Device Manager (look into Control Panel > Hardware > Device Manager). Under "modems", look for the wireless modem. Right click on it, and select "Properties". Find out the COM port used by the modem.
Once you know the COM port of the modem, go to Hyper Terminal (in XP: Start > Programs > Accesories > Communications > HyperTerminal). Select a connection, and use the COM port of the modem as the connection. In Flow Control, I was advised to disable it, but your mileage may vary.
Press Caps Lock to ensure writing in all caps. In the Terminal screen, type ATE1 and press Enter. This turns on the visual echo, so you will be able to know what you have typed.
Type the command: AT+ZCDRUN=8 and press Enter. If you got a success message, you are done here.
The AT+ZCDRUN=8 disables the "flash-drive" functionality. This will make the modem usable on Linux, but will render it unusable under Windows. To recover that functionality, repeat the same procedure outlined above, but type this code instead: AT+ZCDRUN=9 and press Enter.
Now we turn to our GNU/Linux box.
2. Making the Modem available to GNU/Linux.
First of all, you should check whether the modem is properly recognized. Open a terminal window, preferably as root, and type:
Code:
lsusb | grep ZTE
The answer should be similar to this:
Code:
Bus 001 Device 006: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF636
The most important part here is the ID; this should be 19d2:0031. If this is the ID, modem is properly recognized.
Second, you should get and install wvstreams and wvdial from SlackBuilds.org.
Next, use wvdialconf as root. Check out its output to see the particular device assigned to the modem. Mine was /dev/ttyUSB0 and /dev/ttyUSB3. For some reason, only the latter worked.
After this, you should get this information:
The ISP/carrier special initialization sequence
the number to be dialed
the username/password
if relevant, the DNS addresses, and other network data.
After this, replace the /etc/wvdial.conf generated previously with a better one. I use one similar to this:
Code:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","gprs.myprovider.com"
Modem Type = USB Modem
Area Code =
Phone = *99# <replace with a suitable number>
ISDN = 0
Password = <password>
username = <username>
Modem = /dev/ttyUSB3 <replace as appropriate>
Baud = 460800
Ask Password = 0
Dial Command = ATD
Stupid Mode = 1
Compuserve = 0
Force Address =
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1
In the example above, please note that the value of Init3 is provider-dependent. Values for this line, as well as for other lines that are provider-dependent (such as number, username, password) can be learned from consulting the config files and settings in a Windows setup. I don't know how, however, because a friend passed the parameters over to me, so I was spared the effort.
If everything is OK, just run wvdial as root and you will be online. Nice, isn't it?
Last edited by sombragris; 12-23-2009 at 01:28 PM.
I had one of these modems and did not need to disable the flashdrive. I used a utility called "usb_modeswitch" which according to the site works with the ZTE 262 as well.
The rest (dialing etc.) should work with standard Slackware packages. I personally used ppp from the command line.
I tried to use usb_modeswitch at first. However, it didn't work despite following the instructions as well as many tutorials. Besides that, I really wasn't interested in keeping the flashdrive functionality. As I commented on the post, disabling the flashdrive functionality so that Linux recognizes the device as a modem is just a matter of sending the modem the command "AT+ZCDRUN=8". I was able to do that using HyperTerminal. As I said before, I've heard there's a way to do this on Linux, but I don't know how.
You are right in saying that one doesn't really need wvdial, and that one can achieve connections with standard Slackware packages. As you said, you can use standard ppp for doing that (However, wvdial looks more plain and common sense to me; but then, I just wanted a quick n'dirty solution). Even more so, you can use kppp for connecting; it's very easy and graphical but then, you are bound to use KDE.
All in all, thanks for the pointers. They will be very useful to any fellow Slacker looking to get online with this modem
Last edited by sombragris; 12-24-2009 at 11:05 AM.
Well, I have some ideas how disabling how sending the command could be done in Linux (which it itself was an interesting discovery!) but I do not have the ZTE modem any longer. I switched it for another type (by switching GSM operators) that works out of the box with Linux.
It *does* have a flashdrive under Windows to load the software, but somehow the newer Linux kernels do the switching automagically.
Since it is so automatic under Slackware 13.0, I don't even know the exact model number (never bothered to check). I plug it in and Linux gives me an ttyUSB0 port...
Well, your post may give other Slackware users some help in using one of these ZTE modems!
Hi there! I have one of those animals, very tame by the way.
Months ago, before knowing the trick to disable the ZeroCD, I used to make a udev rule for it: (WARNING, modify the sr0 if you use serial optical drives!)
Code:
# If it finds a generic pseudo CD (ZeroCD), umount it
# so it can recognize the modem as a modem and load
# the usbserial/option module
ACTION!="add", GOTO="ZTE_End"
# Is this the ZeroCD device?
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000", SYSFS{idVendor}=="19d2", GOTO="ZTE_ZeroCD"
# Is this the actual modem?
SUBSYSTEM=="usb", SYSFS{idProduct}=="0031", SYSFS{idVendor}=="19d2", GOTO="ZTE_Modem"
SUBSYSTEM=="usb", SYSFS{idProduct}=="0015", SYSFS{idVendor}=="19d2", GOTO="ZTE_Modem"
SUBSYSTEM=="usb", SYSFS{idProduct}=="0001", SYSFS{idVendor}=="19d2", GOTO="ZTE_Modem"
LABEL="ZTE_ZeroCD"
RUN+="/usr/bin/eject /dev/sr0"
LABEL="ZTE_Modem"
RUN+="/sbin/modprobe option", MODE="660", GROUP="plugdev"
KERNEL=="ttyUSB2", SYMLINK+="modem"
LABEL="ZTE_End"
It gives you a /dev/modem symlink to play with. Now if you want to play even more... That thing gives you 3 devices, I haven't figured out what they do besides ttyUSB2 yet but I do think they're used to send/receive SMS.
Having already activated your modem, (you can do it even more easily by hand, by ejecting /dev/srx -where x=the number of the modem device e.g. sr0, if you have a serial optical drive it could be sr1, sr2 etc- ); you can do this to enable/disable the ZeroCD from the Linux console:
To DISABLE the ZeroCD
Code:
echo "AT+ZCDRUN=8" > /dev/ttyUSB2
And to ENABLE the ZeroCD
Code:
echo "AT+ZCDRUN=9" > /dev/ttyUSB2
I did this to be able to use it as a normal USB memory key when transferring data to Windows boxes. It was absolutely annoying having to run the installer... On Linux, it's also fastar as it doesn't have to switch the device. Running the device without the ZeroCD on Windows makes it make the connection faster.
Why would someone make something easy at first and annoying ever after? They could very well have put the installer on the memory key (it weighs only about 7MB) or provided a CD. Even on Windows it's annoying and slow to detect and switch.
If anybody has any tricks to read those SMS, that would be next
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.