Tuesday, December 30, 2008

cdc acm(FOMA対応) on Linux

cdc acm(FOMA対応)を試してみました。 Linux 2.6.28でもcdc-acm自体はv0.26のままなのでcdc-acm-v026.zipがそのまま使えました。すばらし。 ちなみに端末は N906i です。
これで実家かえっても なんとかIP reachableにできそう。

以下、こんなかんじという記録
usb 4-1: new full speed USB device using uhci_hcd and address 7
usb 4-1: configuration #1 chosen from 1 choice
usb 4-1: New USB device found, idVendor=0409, idProduct=0234
usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1: Product: FOMA N906i
usb 4-1: Manufacturer: NEC
usb 4-1: SerialNumber: nnnnnnnnnnnn
cdc_acm 4-1:1.0: CDC Header  1.10
cdc_acm 4-1:1.0: ttyACM0: USB ACM device
this device is FOMA Mobile Phone
cdc_acm 4-1:1.2: CDC Header  1.10
cdc_acm 4-1:1.4: CDC Header  1.10
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
pppconfigで適当に設定するとこんなかんじ
pppd 2.4.4 started by root, uid 0
abort on (BUSY)
abort on (NO CARRIER)
abort on (VOICE)
abort on (NO DIALTONE)
abort on (NO DIAL TONE)
abort on (NO ANSWER)
abort on (DELAYED)
send (ATZ^M)
expect (OK)
ATZ^M^M
OK
 -- got it
send (ATDT0570-00-1616^M)
expect (CONNECT)
^M
ATDT0570-00-1616^M^M
CONNECT
 -- got it
send (\d)
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyACM0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9c9d1e90> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <mru 1524> <auth chap MD5> <endpoint [MAC:00:c0:7b:8c:bb:a1]>]
sent [LCP ConfNak id=0x1 <auth pap>]
rcvd [LCP ConfRej id=0x1 <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0x9c9d1e90>]
rcvd [LCP ConfReq id=0x2 <mru 1524> <auth pap> <endpoint [MAC:00:c0:7b:8c:bb:a1]>]
sent [LCP ConfAck id=0x2 <mru 1524> <auth pap> <endpoint [MAC:00:c0:7b:8c:bb:a1]>]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0x9c9d1e90>]
sent [LCP EchoReq id=0x0 magic=0x9c9d1e90]
sent [PAP AuthReq id=0x1 user="xxxx" password=<hidden>]
rcvd [LCP EchoRep id=0x0 magic=0x0]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
PPP BSD Compression module registered
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 [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 210.132.186.1>]
sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 210.132.186.1>]
PPP Deflate Compression module registered
rcvd [LCP ProtRej id=0x3 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 ConfNak id=0x1 <addr 210.132.186.12> <ms-dns1 202.238.95.24> <ms-dns3 202.238.95.26>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 210.132.186.12> <ms-dns1 202.238.95.24> <ms-dns3 202.238.95.26>]
rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 210.132.186.12> <ms-dns1 202.238.95.24> <ms-dns3 202.238.95.26>]
local  IP address 210.132.186.12
remote IP address 210.132.186.1
primary   DNS address 202.238.95.24
secondary DNS address 202.238.95.26
Script /etc/ppp/ip-up started (pid 5903)
Script /etc/ppp/ip-up finished (pid 5903), status = 0x0

追記 (2009/01/01 22:59): なんか openする時に Input/output error (EIO)になることがおおいな。さしなおして何度もやりなおしているとうまくいくことがあるが…

No comments:

Post a Comment