Senin, 11 Februari 2008

Tutorial Instalasi Modem 3G / HSDPA ZTE MF622 di Linux (Tested in Debian and Ubuntu)



1.Pertama kali ditancapkan ke usb di PC atau Notebook maka Modem ZTE ini akan dikenali sebagai usb storage, untuk itu kita terlebih dahulu harus membuat agar modem ZTE MF622 ini dikenali sebagai modem 3G. Download packet ini dari : http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.7.tar.bz2

2.Extract file tersebut dengan perintah :
$ tar -jxvf usb_modeswitch-1.0.7.tar.bz2


$ ls
usb_modeswitch-1.0.7.tar.bz2

$ tar -xvjf usb_modeswitch-1.0.7.tar.bz2
usb_modeswitch-1.0.7/
usb_modeswitch-1.0.7/compile.sh
usb_modeswitch-1.0.7/usb_modeswitch
usb_modeswitch-1.0.7/usb_modeswitch.conf
usb_modeswitch-1.0.7/usb_modeswitch.c
usb_modeswitch-1.0.7/usb_modeswitch.h
usb_modeswitch-1.0.7/COPYING
usb_modeswitch-1.0.7/README

$ ls
usb_modeswitch-1.0.7 usb_modeswitch-1.0.7.tar.bz2

$ cd usb_modeswitch-1.0.7/

~/usb_modeswitch-1.0.7$ ls
compile.sh
README
usb_modeswitch.c
usb_modeswitch.h
COPYING
usb_modeswitch
usb_modeswitch.conf

3.Login sebagai root

$ su atau
$ sudo su

4.Copy file executable "usb_modeswitch" pada directory "/sbin" dan "/usr/sbin"

~/usb_modeswitch-1.0.7# cp usb_modeswitch /sbin/usb_modeswitch
~/usb_modeswitch-1.0.7# cp usb_modeswitch /usr/sbin/usb_modeswitch

Perhatian Untuk Linux basis debian seperti Ubuntu, dll, default ada di /usr/sbin/. Namun untuk basis Redhat sperti fedora, opensuse ada di /sbin.


5.Copy file "usb_modeswitch.conf" ke directory "/etc"


~/usb_modeswitch-1.0.7# cp usb_modeswitch.conf /etc/usb_modeswitch.conf


6.Buat file rules di /etc/udev/rules.d/15-zte-mf622.rules yang berisikan :

#--------------------------------------------------
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"

LABEL="ZTE_ZeroCD"
# 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"
RUN+="/usr/sbin/usb_modeswitch -d 1 -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0001"

LABEL="ZTE_Modem"
# 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"

LABEL="ZTE_End"
#-------------------- eof ---------------

Pastikan permision filenya sama dengan rule yang lain.
# chmod 644 15-zte-mf622.rules

Dan arah kan RUN+ pada script diatas sesuai dengan distro yang dipakai :
RUN+="/usr/sbin/usb_modeswitch -d 1 -v 0x19d2 -p 0x2000 -V 0x19d2 -P 0x0001" ==>> Perhatian Untuk Linux basis debian seperti Ubuntu, dll, default ada di /usr/sbin/. Namun untuk basis Redhat sperti fedora, opensuse ada di /sbin/.


7.Pastikan Anda telah menginstall wvdial di Linux, (di Debian atau Ubuntu tinggal install melalui apt-get atau melalui Synaptic).

# apt-get install wvdial

8.Buat script di /etc/wvdial.conf berisikan :

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 3600000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT+CGDCONT=1,"IP","indosatm2"
Area Code =
Phone = *99#
Username =
Password =
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1


9.Restart Linux anda sekarang


10.Setelah selesai restart coba tancapkan modem ZTE MF622 pada slot USB yang ada, tunggu sampai indikator led berwarna hijau (tunggu kira-kira 30 detik) sebab ini memrlukan waktu untuk pengenalan modem ZTE itu sendiri.

11.Jalankan program wvdial nya :


