..a dose of zero-day know-hows ..

7/07/2008

How to use SmartBro Prepaid Kit on Linux (ZTE MF622 HSDPA USB MODEM)

Due to the typhoon that hit our area (Kalibo, Aklan), I was pushed offline, internetless for a week. As a recourse I was forced to purchase the SmartBro Prepaid Kit (ZTE MF622 HSDPA Modem).

Here's how I was able to use the SmartBro Prepaid Kit (ZTE MF622 HSDPA Modem) on my Linux dev machine (fedora 8) and should be applicable to other popular desktop linux distros.

I created two files as follows:

/etc/udev/rules.d/25-zte-mf622.rules containing:
ACTION!="add", GOTO="End"
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000",
SYSFS{idVendor}=="19d2", GOTO="ZeroCD"
SUBSYSTEM=="usb", SYSFS{idProduct}=="0001",
SYSFS{idVendor}=="19d2", GOTO="Modem"
LABEL="ZeroCD"
RUN+="/sbin/rmmod usb_storage"
LABEL="Modem"
RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0001",
MODE="660", GROUP="dialout"
LABEL="End"
/etc/smartbro.conf containing:
[Dialer Defaults]
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init5 = AT+CGDCONT=1,"IP","smartbro"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99#
Modem = /dev/ttyUSB0
Username = user
Password = pass
Dial Command = ATDT
Baud = 460800
To connect to the internet via the usb modem, simply invoke the following command on the terminal:
wvdial --config=/etc/smartbro.conf

To Disconnect, kill the process ID of the PPPD command called by wvdial or simply remove the USB HSDPA Modem.

26 comments:

Anonymous said...

Hi,

I did exactly what you posted but I can't get my smarbro zte mf622 modem to be configured correctly.

Here's the output of dmesg:

Jul 16 23:14:09 aris kernel: ohci_hcd 0000:00:13.1: wakeup
Jul 16 23:14:09 aris kernel: usb 2-1: new full speed USB device using ohci_hcd and address 8
Jul 16 23:14:10 aris kernel: ohci_hcd 0000:00:13.1: wakeup
Jul 16 23:14:10 aris kernel: usb 2-1: new full speed USB device using ohci_hcd and address 9
Jul 16 23:14:10 aris kernel: usb 2-1: configuration #1 chosen from 1 choice
Jul 16 23:14:10 aris kernel: Initializing USB Mass Storage driver...
Jul 16 23:14:10 aris kernel: scsi12 : SCSI emulation for USB Mass Storage devices
Jul 16 23:14:10 aris kernel: scsi13 : SCSI emulation for USB Mass Storage devices
Jul 16 23:14:10 aris kernel: usbcore: registered new driver usb-storage
Jul 16 23:14:10 aris kernel: USB Mass Storage support registered.
Jul 16 23:14:10 aris kernel: usbcore: deregistering driver usb-storage

while 'lsusb' outputs:

Bus 003 Device 001: ID 0000:0000
Bus 002 Device 009: ID 19d2:2000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 004: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem

As you can see, I'm also using E220 HSDPA Modem of Globe visibility. I'm trying to load balance two gsm modem connected to the internet simultaneously.

Any help to get my mf622 modem to work will be very much appreciated.

Arpee Ong said...

try running 'wvdialconf' and paste here the results.

wvdialconf should detect your ZTE modem and will create wvdial.conf for you.

afterwhich, paste smartbro.conf to the contents of wvdial.conf and run 'wvdial' (no parameters) and let me know the results

Anonymous said...

Here the problem - the zte mf622 card has a usb memory card in it for the windows driver. When this is installed under windows, the drivers then switch to using it as modem. Without this switch, the card is just a usb stick. Under linux you need to do this manually. Try this -
/sbin/rmmod usb_storage
to unload the usb stick then
/sbin/modprobe usbserial vendor=0x19d2 product=0x0001
to get the modem working. Then you can run the wvdialconf to get it working.

For more info look at -
http://blog.ufsoft.org/2007/11/30/zte-mf622-usb-modem-under-linux
or
http://www.draisberghof.de/usb_modeswitch/

Anonymous said...

Boring ..|..

geobz said...

Pare,

Great info! I'm a linux noob running xubuntu hardy on a redfox wizbook800. Will this work with me?

Salamat!

Arpee Ong said...

geobert, yes this should work fine with your setup, try it and let me know if it works ok. One thing that pisses me off is I get billed 20Pesos/30minutes (twice as advertised).. but hell its only my backup connection anyway.. :D

jac said...

That solution seems nice, but dont work for me: i have pluged in a WD Passport Essential USB external hard drive (160GB), and it uses usb_storage i think, so when i do rmmod usb_storage, it says it is in use, and cannot be removed...

So, which would be the solution? I think may be your solution works well when you just have 1 USB mass storage device connected (just the modem...)

Thanks!

Arpee Ong said...

Hi jaclinuxhelp,

