
Cred ca sunt cateva persoane interesate cum sa foloseasca telefonul de la Huawei pe linux pentru acces la internet.
In exemplul de mai jos am folosit Mandriva2009 iar usbserial ca modul.
In primul rand dezactivati conexiunile existente wired sau wireless, altfel nu va schimba ruta default si va trebui sa o faceti manual:
ip route replace default via 10.y.y.y - pe care il gasiti mai jos!
Conectati telefonul la PC si alegeti "No" cand apare mesajul "Phone will be offline when used as card reader. Continue?"
Verificati daca telefonul a fost depistat de sistem:
localhost (root)- ~ -> tail -f /var/log/messages
Sep 15 09:12:29 localhost kernel: usb 4-1: new full speed USB device using uhci_hcd and address 2
Sep 15 09:12:29 localhost kernel: usb 4-1: configuration #1 chosen from 1 choice
Sep 15 09:12:29 localhost kernel: usb 4-1: New USB device found, idVendor=12d1, idProduct=1008
Sep 15 09:12:29 localhost kernel: usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 15 09:12:29 localhost kernel: usb 4-1: Product: HUAWEI Mobile
Sep 15 09:12:29 localhost kernel: usb 4-1: Manufacturer: HUAWEI Technologies
^C
Notati idVendor si idProduct de mai sus, apoi:
localhost (root)- ~ -> modprobe usbserial vendor=0x12d1 product=0x1008
localhost (root)- ~ ->
Daca nu zice nimic inseamna ca e OK, verificati daca a fost creat /dev/ttyUSB0:
localhost (root)- ~ -> ls /dev/ | grep -i ttyu
ttyUSB0
ttyUSB1
localhost (root)- ~ ->
si surpriza, aveti in /dev ttyUSB0 si ttyUSB1.
Mai departe va trebui sa creati un profil in /etc/wvdial.conf :
localhost (root)- ~ -> cat /etc/wvdial.conf
; copy&paste pana la prompt
[Dialer huawei]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Phone = *99#
Idle Seconds = 0
Password = ppp
Stupid Mode = 1
Compuserve = 0
Modem = /dev/ttyUSB0
Auto DNS = 1
Dial Command = ATDT
Ask Password = 0
ISDN = 0
Username = ppp
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Modem Type = Analog Modem
; Phone =
ISDN = 0
; Username =
Init1 = ATZ
; Password =
Modem = /dev/ttyUSB0
Baud = 9600
localhost (root)- ~ ->
Iar acum va trebui sa facem un test:
localhost (root)- ~ -> wvdial huawei
--> 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
ATQ0 V1 E1 S0=0 &C1 &D2
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Tue Sep 15 09:48:46 2009
--> Pid of pppd: 12818
--> Using interface ppp0
--> pppd: Connect: ppp0 <--> /dev/ttyUSB0
--> pppd: Warning - secret file /etc/ppp/chap-secrets has world and/or group access
--> pppd: CHAP authentication succeeded
--> pppd: CHAP authentication succeeded
--> pppd: Could not determine remote IP address: defaulting to 10.y.y.y
--> local IP address 82.x.x.x
--> remote IP address 10.y.y.y
--> primary DNS address 193.231.236.10
--> secondary DNS address 193.231.236.30
OK, acum suntem conectati.
localhost (root)- ~ -> ip ad
1: lo:
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wmaster0:
link/ieee802.11 00:19:d2:85:54:60 brd ff:ff:ff:ff:ff:ff
3: wlan0:
link/ether 00:19:d2:85:54:60 brd ff:ff:ff:ff:ff:ff
4: eth0:
link/ether 00:16:d3:35:ef:eb brd ff:ff:ff:ff:ff:ff
12: ppp0:
link/ppp
inet 82.x.x.x peer 10.y.y.y/32 scope global ppp0
localhost (root)- ~ ->
localhost (root)- ~ -> ping google.ro
PING google.ro (209.85.229.104) 56(84) bytes of data.
64 bytes from ww-in-f104.google.com (209.85.229.104): icmp_seq=1 ttl=52 time=355 ms
64 bytes from ww-in-f104.google.com (209.85.229.104): icmp_seq=2 ttl=52 time=175 ms
64 bytes from ww-in-f104.google.com (209.85.229.104): icmp_seq=3 ttl=52 time=173 ms
64 bytes from ww-in-f104.google.com (209.85.229.104): icmp_seq=4 ttl=52 time=172 ms
64 bytes from ww-in-f104.google.com (209.85.229.104): icmp_seq=5 ttl=52 time=191 ms
^C
--- google.ro ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4434ms
rtt min/avg/max/mdev = 172.336/213.614/355.747/71.403 ms
localhost (root)- ~ ->
Acum puteti crea o scurtatura pe desktop:
-Click dreapta -> Create New -> Link to Application
-La Application -> Command: scrieti wvdial huawei
-Click pe Advanced Options, bifati "Run in terminal" si click pe "OK"
Done.
Niciun comentariu:
Trimiteți un comentariu