# wvdial
WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATQ0 V1 E1 S0=0 &C1 &D2
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2
WvDial Modem<*1>: OK
WvDial<*1>: Sending: AT+CGDCONT=1,"IP","indosatm2"
WvDial Modem<*1>: AT+CGDCONT=1,"IP","indosatm2"
WvDial Modem<*1>: OK
WvDial<*1>: Modem initialized.
WvDial<*1>: Sending: ATDT*99#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99#
WvDial Modem<*1>: CONNECT
WvDial<*1>: Carrier detected. Starting PPP immediately.
WvDial: Starting pppd at Mon Feb 11 01:06:45 2008
WvDial: Pid of pppd: 14291
WvDial<*1>: pppd: H�
WvDial<*1>: Using interface ppp0
WvDial<*1>: pppd: H�
WvDial<*1>: pppd: H�
WvDial<*1>: pppd: H�
WvDial<*1>: pppd: H�
WvDial<*1>: pppd: H�
WvDial<*1>: pppd: H�
WvDial<*1>: pppd: H�
WvDial<*1>: local IP address 124.81.144.28
WvDial<*1>: pppd: H�
WvDial<*1>: remote IP address 10.64.64.64
WvDial<*1>: pppd: H�
WvDial<*1>: primary DNS address 202.155.0.10
WvDial<*1>: pppd: H�
WvDial<*1>: secondary DNS address 202.155.0.15
WvDial<*1>: pppd: H�

Jika muncul seperti diatas berarti kita sudah terkoneksi dengan 3G HSDPA dan sudah mendapatkan IP maupun DNS. kita tinggal mencoba ping ke www.yahoo.com untuk memastikan bahwa kita sudah bisa browsing.

10.Selamat ber Internet ria dengan layanan 3,5G HSDPA IndosatM2 :)


In English..

1.First plug to usb in PC or Notebook then this Modem ZTE will be recognized as usb storage, for that us beforehand must make in order to modem this ZTE MF622 are recognized as [the] modem 3G. This Download packet from : http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-1.0.7.tar.bz2

2.Extract file is referred [as] by order of :
$ tar -jxvf usb_modeswitch-1.0.7.tar.bz2

$ ls
usb_modeswitch-1.0.7.tar.bz2

$ tar -xvjf usb_modeswitch-1.0.7.tar.bz2
usb_modeswitch-1.0.7/
usb_modeswitch-1.0.7/compile.sh
usb_modeswitch-1.0.7/usb_modeswitch
usb_modeswitch-1.0.7/usb_modeswitch.conf
usb_modeswitch-1.0.7/usb_modeswitch.c
usb_modeswitch-1.0.7/usb_modeswitch.h
usb_modeswitch-1.0.7/COPYING
usb_modeswitch-1.0.7/README

$ ls
usb_modeswitch-1.0.7 usb_modeswitch-1.0.7.tar.bz2

$ cd usb_modeswitch-1.0.7/

~/usb_modeswitch-1.0.7$ ls
compile.sh
README
usb_modeswitch.c
usb_modeswitch.h
COPYING
usb_modeswitch
usb_modeswitch.conf

3.Login as root

$ su or
$ sudo su

4.Copy file executable "usb_modeswitch" at directory "/sbin" and "/usr/sbin"

~/usb_modeswitch-1.0.7# cp usb_modeswitch /sbin/usb_modeswitch
~/usb_modeswitch-1.0.7# cp usb_modeswitch /usr/sbin/usb_modeswitch

Attention Untuk bases Linux debian like Ubuntu, etc, default [in] /usr/sbin/. Nevertheless for bases Redhat like fedora, opensuse [in] /sbin.


5.Copy file "usb_modeswitch.conf" to directory "/etc"

~/usb_modeswitch-1.0.7# cp usb_modeswitch.conf /etc/usb_modeswitch.conf


6.Buat file rules in /etc/udev/rules.d/15-zte-mf620.rules that comprising :

#--------------------------------------------------
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"

LABLE="ZTE_ZeroCD"
# This is the ZeroCD part of the card, remove
# the usb_storage kernel module so
# it does note get treated like a storage device
#RUN+="/sbin/rmmod usb_storage"
RUN+="/usr/sbin/usb_modeswitch d 1 v 0x19d2 p 0x2000 V 0x19d2 P 0x0001"

LABLE="ZTE_Modem"
# This is the Modem part of the card, let's
# load usbserial with the correct vendor
# and product ID's so we get our serial usb devices
RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0001",
# Make users belonging to the dialout group
# able to use the serial usb devices.
MODE="660", GROUP="dialout"

