LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-23-2009, 01:23 PM   #1
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 904

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Talking ZTE MF626 Wireless Modem on Slack - current


Hi everyone,

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.
 
Old 12-23-2009, 03:00 PM   #2
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
Hi,

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.
 
Old 12-24-2009, 11:02 AM   #3
sombragris
Member
 
Registered: Jul 2004
Location: Asuncion, Paraguay, South America
Distribution: Slackware
Posts: 904

Original Poster
Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
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.
 
Old 12-24-2009, 11:50 AM   #4
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
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!
 
Old 12-25-2009, 10:02 AM   #5
folkenfanel
Member
 
Registered: Sep 2004
Location: formerly Fanelia and Zaibach
Distribution: Slackware-current !
Posts: 342

Rep: Reputation: 59
Wink I have one of those animals!

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
 
Old 12-25-2009, 05:34 PM   #6
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
@folkenfanel:
Good job! I tried to write something similar at the time, but my knowledge of udev was insufficient.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure mobile broardband with linux mint 6. (telstra/zte, model mf626) RLU491412 Linux - Newbie 1 06-15-2009 11:17 AM
ZTE MF626 USB Modem adgaydou Linux - Newbie 1 04-03-2009 10:58 PM
How to Install ZTE HSDPA USB MODEM (Model : MF626) at ubuntu 8.10 Dimuthub Linux - Hardware 1 02-17-2009 05:13 PM
How to port forward ZTE MF600 - Wireless Modem? pujakofriendly Linux - Wireless Networking 1 10-08-2007 05:08 PM
PCMCIA modem detect problems Slack-current noxious Slackware 9 11-25-2005 12:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration