GPRS
Материал из Xgu.ru
Содержание |
[править] Sony Ericsson
/etc/ppp/utel
"" ATZ OK AT+CGDCONT=1,"IP","3g.utel.ua" OK ATDT*99# CONNECT ""
/etc/ppp/options
asyncmap 0 auth crtscts lock hide-password modem proxyarp lcp-echo-interval 30 lcp-echo-failure 4 noipx /dev/ttyACM0 connect 'chat -f /etc/ppp/utel' user user noauth usepeerdns defaultroute idle 100 demand
/etc/ppp/pap-options
user * user *
%# pppd nodetach debug Connect: ppp0 <--> /dev/ttyACM0 rcvd [LCP ConfReq id=0x1 <auth pap> <accomp> <pcomp> <asyncmap 0x0> <magic 0x35441637>] sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4bdf4c7> <pcomp> <accomp>] sent [LCP ConfAck id=0x1 <auth pap> <accomp> <pcomp> <asyncmap 0x0> <magic 0x35441637>] rcvd [LCP ConfReq id=0x2 <auth pap> <accomp> <pcomp> <asyncmap 0x0> <magic 0x35441637>] sent [LCP ConfAck id=0x2 <auth pap> <accomp> <pcomp> <asyncmap 0x0> <magic 0x35441637>] rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4bdf4c7> <pcomp> <accomp>] sent [LCP EchoReq id=0x0 magic=0x4bdf4c7] sent [PAP AuthReq id=0x1 user="user" password=<hidden>] rcvd [LCP EchoRep id=0x0 magic=0x35441637] rcvd [PAP AuthAck id=0x1 "Congratulations!"] Remote message: Congratulations! PAP authentication succeeded sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>] sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>] rcvd [LCP ProtRej id=0x1 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f] Protocol-Reject for 'Compression Control Protocol' (0x80fd) received rcvd [IPCP ConfReq id=0x1] sent [IPCP ConfNak id=0x1 <addr 10.112.112.112>] rcvd [IPCP ConfNak id=0x1 <addr 10.193.150.252> <ms-dns1 195.5.46.12> <ms-dns3 195.5.46.10>] sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 10.193.150.252> <ms-dns1 195.5.46.12> <ms-dns3 195.5.46.10>] rcvd [IPCP ConfReq id=0x2] sent [IPCP ConfAck id=0x2] rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 10.193.150.252> <ms-dns1 195.5.46.12> <ms-dns3 195.5.46.10>] Local IP address changed to 10.193.150.252 Cannot determine ethernet address for proxy ARP sent [IP data] 45 00 00 54 00 00 40 00 ... Script /etc/ppp/ip-up started (pid 32056) Script /etc/ppp/ip-up finished (pid 32056), status = 0x0
# ping xgu.ru PING xgu.ru (194.150.93.78) 56(84) bytes of data. 64 bytes from chub.in (194.150.93.78): icmp_seq=1 ttl=50 time=2260 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=2 ttl=50 time=1269 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=3 ttl=50 time=369 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=4 ttl=50 time=330 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=5 ttl=50 time=277 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=6 ttl=50 time=351 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=7 ttl=50 time=352 ms 64 bytes from chub.in (194.150.93.78): icmp_seq=8 ttl=50 time=271 ms --- xgu.ru ping statistics --- 8 packets transmitted, 8 received, 0% packet loss, time 7008ms rtt min/avg/max/mdev = 271.430/685.328/2260.536/671.563 ms, pipe 3
</pre>
[править] Nokia
Имеется:
- телефон Nokia 6233
- пакет "Супер JEANS"
- Debian 4.0r4 (Etch)
- в качестве руководства используем эту или эту статью.
Требуется:
- настроить доступ к Интернет с помощью GPRS, услуга "Гипер.NET"
Инструкция:
1. Присоединяем с помощью USB-шнура телефон к компьютеру
2. В телефоне на запрос "Присоединён кабель USB. Выберите режим" выбираем "Стандартный"
3. Проверяем поддержку телефона/USB-кабеля ядром Linux.
- Вариант №1: команда sudo dmesg:
hub 5-0:1.0: unable to enumerate USB device on port 3 usb 2-1: new full speed USB device using uhci_hcd and address 2 usb 2-1: configuration #1 chosen from 1 choice usb 2-1: New USB device found, idVendor=0421, idProduct=0491 usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-1: Product: Nokia 6233 usb 2-1: Manufacturer: Nokia drivers/usb/class/cdc-acm.c: Ignoring extra header, type -3, length 4 cdc_acm 2-1:1.1: ttyACM0: USB ACM device usbcore: registered new interface driver cdc_acm drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters usbcore: registered new interface driver cdc_ether usb 2-1: bad CDC descriptors usbcore: registered new interface driver rndis_host usb 2-1: bad CDC descriptors usbcore: registered new interface driver rndis_wlan
- Вариант №2: команда sudo tail /var/log/kern.log:
Aug 2 16:04:27 home kernel: [ 388.619665] drivers/usb/class/cdc-acm.c: Ignoring extra header, type -3, length 4 Aug 2 16:04:27 home kernel: [ 388.619665] cdc_acm 2-1:1.1: ttyACM0: USB ACM device Aug 2 16:04:27 home kernel: [ 388.620382] usb 2-1: bad CDC descriptors Aug 2 16:04:27 home kernel: [ 388.620406] usb 2-1: bad CDC descriptors Aug 2 16:04:27 home kernel: [ 388.620766] usb 2-1: New USB device found, idVendor=0421, idProduct=0491 Aug 2 16:04:27 home kernel: [ 388.620777] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Aug 2 16:04:27 home kernel: [ 388.620781] usb 2-1: Product: Nokia 6233 Aug 2 16:04:27 home kernel: [ 388.620788] usb 2-1: Manufacturer: Nokia Aug 2 16:12:43 home kernel: [ 874.854117] PPP generic driver version 2.4.2 Aug 2 16:12:46 home kernel: [ 877.644443] PPP Deflate Compression module registered
В принципе нас должна интересовать информация выделанная жирным (успешное подключение нового модема /dev/ttyACM0). Если что-то не так, читаем тут.
4. Устанавливаем пакет wvdial:
apt-get install wvdial
5. Настройка подключения
sudo wvdialconf
В ответ получим нечто похожее на:
Editing `/etc/wvdial.conf'. Scanning your serial ports for a modem. Modem Port Scan<*1>: S0 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 Found an USB modem on /dev/ttyACM0. Modem configuration written to /etc/wvdial.conf. ttyACM0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
Из последних строчек догадываемся, что конфигурационным файлом является /etc/wvdial.conf
6. Последний штрих -- набираем sudo vi /etc/wvdial.conf и приводим файл в соответствие с ниже приведенным (жирным выделено то, что надо изменить по требованиям настройки Гипер.NET):
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Init3 = AT+CGDCONT=1,"IP","hyper.net" Username = " " Password = " " Phone = *99# Stupid Mode = 1 New PPPD = yes Modem Type = USB Modem Baud = 460800 Modem = /dev/ttyACM0 ISDN = 0
Более подробно о настройках wvdial можно почитать в wikipedia ну и далее по ссылкам.
7. Для выхода в интернет не забываем активировать (sms-кой или звонком) услугу "Гипер.NET" и набираем:
sudo wvdial
Если видим:
... --> local IP address 77.52.82.252 --> pppd: ��I�08]0I�08] --> remote IP address 10.6.6.6
значит все Ок!