Belcel/CDMA + Linux + USB
Добавлено: 03 мар 2004, 00:18
Т.к. мыло я себе поломал, а в PM этого моговато - то вот результаты экспиримента, которго по сути и небыло - все завелось с полпинка, дольше всего - целых 6 минут пересобиралось ядро.
А теперь все вместе:
Сделал на основе скайлинковского конфига.
Вот собственно и все. Резюме: федорки ppp - в сад. Идти на www.samba.org/ppp/ и брать сырцы.
Код: Выделить всё
Mar 2 23:12:22 julia pppd[6461]: pppd 2.4.2 started by bogdan, uid 0
Mar 2 23:12:27 julia pppd[6461]: Serial connection established.
Mar 2 23:12:27 julia pppd[6461]: Using interface ppp0
Mar 2 23:12:27 julia pppd[6461]: Connect: ppp0 <--> /dev/ttyUSB0
Mar 2 23:12:33 julia pppd[6461]: PAP authentication succeeded
Mar 2 23:12:33 julia pppd[6461]: kernel does not support PPP filtering
Mar 2 23:12:34 julia pppd[6461]: local IP address 10.10.9.72
Mar 2 23:12:34 julia pppd[6461]: remote IP address 192.168.11.250
Mar 2 23:12:34 julia pppd[6461]: primary DNS address 193.232.248.2
Mar 2 23:12:34 julia pppd[6461]: secondary DNS address 193.232.248.45
julia:/home/bogdan# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.11.250 * 255.255.255.255 UH 0 0 0 ppp0
default 192.168.11.250 0.0.0.0 UG 0 0 0 ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.10.9.72 P-t-P:192.168.11.250 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:1554 errors:32 dropped:0 overruns:0 frame:0
TX packets:1604 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1875391 (1.7 MiB) TX bytes:131415 (128.3 KiB)
Код: Выделить всё
CDMA 2000 modem init: press <ctrl>-C to disconnect
Serial connection established.
using channel 5
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x20a0000> <magic 0x74865f3> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x1 <pcomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x20a0000> <magic 0x74865f3> <accomp>]
rcvd [LCP ConfRej id=0x2 <accomp>]
sent [LCP ConfReq id=0x3 <asyncmap 0x20a0000> <magic 0x74865f3>]
rcvd [LCP ConfAck id=0x3 <asyncmap 0x20a0000> <magic 0x74865f3>]
sent [LCP ConfReq id=0x3 <asyncmap 0x20a0000> <magic 0x74865f3>]
rcvd [LCP ConfAck id=0x3 <asyncmap 0x20a0000> <magic 0x74865f3>]
rcvd [LCP ConfReq id=0x2 <mru 1500> <asyncmap 0x0> <auth chap MD5> <magic 0x2068b23> <mrru 1500> <endpoint [null]>]
sent [LCP ConfRej id=0x2 <mrru 1500>]
rcvd [LCP ConfReq id=0x3 <mru 1500> <asyncmap 0x0> <auth chap MD5> <magic 0x2068b23>]
sent [LCP ConfNak id=0x3 <auth pap>]
rcvd [LCP ConfReq id=0x4 <mru 1500> <asyncmap 0x0> <auth pap> <magic 0x2068b23>]
sent [LCP ConfAck id=0x4 <mru 1500> <asyncmap 0x0> <auth pap> <magic 0x2068b23>]
sent [LCP EchoReq id=0x0 magic=0x74865f3]
sent [PAP AuthReq id=0x1 user="belcel" password=<hidden>]
rcvd [LCP EchoRep id=0x0 magic=0x2068b23]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
kernel does not support PPP filtering
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfReq id=0x5 <compress VJ 0f 00> <addr 192.168.11.250>]
sent [IPCP ConfRej id=0x5 <compress VJ 0f 00>]
rcvd [LCP ProtRej id=0x6 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
rcvd [IPCP ConfNak id=0x1 <addr 10.10.4.159> <ms-dns1 193.232.248.2> <ms-dns3 193.232.248.45>]
sent [IPCP ConfReq id=0x2 <addr 10.10.4.159> <ms-dns1 193.232.248.2> <ms-dns3 193.232.248.45>]
rcvd [IPCP ConfReq id=0x7 <addr 192.168.11.250>]
sent [IPCP ConfAck id=0x7 <addr 192.168.11.250>]
rcvd [IPCP ConfAck id=0x2 <addr 10.10.4.159> <ms-dns1 193.232.248.2> <ms-dns3 193.232.248.45>]
Cannot determine ethernet address for proxy ARP
local IP address 10.10.4.159
remote IP address 192.168.11.250
primary DNS address 193.232.248.2
secondary DNS address 193.232.248.45
Script /etc/ppp/ip-up started (pid 7803)
Script /etc/ppp/ip-up finished (pid 7803), status = 0x0
Код: Выделить всё
julia:/home/bogdan# cat /etc/ppp/peers/belcel
#user name
name belcel
#tty device (COM cable connected directly to COM1 port)
#/dev/ttyS0
#tty device (COM cable + USB to 9-pin Serial Converter)
/dev/ttyUSB0
# Serial port line speed (COM cable only)
#115200
# Serial port line speed (COM cable + USB to 9-pin Serial Converter)
230400
# Control character handling
asyncmap 20A0000
escape FF
#
# Generic options
#
defaultroute
debug
# Comment this line out to let pppd background itself.
nodetach
# Set MTU
mtu 1400
# Use hardware flow conrtrol
crtscts
# Let the phone figure out all the IP addresses
noipdefault
ipcp-accept-local
ipcp-accept-remote
# No ppp compression
novj
novjccomp
# For sanity, keep a lock on the serial line
lock
#get DNS from the provider
usepeerdns
noauth
#
# Chat scripts
#
connect "/usr/sbin/chat -f /etc/ppp/chatscripts/belcel-connect-chat"
disconnect "/usr/sbin/chat -f /etc/ppp/chatscripts/belcel-disconnect-chat"
julia:/home/bogdan# cat /etc/ppp/chatscripts/belcel-connect-chat
ABORT 'BUSY'
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT '\nRINGING\r\n\r\nRINGING\r'
SAY "CDMA 2000 modem init: press <ctrl>-C to disconnect"
TIMEOUT 5
'' 'AT'
OK 'ATZ'
OK 'at+crm=1;&C0'
OK 'ATS0=0'
OK 'ATD#777'
CONNECT ''
SAY "\n + connected"
julia:/home/bogdan# cat /etc/ppp/chatscripts/belcel-disconnect-chat
ABORT BUSY
ABORT ERROR
ABORT 'NO DIALTONE'
TIMEOUT 30
'' '+++\c'
SAY " + sending break"
'' 'ATH'
SAY "\n + dropping data connection"
julia:/home/bogdan# cat /etc/ppp/pap-secrets
belcel * cdma
cdma * belcel
julia:/home/bogdan# lsmod
Module Size Used by Not tainted
pl2303 10488 1