Home > Linux > Setup ZTE MF622 USB Modem in Linux

Setup ZTE MF622 USB Modem in Linux

Recently I found myself needing to install a 3g Modem for a Portuguese Service Provider (TMN). When i tried plug in the modem in all it did was deploy a new USB drive showing me the contents of what seemed to be the windows installer for the manager application. After a little digging around i found the solutions for my troubles. This post shows the solution i found. this is how i got it to work, I’m not saying its the best and I’m sure its not the only one.

Getting Linux to detect the 3g modem side of the device instead of the USB pen side

This device works as two devices in one. In windows when you plug the modem in it first mounts a hard-drive/cdrom in order to install the drivers and applications for the modem. it later removes this drive and installs itself as a modem. this last part is done by the installer so in Linux this last part never happens when you plug in the modem. What you need to do is force the system to ignore the usb pen drive side of the device.

In order to do this you need to create a file named “15-zte-mf622.rules” and put it in : “/dev/udev/rules.d” (warning you need root privileges in order to do this)

Put the following content in this file you just created:

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}==“0001”,

SYSFS{idVendor}==“19d2”, GOTO=“ZTE_Modem”


# This is the ZeroCD part of the card, remove

# the usb_storage kernel module so

# it does not get treated like a storage device

RUN+=“/sbin/rmmod usb_storage”


# This is the Modem part of the card, let’s

# load usbserial with the correct vendor

# and product ID’s so we get our usb serial devices

RUN+=“/sbin/modprobe usbserial vendor=0x19d2 product=0x0001”,

# Make users belonging to the dialout group

# able to use the usb serial devices.

MODE=“660”, GROUP=“dialout”


Note: this is the configuration for the ZTE MF622 modem.

After you have created this file run the following command, this will reload the device rules:

udevcontrol reload_rules

This rules file prevents the system from mounting the USB drive side of the device, but this constitutes a problem. Now your system wont be able to recognize USB hard drives. Don’t fret this can be solved by removing the file and reloading the rules. More on this further down the road.

If you connect your modem at this point you will see that the system now installs it as a modem and you can find it in “/dev/ttyUSB0“.

You can now use your favorite dialer (wvdial, UMTSmon, …) to connect using this device.

The ability to connect thumb drives again.

After deploy the above rules file and reloading your rules you will lose the ability to connect thumb drives to the system. All you have to do to be able to use them is remove the file and reload the rules. I got the following solution from a comment by Dorothy Hyde to the post i mention in the reference part of this article:

1. Create a folder called “/udv-rls” and put the above rules file inside it

2. Create a bash script called 3up with the following code:


cp -v /udv-rls/15-zte-mf622.rules /etc/udev/rules.d/

devcontrol reload_rules

# end of script.

3. Create a bash script called usf with the following code:


rm -v -f /etc/udev/rules.d/15-zte-mf622.rules

udevcontrol reload_rules

#end of script

Now before you plug in the modem run 3up, and after the system has detected the modem run usf.

Connecting to the web:

After the system has detected your modem you now have to be able to connect. I tried using wvdial and all i managed was to get my modem blocked. No matter what i tried i could never get it to connect. So i resorted to UMTSmon. You can get binaries and source from here .

After you install it you can run UMTSmon to dial in. I ran into some trouble at this point:

  • UMTSmon did not detect the modem unless i ran it with root privileges – basically in order to use the installed devices you need to add your self to the uucp group. So you need the run the following commands:

usermod -a -G uucp username

  • If you run UMTSmon without root privileges pppd will ask for root when trying to connect – You need to SUID pppd. I found the following on this matter (Reference).

Because PPP needs to set up networking devices, change the kernel routing table and so forth, it requires root privileges to do this.

If users other than root are to set up PPP connections, the pppd program should be setuid root

-rwsr-xr-x 1 root root 95225 Jul 11 00:27 /usr/sbin/pppd

If /usr/sbin/pppd is not set up this way, then as root issue the command:-

chmod u+s /usr/sbin/pppd

You should now be able to connect to the Internet using your ZTE MF622 modem.

These are the configurations i had to use in UMTSmon in order to connect (these configurations work for TMN – Portuguese Service Provider).

UMTSmon Preferences

UMTSmon Preferences

I created the following bash script which i run before plug in in the modem, it basically automates the above process. Mind that you might be required to run it using root privileges.



echo “******************************”
echo “* ZTE MF622 – Startup Script *”
echo “*                            *”
echo “* Developed by NFurtado      *”
echo “* Date: 02/12/2008           *”
echo “******************************”
echo “”
#copy the rules and reload the udev
echo “Copying the rules file to $rulesFileDir”

cp $rulesFileOriginalPath $rulesFileDir || { echo “ERROR: Rules file could not be copied. Script exiting.”;  exit 1; }
echo “Reloading Rules”
/sbin/udevcontrol reload_rules || { echo “ERROR: Rules could not be reloaded. Script Exiting.”; exit 1;}

#output connect modem
echo “Please connect 3g Modem.”
echo “Waiting for modem…”

#loop and wait for modem to be connected
while [ -z $ttyGrep ]

ttyGrep=`ls  /dev/ |grep ttyUSB0`


echo “Modem Detected”
echo “Cleaning up:”

#remove rules file and reload rules
echo “Removing rules file from ${rulesFileDir}”

rm -v -f $rmCommand || { echo “ERROR: Rules file could not be Removed. Remove it manually.”;}
echo “Reloading Rules”
/sbin/udevcontrol reload_rules  || { echo “ERROR: Rules could not be reloaded. Script Exiting.”; exit 1;}
echo “”

echo “Modem is Setup. Use your favorite Dialer to connect.”

exit 0

As i said before I’m a newbie in these affairs so take the above instructions and scripts with a grain of salt. If you see any inconsistencies or errors just let me know


  1. http://tldp.org/HOWTO/PPP-HOWTO/root.html
  2. http://blog.ufsoft.org/2007/11/30/zte-mf622-usb-modem-under-linux
Categories: Linux Tags: , ,
  1. Wiliam
    January 12, 2009 at 11:36 pm

    Hey im totaly new to linux, and i have the MF622 modem, i will really apreciate detaliled help, i have tried to create the file named “15-zte-mf622.rules”
    how ever i get an error, and im starting to think im not quite shure of how to make a file..
    helps is deseperately needed, i highly apreciated

    my mail willypeniche@hotmail.com
    Thanks, William

    • masterperas
      January 14, 2009 at 4:11 pm

      As i said on the email i sent you. You need to specify wich problem you are having. The only one i can imagine you having is permissions, if your user doesn’t have permissions to write to the folder your trying to create the file in it you need to either grant it permissions or chose a folder where you have said permissions.

  2. rordan
    February 3, 2009 at 9:52 pm

    This “15-zte-mf622.rules” run good in mandriva one 2009?
    because in madriva the “/dev/udev/rules.d” is in “/etc/udev/rules.d”.
    no problem whit dev or etc.
    i cant use “udevcontrol reload_rules” in mandriva
    please help me!

  3. January 28, 2011 at 3:37 pm

    Is there any way to subscribe to this post? I’d like to be updated on the comments here as they come in. I’ve always been somewhat of a debater and I’d like to hear other’s opinions on this issue.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: