Cek DMSG | TAIL di terminal apakah terdeteksi sebagai cd-room
~$ dmesg | tail
[ 867.176562] generic ttyUSB1: generic converter now disconnected from ttyUSB1
[ 867.176585] usbserial_generic 5-2:1.1: device disconnected
[ 867.176762] generic ttyUSB2: generic converter now disconnected from ttyUSB2
[ 867.176785] usbserial_generic 5-2:1.2: device disconnected
[ 877.340071] usb 5-2: new full speed USB device using uhci_hcd and address 6
[ 877.514300] scsi8 : usb-storage 5-2:1.0
[ 878.516154] scsi 8:0:0:0: CD-ROM EVDO ReV A 7.00 PQ: 0 ANSI: 2
[ 878.530105] sr1: scsi-1 drive
[ 878.530413] sr 8:0:0:0: Attached scsi CD-ROM sr1
[ 878.533687] sr 8:0:0:0: Attached scsi generic sg2 type 5
Jika terlihat belum coba eject Modem di DEV/SR1 jika hanya tersedia Dev/sr0 maka cabut modem dan tancapkan lagi setelah itu eject /dev/sr1 .
~$ sudo eject /dev/sr1
lihat lagi statusnya melalui dmesg
~$ dmesg | tail
[ 943.926200] usbserial_generic 5-2:1.0: generic converter detected
[ 943.926378] usb 5-2: generic converter now attached to ttyUSB0
[ 943.928384] usbserial_generic 5-2:1.1: generic converter detected
[ 943.928562] usb 5-2: generic converter now attached to ttyUSB1
[ 943.930198] usbserial_generic 5-2:1.2: generic converter detected
[ 943.930378] usb 5-2: generic converter now attached to ttyUSB2
[ 943.932556] scsi9 : usb-storage 5-2:1.3
[ 944.936159] scsi 9:0:0:0: Direct-Access EVDO ReV A 7.00 PQ: 0 ANSI: 0 CCS
[ 944.937672] sd 9:0:0:0: Attached scsi generic sg2 type 0
[ 944.948148] sd 9:0:0:0: [sdb] Attached SCSI removable disk
Setelah terdeteksi sebagai Direct-Access Berulah masuk ke List port usb :~$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 15d9:0a4c Trust International B.V.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 009: ID 19d2:ffdd ONDA Communication S.p.A.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B Wireless Adapter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 04f2:b120 Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
diketahui status modem
Bus 005 Device 009: ID 19d2:ffdd ONDA Communication S.p.A.
lanjut ke pengaturan
masuk ke
~$ sudo gedit /etc/usb_modeswitch.conf
tambahkan kode ini di baris paling akhir
########################################################
# /etc/usb_modeswitch.conf
#
# Smart ZTE AC682 (EVDO)
#
DefaultVendor = 0x19d2
DefaultProduct = 0xffde
TargetVendor = 0x19d2
TargetProduct = 0xffdd
MessageContent= 5553424312345678c00000008000069f030000000000000000000000000000
masuk lagi ke
~$ sudo /etc/udev/rules.d/99-zte-ac682.rules
isi dengan
########################################################
# /etc/udev/rules.d/99-zte-ac682.rules
#
# Smart ZTE AC682 (EVDO)
#
SUBSYSTEM=="usb", SYSFS{idVendor}=="19d2",
SYSFS{idProduct}=="ffdd", RUN+="/usr/sbin/usb_modeswitch –
sekarang load modprobe usbserial vendor dan productnya
~$ sudo modprobe usbserial vendor=0×19d2 product=0xffdd
Cek Wvdia Config
~$ sudo wvdialconf
Kemudian akan muncul tulisan message seperti dibawah:
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
Modem Port Scan: S0 S1 S2 S3 S4 S5 S6 S7
Modem Port Scan: S8 S9 S10 S11 S12 S13 S14 S15
Modem Port Scan: S16 S17 S18 S19 S20 S21 S22 S23
Modem Port Scan: S24 S25 S26 S27 S28 S29 S30 S31
WvModem: Cannot get information for serial port.
ttyUSB0: ATQ0 V1 E1 -- OK
ttyUSB0: ATQ0 V1 E1 Z -- OK
ttyUSB0: ATQ0 V1 E1 S0=0 -- OK
ttyUSB0: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB0: Modem Identifier: ATI -- Manufacturer: +GMI: China TeleCom
ttyUSB0: Speed 9600: AT -- OK
ttyUSB0: Max speed is 9600; that should be safe.
ttyUSB0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
WvModem: Cannot get information for serial port.
ttyUSB1: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB1: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB1: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem: Cannot get information for serial port.
ttyUSB2: ATQ0 V1 E1 -- OK
ttyUSB2: ATQ0 V1 E1 Z -- OK
ttyUSB2: ATQ0 V1 E1 S0=0 -- OK
ttyUSB2: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB2: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB2: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB2: Modem Identifier: ATI -- Manufacturer: +GMI: China TeleCom
ttyUSB2: Speed 9600: AT -- OK
ttyUSB2: Max speed is 9600; that should be safe.
ttyUSB2: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.
ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
ttyUSB2: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
modem terdeteksi di /dev/ttyUSB0
lanjut ke pengaturan wvdial
masuk ke
~$ sudo gedit /etc/wvdial.conf
tambahkan baris berikut
[Dialer smart]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
Command Line = ATDT
ISDN = 0
New PPPD = yes
Phone = #777
Modem = /dev/ttyUSB0
Username = smart
Password = smart
Baud = 460800
langkah terakhir coba koneksi dengan cara
~$sudo wvdial smart
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT 3100000
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!}!} }3}"}&} } } } }#}%B#}%}'}"}(}"W}0~
--> PPP negotiation detected.
--> Starting pppd at Fri Jul 15 06:54:49 2011
--> Pid of pppd: 5113
--> Using interface ppp0
--> local IP address 10.249.99.173
--> remote IP address 10.20.31.6
--> primary DNS address 10.17.3.252
--> secondary DNS address 10.17.3.244
kalau sudah mendapat ip addrees seperti itu harusnya sudah bisa browsing internet hehe
nah sekarang masalahnya, setiap mau konek kita harus eject cd rom, load ke kernel dll, biar ringkas sekalian aja dibikin bash scriptnya hehe
buat file baru, dinamai terserah asal ekstensi terakhir sh klo punya ane smart.sh biar gampang ingatnya.
isi dengan kode berikut
#!/bin/bash
sudo eject /dev/sr1
sleep 2
sudo modprobe usbserial vendor=0x19d2 product=0xffdd
sleep 2
sudo wvdial smart
parameter sleep diatas berfungsi untuk menunggu proses selama 2 detik. Karena kadang2 setiap proses butuh waktu hehe
yuk, lanjut chmod dulu biar bisa dijalankan
~$ sudo chmod +x smart.sh
untuk menjalankan tinggal ketik
~$ ./smart.sh sumber: ( sukabiru.wordpress.com )
0 komentar:
Posting Komentar