Rabu, 25 September 2013

KONEKSI MODEM CDMA

wah, baru sempet nulis2 lagi,moga aja bermanfaat buat temen2 Linux Probolinggo khususnya, yang laen juga boleh :D
pertama pasti siapkan rokok+kopi(kalo suka sih, gak suka boleh yg laen.. :D)
yang paling penting ada modem cdma+sim card, aktif ya.... :D
kali ini saya make modem ZTE paketan smart itu...
langsung saja :
Cek dulu system dengan :
dmesg | tail
hasilnya :
[ 40.336042] usb 4-1: new full speed USB device number 2 using uhci_hcd
[ 40.642457] usbcore: registered new interface driver uas
[ 40.647465] Initializing USB Mass Storage driver...
[ 40.651658] scsi4 : usb-storage 4-1:1.0
[ 40.652426] usbcore: registered new interface driver usb-storage
[ 40.652432] USB Mass Storage support registered.
[ 41.664170] scsi 4:0:0:0: CD-ROM EVDO ReV A 7.00 PQ: 0 ANSI: 2
[ 41.679149] sr1: scsi-1 drive
[ 41.679388] sr 4:0:0:0: Attached scsi CD-ROM sr1
[ 41.679521] sr 4:0:0:0: Attached scsi generic sg2 type 5
perhatikan, modem dikenali sebagai cd room dengan device sr1
Cek dengan lsusb, maka hasilnya :
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 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 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 19d2:ffdde ONDA Communication S.p.A.

perhatikan yang ditebali adalah milik modem
lakukan pencarian device removable, karena modem saat ini dikenali sebagai removable/cd rom
ls /dev/sr*
hasilnya :
/dev/sr1
lakukan eject dengan
sudo eject /dev/sr0
tunggu beberapa saat, kemudian cek dengan lsusb :
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 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 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 19d2:ffdd ONDA Communication S.p.A.
lakukan perubahan fungsi ke modem :
sudo modprobe usbserial vendor=0x19d2 product=0xffdd
sesuaikan vendor dan product id sesuai hasil lsusb
edit /etc/wvdial.conf, dalam hal ini menggunakan smart :
[Dialer Defaults]
Modem = /dev/ttyUSB2
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = Analog Modem
Command Line = ATDT
Phone = #777
ISDN = 0
Username = smart
Password = smart
Baud = 9600
cek status modem yang terkoneksi dengan :
sudo wvdialconf
hasil :
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
Modem Port Scan<*1>: S1 S2 S3 S4 S5 S6 S7 S8
Modem Port Scan<*1>: S9 S10 S11 S12 S13 S14 S15 S16
Modem Port Scan<*1>: S17 S18 S19 S20 S21 S22 S23 S24
Modem Port Scan<*1>: S25 S26 S27 S28 S29 S30 S31
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud
ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyUSB2<*1>: ATQ0 V1 E1 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB2<*1>: Modem Identifier: ATI -- Manufacturer: +GMI: China TeleCom
ttyUSB2<*1>: Speed 9600: AT -- OK
ttyUSB2<*1>: Max speed is 9600; that should be safe.
ttyUSB2<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.
ttyUSB2: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
hasil di atas akan mengedit file wvdial.conf
laskukan dial dgn
sudo wvdial,tunggu sampai dns dan ip dr operator muncul,browsing deh
--> WvDial: Internet dialer version 1.61
--> 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. Starting PPP immediately.
--> Starting pppd at Wed Feb 22 17:44:10 2012
--> Pid of pppd: 1974
--> Using interface ppp0
--> pppd: px� @��
--> pppd: px� @��
--> pppd: px� @��
--> pppd: px� @��
--> local IP address 10.255.242.145
--> pppd: px� @��
--> remote IP address 10.20.31.25
--> pppd: px� @��
--> primary DNS address 10.17.3.252
--> pppd: px� @��
--> secondary DNS address 10.17.3.246
--> pppd: px� @��

moga bermanfaat, kalo kurang jelas, maklum bukan jurnalis.... :D

Tidak ada komentar:

Posting Komentar