LABLE="ZTE_End"
#-------------------- eof ---------------

Ascertain permision its file equal to other rule.
# chmod 644 15-zte-mf622.ruleses

And pointing RUN+ at script above in accordance with distro weared :
RUN+="/usr/sbin/usb_modeswitch d 1 v 0x19d2 p 0x2000 V 0x19d2 P 0x0001" ==>> Attention for bases Linux debian like Ubuntu, etc, default [in] /usr/sbin/. Nevertheless for bases Redhat like fedora, opensuse [in] /sbin/.


7.Certainly you already install wvdial in Linux, (in Debian or Ubuntu remain install by apt-get or Synaptic).

# apt-get install wvdial

8.Create script in /etc/wvdial.conf like this :

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 3600000
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Init3 = AT+CGDCONT=1,"IP","indosatm2"
Area Code =
Phone = *99#
Username =
Password =
Ask Password = 0
Dial Command = ATDT
Stupid Mode = 1
Compuserve = 0
Force Address =
Idle Seconds = 0
DialMessage1 =
DialMessage2 =
ISDN = 0
Auto DNS = 1

9.Restart your Linux now

10. After restarted try plug stick modem ZTE MF622 at slot existing USB, await till indicator chromatic led green (await 30 second) because this need time for modem recognition ZTE it self.

11.Running wvdial s :

# wvdial
WvDial<*1>: WvDial: Internet dialer version 1.56
WvModem<*1>: Serial Cannot get information for port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Missionary: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: O.K.
WvDial<*1>: Missionary: ATQ0 V1 E1 S0=0 &C1 &D2
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2
WvDial Modem<*1>: O.K.
WvDial<*1>: Missionary: AT+CGDCONT=1,"IP","indosatm2"
WvDial Modem<*1>: AT+CGDCONT=1,"IP","indosatm2"
WvDial Modem<*1>: O.K.
WvDial<*1>: Modem initialized.
WvDial<*1>: Missionary: ATDT*99#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99#
WvDial Modem<*1>: CONNECT
WvDial<*1>: Carrier detected. Starting PPP immediately.
WvDial: Starting pppd at Mon Feb 11 01:06:45 2008
WvDial: Pid of pppd: 14291
WvDial<*1>: pppd: H?
WvDial<*1>: Using interface ppp0
WvDial<*1>: pppd: H?
WvDial<*1>: pppd: H?
WvDial<*1>: pppd: H?
WvDial<*1>: pppd: H?
WvDial<*1>: pppd: H?
WvDial<*1>: pppd: H?
WvDial<*1>: pppd: H?
WvDial<*1>: local address IP 124.81.144.28
WvDial<*1>: pppd: H?
WvDial<*1>: remote address IP 10.64.64.64
WvDial<*1>: pppd: H?
WvDial<*1>: primary DNS address 202.155.0.10
WvDial<*1>: pppd: H?
WvDial<*1>: secondary DNS address 202.155.0.15
WvDial<*1>: pppd: H?

If display like above mean us have been connected with 3G HSDPA and have got IP and also DNS. we remain try ping to www.yahoo.com to ensure that us have browsing.

10. Weel, have the internet of cheerful with service 3,5G HSDPA IndosatM2 :)


Dony Ramansyah
site : http://dony-ramansyah.bravehost.com
blog : dony-ramansyah.blogspot.com
email : dony.ramansyah[at]gmail.com
Registered linux user : ID 400171

11 komentar:

aris mengatakan...

Init3 = AT+CGDCONT=1,"IP","indosatm2"
Area Code =
Phone = *99#
Username =
Password =

username = --->> itu username yang kita dapet ya??
koq saya g bisa ya??

linux:/dev # wvdial
--> WvDial: Internet dialer version 1.54.0
--> Cannot open /dev/ttyUSB1: Cannot get information for serial port.
--> Cannot open /dev/ttyUSB1: Cannot get information for serial port.
--> Cannot open /dev/ttyUSB1: Cannot get information for serial port.
linux:/dev # vim /etc/wvdial.conf
linux:/dev # wvdial
--> WvDial: Internet dialer version 1.54.0
--> Cannot open /dev/ttyUSB2: Cannot get information for serial port.
--> Cannot open /dev/ttyUSB2: Cannot get information for serial port.
--> Cannot open /dev/ttyUSB2: Cannot get information for serial port.
linux:/dev # vim /etc/wvdial.conf
linux:/dev # wvdial
--> WvDial: Internet dialer version 1.54.0
--> Cannot open /dev/ttyUSB0: Cannot get information for serial port.
--> Cannot open /dev/ttyUSB0: Cannot get information for serial port.
--> Cannot open /dev/ttyUSB0: Cannot get information for serial port.

