PRIPOJENI na internet pres gprs/EDGE pres USB Mobilni telefon

PRIPOJENI na internet pres
gprs/EDGE pres USB Mobilni telefon


postup:
1/pripojime mobil kabelem k PC pres USB
#lsusb
[root@localhost service]# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0421:04c9 Nokia Mobile Phones ////zde je videt ze se mobilni telefoni nasel///////
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 1199:6832 Sierra Wireless, Inc. MC8780 Device
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0c24:000f Taiyo Yuden Bluetooth Driver (V2.0+EDR)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

2/
#sbin/modprobe usbserial vendor=0x421 product=0x4c9

3/
#wvdialconf create //////probehne vytvoreni configuracniho souboru v etc/wvdial.conf a vypise toto
[root@localhost etc]# wvdialconf create
Editing `create’.

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
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 – OK
ttyACM0<*1>: ATQ0 V1 E1 Z – OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 – OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 – OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 – OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 – OK
ttyACM0<*1>: Modem Identifier: ATI – Nokia
ttyACM0<*1>: Speed 4800: AT – OK
ttyACM0<*1>: Speed 9600: AT – OK
ttyACM0<*1>: Speed 19200: AT – OK
ttyACM0<*1>: Speed 38400: AT – OK
ttyACM0<*1>: Speed 57600: AT – OK
ttyACM0<*1>: Speed 115200: AT – OK
ttyACM0<*1>: Speed 230400: AT – OK
ttyACM0<*1>: Speed 460800: AT – OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 – OK
WvModem<*1>: Cannot get information for serial port.
ttyUSB0<*1>: ATQ0 V1 E1 – OK
ttyUSB0<*1>: ATQ0 V1 E1 Z – OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 – OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 – OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 – OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 – OK
ttyUSB0<*1>: Modem Identifier: ATI – MC8780
ttyUSB0<*1>: Speed 9600: AT – OK
ttyUSB0<*1>: Max speed is 9600; that should be safe.
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 – OK
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: Sierra Wireless, Inc.
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 an USB modem on /dev/ttyACM0.
Modem configuration written to create.
ttyACM0: Speed 460800; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0”
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”

4/EDITUJEME v etc/wvdial.conf

[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = AT+CGDCONT=1,“IP”,“internet.t-mobile.cz” ///pro O2 je AT+CGDCONT,“internet”
Modem Type = USB Modem
Phone = 99**1# ///pro O2 je *99//
Username = username
Password = password
Stupid Mode =1

5/#wvdial /a zacne probihat pripojen
[root@localhost etc]# wvdial
–> WvDial: Internet dialer version 1.60
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> Sending: AT+CGDCONT=1,“IP”,“internet.t-mobile.cz”
AT+CGDCONT=1,“IP”,“internet.t-mobile.cz”
OK
–> Modem initialized.
–> Sending: ATDT99*1#
–> Waiting for carrier.
ATDT
99**1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%}"}&} }
} } g}%~
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Tue Jul 7 16:02:02 2009
–> Pid of pppd: 3685
–> Using interface ppp0
–> pppd: ��[19][08]@�[19][08]
–> pppd: ��[19][08]@�[19][08]
–> pppd: ��[19][08]@�[19][08]
–> local IP address 10.169.54.226
–> pppd: ��[19][08]@�[19][08]
–> remote IP address 10.6.6.6
–> pppd: ��[19][08]@�[19][08]
–> primary DNS address 62.141.0.2
–> pppd: ��[19][08]@�[19][08]
–> secondary DNS address 88.86.110.18
–> pppd: ��[19][08]@�[19][08]

6/
jeste je potreba zadat adresy DNS serveru do etc/resolv.conf

vi etc/resolv.conf

//////////////////////////////////////////////////////////////////////////////

No nameservers found; try putting DNS servers into your

ifcfg files in /etc/sysconfig/network-scripts like so:

DNS1=xxx.xxx.xxx.xxx

DNS2=xxx.xxx.xxx.xxx

DOMAIN=lab.foo.com bar.foo.com

nameserver 62.141.0.2
nameserver 88.86.110.18
/////////////////////////////////////////////////////////////////////////////
jiz internet funguje
7/komunikace se ukonci
ctrl-C
^CCaught signal 2: Attempting to exit gracefully…
–> Terminating on signal 15
–> pppd: ��[19][08]@�[19][08]
–> Connect time 51.3 minutes.
–> pppd: ��[19][08]@�[19][08]
–> pppd: ��[19][08]@�[19][08]
–> pppd: ��[19][08]@�[19][08]
–> Disconnecting at Tue Jul 7 16:53:22 2009

Podarilo se mi to rozchodit a velmi pekne to funguje zajiamaly by me vase zkusenosti

Dovolil jsem si presunout mezi uzivatelske navody.