amaliuk
28-03-2007, 04:45
Есть телефон Samsung E-900 с USB дата-кабелем PCB200BBE. Дистрибутив - Fedora Core 6. Ядро Linux fedora 2.6.20-1.2933.fc6 #1 SMP Sat Mar 10 19:15:16 EST 2007 i686 i686 i386 GNU/Linux. Версия pppd 2.4.4
После подключения телефона в /var/log/messages:
$ tail -f /var/log/messages
Mar 23 18:18:51 localhost kernel: usb 4-1: new full speed USB device using
uhci_hcd and address 2
Mar 23 18:18:51 localhost kernel: usb 4-1: configuration #1 chosen from 1 choice
Mar 23 18:18:51 localhost kernel: Initializing USB Mass Storage driver...
Mar 23 18:18:51 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage
devices
Mar 23 18:18:51 localhost kernel: usbcore: registered new interface driver
usb-storage
Mar 23 18:18:51 localhost kernel: USB Mass Storage support registered.
Mar 23 18:18:52 localhost kernel: cdc_acm 4-1:1.3: ttyACM0: USB ACM device
Mar 23 18:18:52 localhost kernel: usbcore: registered new interface driver cdc_acm
Mar 23 18:18:52 localhost kernel: drivers/usb/class/cdc-acm.c: v0.25:USB
Abstract Control Model driver for USB modems and ISDN adapters
Mar 23 18:18:52 localhost kernel: usbcore: registered new interface driver cdc_ether
Mar 23 18:18:52 localhost kernel: rndis_host 4-1:1.1: RNDIS init failed, -110
Mar 23 18:18:52 localhost kernel: rndis_host: probe of 4-1:1.1 failed with error
-110
Mar 23 18:18:52 localhost kernel: usbcore: registered new interface driver
rndis_host
Особенно настораживает строка Mar 23 18:18:52 localhost kernel: rndis_host 4-1:1.1: RNDIS init failed, -110.
Телефон на /dev/ttyACM0 нормально опрашивается через minicom. Пробую соединиться с помощью связки pppd + chat script:
root@localhost ppp]# pppd call etk
AT
OK
ATV1S0=0&D2&C1
OK
AT+CMEE=1
OK
ATS0=0
OK
AT&F
OK
AT+CGDCONT=1,"IP","internet.etk.ru"
OK
ATD*99***1#
CONNECT
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7d8d0026> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0xa0000> <auth pap>]
sent [LCP ConfAck id=0x1 <asyncmap 0xa0000> <auth pap>]
rcvd [LCP ConfRej id=0x1 <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x7d8d0026>]
rcvd [LCP ConfNak id=0x2 <asyncmap 0xa0000>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
В чем тут грабли?
Скрипты, с пощью которых соединяюсь:
#/etc/ppp/peers/etk
debug
modem
crtscts
/dev/ttyACM0 115200
connect 'chat -v -f /etc/ppp/gprs-etk'
#noauth
proxyarp
nodetach
noipdefault
defaultroute
#default-asyncmap
lock
novj
novjccomp
#noaccomp
#nopcomp
#0.0.0.0:0.0.0.0
nobsdcomp
nodeflate
ipcp-accept-remote
ipcp-accept-local
usepeerdns
#lcp-echo-interval 0
#lcp-echo-failure 0
user etk
mtu 576
mru 576
чат - скрипт:
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
'' \rAT
#TIMEOUT 12
OK ATH
OK ATE1
OK AT+CGDCONT=1,"IP","internet.etk.ru"
OK ATD*99***1#
CONNECT ''
фал с рар паролями
# Secrets for authentication using PAP
# client server secret IP addresses
etk * etk *
После подключения телефона в /var/log/messages:
$ tail -f /var/log/messages
Mar 23 18:18:51 localhost kernel: usb 4-1: new full speed USB device using
uhci_hcd and address 2
Mar 23 18:18:51 localhost kernel: usb 4-1: configuration #1 chosen from 1 choice
Mar 23 18:18:51 localhost kernel: Initializing USB Mass Storage driver...
Mar 23 18:18:51 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage
devices
Mar 23 18:18:51 localhost kernel: usbcore: registered new interface driver
usb-storage
Mar 23 18:18:51 localhost kernel: USB Mass Storage support registered.
Mar 23 18:18:52 localhost kernel: cdc_acm 4-1:1.3: ttyACM0: USB ACM device
Mar 23 18:18:52 localhost kernel: usbcore: registered new interface driver cdc_acm
Mar 23 18:18:52 localhost kernel: drivers/usb/class/cdc-acm.c: v0.25:USB
Abstract Control Model driver for USB modems and ISDN adapters
Mar 23 18:18:52 localhost kernel: usbcore: registered new interface driver cdc_ether
Mar 23 18:18:52 localhost kernel: rndis_host 4-1:1.1: RNDIS init failed, -110
Mar 23 18:18:52 localhost kernel: rndis_host: probe of 4-1:1.1 failed with error
-110
Mar 23 18:18:52 localhost kernel: usbcore: registered new interface driver
rndis_host
Особенно настораживает строка Mar 23 18:18:52 localhost kernel: rndis_host 4-1:1.1: RNDIS init failed, -110.
Телефон на /dev/ttyACM0 нормально опрашивается через minicom. Пробую соединиться с помощью связки pppd + chat script:
root@localhost ppp]# pppd call etk
AT
OK
ATV1S0=0&D2&C1
OK
AT+CMEE=1
OK
ATS0=0
OK
AT&F
OK
AT+CGDCONT=1,"IP","internet.etk.ru"
OK
ATD*99***1#
CONNECT
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7d8d0026> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0xa0000> <auth pap>]
sent [LCP ConfAck id=0x1 <asyncmap 0xa0000> <auth pap>]
rcvd [LCP ConfRej id=0x1 <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x7d8d0026>]
rcvd [LCP ConfNak id=0x2 <asyncmap 0xa0000>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
sent [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7d8d0026>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
В чем тут грабли?
Скрипты, с пощью которых соединяюсь:
#/etc/ppp/peers/etk
debug
modem
crtscts
/dev/ttyACM0 115200
connect 'chat -v -f /etc/ppp/gprs-etk'
#noauth
proxyarp
nodetach
noipdefault
defaultroute
#default-asyncmap
lock
novj
novjccomp
#noaccomp
#nopcomp
#0.0.0.0:0.0.0.0
nobsdcomp
nodeflate
ipcp-accept-remote
ipcp-accept-local
usepeerdns
#lcp-echo-interval 0
#lcp-echo-failure 0
user etk
mtu 576
mru 576
чат - скрипт:
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
'' \rAT
#TIMEOUT 12
OK ATH
OK ATE1
OK AT+CGDCONT=1,"IP","internet.etk.ru"
OK ATD*99***1#
CONNECT ''
фал с рар паролями
# Secrets for authentication using PAP
# client server secret IP addresses
etk * etk *