vidra mengatakan...

ak pk modem zte mf622 n centos 5.
ak dah input smua scypt y km ks but hasil-a

WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.

why....????

william mengatakan...

Makasih boss..saya bisa internetan pake Ubuntu sekarang..makasih2 :D

Rifai Halmahera mengatakan...

Saya juga menggunakan modem yang sama walaupun dengan provider lain. Tapi masalah awalnya sama. Modem gak bisa terdeteksi. Saya coba mengikuti petunjuk di atas, tapi begitu sampai di membuat file rules dan mau di simpan ke /etc/udev/rules.d/15-zte-mf622.rules, gak bisa.

Ada jawaban seperti ini :

Could not save the file /etc/udev/rules.d/15-zte-mf622.rules.
You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again.

Masalahnya dimana ya... ??
Apa yang harus saya lakukan..?
Saya menggunakan Ubuntu 8.10

Thanks utk jawabannya

Anonim mengatakan...

sy coba mengkonekkan dgn printah #wvdial, alhasil dpt ip n DNSnya, tapi pas ngecek pake #nslookup google.com muncul tulisan gni :

;connection time out ; no servers could be reached

trus nyobain juga ngeping ke DNS jawabannya sama….
help me? balesnya ke :
kitaniagung@yahoo.com
thanks before

nufi mengatakan...

trims mas atas infonya.
akhirnya aku da bisa internetan di fedora dengan modem sierra :-)
awalnya ttp brmasalah, tu modem tetep kedetek sbg usb_storage.
tapi sekarang da bisa.
o ya, untuk yg sdh bs dial ke im2 (da dpt ip address, dns, dsb), tp msh g bisa browsing, coba tambahkn dns im2 yg sdh dapet td, ke file /etc/resolv.conf.

ketikkan :
nameserver {dns addresnya berapa}
berhubung saya pake im2, isi file resolv.conf menjadi :
nameserver 202.155.0.10
nameserver 202.155.0.15

ok. trimah kasih atas bantuan mas dony

mumu muhajir mengatakan...

Saya baru saja install Ubuntu 9.04, tapi menemukan kesulitan dengan koneksi internet 3g:saya pake USB Modem ZTE MF622 dengan indosatm2 sebagai providernya.

Ubuntu bisa baca modem itu, tapi pas diklik, selalu disconnet...

Ada saran....?

henry mengatakan...

mas, bisa bantu saya untuk PHS 100 gak? Saya udah coba wvdial, tapi gakbisa. .
skrip nya
[Dialer Defaults]
Modem = /dev/ttyUSB3
Baud = 1843200
Modem Type = Analog Modem
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,"IP",""
Dial Command = ATDT
Phone = *99***1#
Username = ''
Password = ''
Stupid Mode = yes

yang harus diubah apanya ya mas?
Trimakasih sebelumnya..

henry mengatakan...

mas, bisa bantu saya untuk PHS 100 gak? Saya udah coba wvdial, tapi gakbisa. .
skrip nya
[Dialer Defaults]
Modem = /dev/ttyUSB3
Baud = 1843200
Modem Type = Analog Modem
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init4 = AT+CGDCONT=1,"IP",""
Dial Command = ATDT
Phone = *99***1#
Username = ''
Password = ''
Stupid Mode = yes

yang harus diubah apanya ya mas?
Trimakasih sebelumnya..

Anonim mengatakan...

The writer of dony-ramansyah.blogspot.com has written a superior article. I got your point and there is nothing to argue about. It is like the following universal truth that you can not disagree with: In a cartoon, EVERYTHING falls faster than an anvil I will be back.

meds mengatakan...

untuk saya memakai ubuntu 10.10 dan 12.04 modem bisa terdeteksi otomatis, tinggal setting koneksi dan password. jadi tidak perlu install usb modeswitch