This post from ubuntuforums might be helpful: http://ubuntuforums.org/showthread.php?t=722618
I didnt notice that problem until now as I only use the modem as my backup connection. One way i go around it is i rename the rules file so it doesnt end in .rules extension before i insert a mass storage and works just right for me. The new inserted USB devices functions even im currently connected to the internet via the modem as long as the 25-zte-mf622.rules is renamed as 25-zte-mf622.rules.txt.

Unfortunately I cannot test a new script now to automate this so the best recourse is the forum post above or the rules file renaming. I currently do not have my ZTE modem now(lent to brother) as I am now using my Samsung i550 as my backup connection. I'll find a way to automate this and update this article. For now, lets settle for it as its the only working solution.

SavvyInvestor said...

Arpee, thanks for the great tip. I'm using Hardy Heron(Ubuntu 8.04) and your tutorial worked perfectly for me...without changing anything.

Check it out in my Smartbro Experience...including making it work in Ubuntu (http://www.buggedtech.com/2008/09/smartbro-experienceincluding-making-it.html)

Anonymous said...

can i also get the rssi or rsl of the usb modem? i need it for a project sana, if you can help me find a way to do it. thanks!

Arpee Ong said...

yes gema, try this AT command which outputs the RSSI of the modem:

+CSQ

For a list of USB Modem AT commands, you can refer to this article > http://www.mobilebroadbandrocks.com/at-commands-for-usb-modems

goodluck.

OlzP said...

Try downloading usb_modeswitch from
http://www.draisberghof.de/usb_modeswitch/ (make sure you unqoute the modem info in the config file) and modding the .rules file to use this instead of rmmod usb_storage. You will not loose any other usb storage functionality functionality (such as HDD, etc)

Ramon said...

Hi. I tried following your instructions and it seems to work for the most part. The modem is detected and it seems to dial but I can't surf. It seems like I'm not given an IP.

Running ifconfig -a I see the ppp0:
http://pastie.org/287830

Here's what wvdial spits out when I dial up: http://pastie.org/287832

Just in case you may need this, I put my syslog: http://pastie.org/287840

Really hoping to get this to work. I tried Globe visibility to no avail as well, and it seems that people have less luck with it.

Anonymous said...

hello,

pede poh ba sa fedora 4??

Anonymous said...

Is this method applicable to the newer model of smartbro which is the wm66? http://racoma.com.ph/archives/smart-bro
This is the link...Please tell what will be the changes to do on your method... Thanks..

Ramon said...

I was able to figure out was what wrong. If you're not assigned an IP then you probably don't have load!

gema said...

hi arpee! i need your help RE: AT commands. I tried using minicom as many suggested that its like the equivalent of the hyperterminal. everything in minicom is new to me and it's very confusing unlike the hyperterminal in ubuntu which is very easy to figure out and execute AT commands. I've tried using putty but it seems that its only for establishing connections (?) not necessarily for AT commands (?). what do you suggest that i do? or read in fact to get me started in executing AT commands in ubuntu hardy? Thanks!

Unknown said...

Guys, help me please. I got this when running wvdial.

bash-3.1# wvdial --config=/etc/smartbro.conf
--> WvDial: Internet dialer version 1.60
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory

any idea why?

issuing lsmod|grep usb has
usbserial 33896 0
hci_usb 17052 0
bluetooth 55012 1 hci_usb
usbhid 44160 0
hid 41472 1 usbhid

any help?

Arpee Ong said...

man, i suggest you run wvdialconf first and let wvdial pick up the device for you, make sure you plug it out first and kill any currently running wvdial process before you retry.

Unknown said...

yeah, I ran that wvdialconf and this is what I got:
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

Modem Port Scan<*1>: S0 S1 S2 S3


Sorry, no modem was detected! Is it in use by another program?
Did you configure it properly with setserial?

Please read the FAQ at http://open.nit.ca/wiki/?WvDial

If you still have problems, send mail to <wvdial-list@lists.nit.ca>.

btw, when you insert your usb to your laptop or pc, is it being identified like a cd? because mine, it's everytime! I don't know if that's normal or it should be hindered or get off with udev so that it will not do mount the usb as a storage device, so the modem can use it. does my question makes sense?

cryogenix said...

hi there. Will this set up instruction also work for the new Smart Bro prepaid model, the Huawei e156c?

gwapo4u said...

Just an additional information: This also works lie a charm with PLDT WeRoam using MF622 Dongle, and Ubuntu 8.04 LTS (Hardy Heron) operating system

issa said...

Hi!

I have an Acer Aspire One Linux Laptop, and I would like to use my SmartBro Huawei E1553 dongle on it. I badly need help. Is this whole process applicable? Kindly fill me in with needed details. Thank you! :)

Unknown said...

hi,

it tells me that wvdial command not found

_cRisH_SweEt_ said...

hi, do you know how to execute smartbro in ubuntu os? please let me know, i'm using netbook neo

Anonymous said...

Great information, thanks a lot for this informative blog.
ID Kit