イーモバイルのD01NEを購入しました。会社も自宅も都心から離れているため、サービスエリアの端っこの方ですが、都心の客先に出向くことも多いため、思い切って購入しました。と言っても、PCカードタイプのモデムのみのやつなんですけどね。早速Debian Linuxで使ってみました。

関連モジュール 

cdc_acm                16032  0
ohci_hcd               36228  0
pcmcia                 42776  0
firmware_class         10752  1 pcmcia
yenta_socket           28044  1
rsrc_nonstatic         13312  1 yenta_socket
ehci_hcd               48780  0
uhci_hcd               35472  0
pcmcia_core            43544  3 pcmcia,yenta_socket,rsrc_nonstatic
usbcore               149256  6 cdc_acm,ndiswrapper,ohci_hcd,ehci_hcd,uhci_hcd


カードを差し込むと、次のようなメッセージがカーネルログに出力される。

x60:~# tail -f /var/log/kern.log
May  1 03:24:16 x60 kernel: pccard: CardBus card inserted into slot 0
May  1 03:24:16 x60 kernel: PM: Adding info for pci:0000:16:00.0
May  1 03:24:16 x60 kernel: PCI: Enabling device 0000:16:00.0 (0000 -> 0002)
May  1 03:24:16 x60 kernel: ACPI: PCI Interrupt 0000:16:00.0[A] -> GSI 16 (level, low) -> IRQ 20
May  1 03:24:16 x60 kernel: PCI: Setting latency timer of device 0000:16:00.0 to 64
May  1 03:24:16 x60 kernel: ohci_hcd 0000:16:00.0: OHCI Host Controller
May  1 03:24:16 x60 kernel: drivers/usb/core/inode.c: creating file '006'
May  1 03:24:16 x60 kernel: ohci_hcd 0000:16:00.0: new USB bus registered, assigned bus number 6
May  1 03:24:16 x60 kernel: ohci_hcd 0000:16:00.0: created debug files
May  1 03:24:16 x60 kernel: ohci_hcd 0000:16:00.0: irq 20, io mem 0x50000000
May  1 03:24:16 x60 kernel: ohci_hcd 0000:16:00.0: resetting from state 'reset', control = 0x0
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: OHCI controller state
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: OHCI 1.0, NO legacy support registers
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: control 0x083 HCFS=operational CBSR=3
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: cmdstatus 0x00000 SOC=0
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: intrstatus 0x00000004 SF
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: intrenable 0x8000005a MIE RHSC UE RD WDH
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: hcca frame #01ff
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: roothub.a ff000201 POTPGT=255 NPS NDP=1(1)
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: roothub.b 00000000 PPCM=0000 DR=0000
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: roothub.status 00008000 DRWE
May  1 03:24:17 x60 kernel: ohci_hcd 0000:16:00.0: roothub.portstatus [0] 0x00000100 PPS
May  1 03:24:17 x60 kernel: usb usb6: default language 0x0409
May  1 03:24:17 x60 kernel: usb usb6: new device strings: Mfr=3, Product=2, SerialNumber=1
May  1 03:24:17 x60 kernel: usb usb6: Product: OHCI Host Controller
May  1 03:24:17 x60 kernel: usb usb6: Manufacturer: Linux 2.6.21-c02 ohci_hcd
May  1 03:24:17 x60 kernel: usb usb6: SerialNumber: 0000:16:00.0
May  1 03:24:17 x60 kernel: PM: Adding info for usb:usb6
May  1 03:24:17 x60 kernel: usb usb6: uevent
May  1 03:24:17 x60 kernel: usb usb6: usb_probe_device
May  1 03:24:17 x60 kernel: PM: Adding info for No Bus:usbdev6.1_ep00
May  1 03:24:17 x60 kernel: usb usb6: configuration #1 chosen from 1 choice
May  1 03:24:17 x60 kernel: usb usb6: adding 6-0:1.0 (config #1, interface 0)
May  1 03:24:17 x60 kernel: PM: Adding info for usb:6-0:1.0
May  1 03:24:17 x60 kernel: usb 6-0:1.0: uevent
May  1 03:24:17 x60 kernel: hub 6-0:1.0: usb_probe_interface
May  1 03:24:17 x60 kernel: hub 6-0:1.0: usb_probe_interface - got id
May  1 03:24:17 x60 kernel: hub 6-0:1.0: USB hub found
May  1 03:24:17 x60 kernel: hub 6-0:1.0: 1 port detected
May  1 03:24:17 x60 kernel: hub 6-0:1.0: standalone hub
May  1 03:24:17 x60 kernel: hub 6-0:1.0: no power switching (usb 1.0)
May  1 03:24:17 x60 kernel: hub 6-0:1.0: global over-current protection
May  1 03:24:17 x60 kernel: hub 6-0:1.0: power on to power good time: 510ms
May  1 03:24:17 x60 kernel: hub 6-0:1.0: local power source is good
May  1 03:24:17 x60 kernel: hub 6-0:1.0: no over-current condition exists
May  1 03:24:17 x60 kernel: hub 6-0:1.0: trying to enable port power on non-switchable hub
May  1 03:24:17 x60 kernel: hub 6-0:1.0: state 7 ports 1 chg 0000 evt 0000
May  1 03:24:17 x60 kernel: PM: Adding info for No Bus:usbdev6.1_ep81
May  1 03:24:17 x60 kernel: PM: Adding info for No Bus:usbdev6.1
May  1 03:24:17 x60 kernel: drivers/usb/core/inode.c: creating file '001'
May  1 03:24:18 x60 kernel: ohci_hcd 0000:16:00.0: auto-stop root hub
May  1 03:24:19 x60 kernel: ohci_hcd 0000:16:00.0: auto-wakeup root hub
May  1 03:24:19 x60 kernel: hub 6-0:1.0: state 7 ports 1 chg 0000 evt 0002
May  1 03:24:19 x60 kernel: ohci_hcd 0000:16:00.0: GetStatus roothub.portstatus [0] = 0x00010101 CSC PPS CCS
May  1 03:24:19 x60 kernel: hub 6-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
May  1 03:24:19 x60 kernel: hub 6-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
May  1 03:24:20 x60 kernel: ohci_hcd 0000:16:00.0: GetStatus roothub.portstatus [0] = 0x00100103 PRSC PPS PES CCSMay  1 03:24:20 x60 kernel: usb 6-1: new full speed USB device using ohci_hcd and address 2
May  1 03:24:20 x60 kernel: ohci_hcd 0000:16:00.0: GetStatus roothub.portstatus [0] = 0x00100103 PRSC PPS PES CCSMay  1 03:24:20 x60 kernel: usb 6-1: skipped 4 descriptors after interface
May  1 03:24:20 x60 kernel: usb 6-1: default language 0x0409
May  1 03:24:20 x60 kernel: usb 6-1: new device strings: Mfr=1, Product=2, SerialNumber=3
May  1 03:24:20 x60 kernel: usb 6-1: Product: D01NE
May  1 03:24:20 x60 kernel: usb 6-1: Manufacturer: NEC Infrontia
May  1 03:24:20 x60 kernel: usb 6-1: SerialNumber: 352895010075924
May  1 03:24:20 x60 kernel: PM: Adding info for usb:6-1
May  1 03:24:20 x60 kernel: usb 6-1: uevent
May  1 03:24:20 x60 kernel: usb 6-1: usb_probe_device
May  1 03:24:20 x60 kernel: PM: Adding info for No Bus:usbdev6.2_ep00
May  1 03:24:20 x60 kernel: usb 6-1: configuration #1 chosen from 1 choice
May  1 03:24:20 x60 kernel: usb 6-1: adding 6-1:1.0 (config #1, interface 0)
May  1 03:24:20 x60 kernel: PM: Adding info for usb:6-1:1.0
May  1 03:24:20 x60 kernel: usb 6-1:1.0: uevent
May  1 03:24:20 x60 kernel: ndiswrapper 6-1:1.0: usb_probe_interface
May  1 03:24:20 x60 kernel: ndiswrapper 6-1:1.0: usb_probe_interface - got id
May  1 03:24:20 x60 kernel: cdc_acm 6-1:1.0: usb_probe_interface
May  1 03:24:20 x60 kernel: cdc_acm 6-1:1.0: usb_probe_interface - got id
May  1 03:24:20 x60 kernel: cdc_acm 6-1:1.0: ttyACM0: USB ACM device
May  1 03:24:20 x60 kernel: PM: Adding info for No Bus:ttyACM0
May  1 03:24:20 x60 kernel: PM: Adding info for No Bus:usbdev6.2_ep81
May  1 03:24:20 x60 kernel: usb 6-1: adding 6-1:1.1 (config #1, interface 1)
May  1 03:24:20 x60 kernel: PM: Adding info for usb:6-1:1.1
May  1 03:24:20 x60 kernel: usb 6-1:1.1: uevent
May  1 03:24:20 x60 kernel: PM: Adding info for No Bus:usbdev6.2_ep82
May  1 03:24:20 x60 kernel: PM: Adding info for No Bus:usbdev6.2_ep02
May  1 03:24:20 x60 kernel: PM: Adding info for No Bus:usbdev6.2
May  1 03:24:20 x60 kernel: drivers/usb/core/inode.c: creating file '002'
May  1 03:24:20 x60 kernel: hub 6-0:1.0: state 7 ports 1 chg 0000 evt 0002

また、デバイスファイル /dev/ttyACM0が作成される

ktaka@x60:~$ ls -la /dev/ttyACM*
ls: /dev/ttyACM*: そのようなファイルやディレクトリはありません
ktaka@x60:~$ ls -la /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 2007-05-01 03:24 /dev/ttyACM0

 

pppdの設定ファイルを作成

x60:~# more /etc/ppp/peers/emobile
user "em@em"
connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T *99***1#"
/dev/ttyACM0
115200

noipdefault
usepeerdns
defaultroute
persist
noauth

 

接続を試みる

x60:~# pon emobile

x60:~# tail -n 100 -f /var/log/syslog
May  1 03:29:20 x60 pppd[20420]: pppd 2.4.4 started by root, uid 0
May  1 03:29:20 x60 kernel: PPP generic driver version 2.4.2
May  1 03:29:20 x60 kernel: PM: Adding info for No Bus:ppp
May  1 03:29:21 x60 chat[20431]: abort on (BUSY)
May  1 03:29:21 x60 chat[20431]: abort on (VOICE)
May  1 03:29:21 x60 chat[20431]: abort on (NO CARRIER)
May  1 03:29:21 x60 chat[20431]: abort on (NO DIALTONE)
May  1 03:29:21 x60 chat[20431]: abort on (NO DIAL TONE)
May  1 03:29:21 x60 chat[20431]: send (ATZ^M)
May  1 03:29:21 x60 chat[20431]: expect (OK)
May  1 03:29:21 x60 chat[20431]: ATZ^M^M
May  1 03:29:21 x60 chat[20431]: OK
May  1 03:29:21 x60 chat[20431]:  -- got it
May  1 03:29:21 x60 chat[20431]: send (ATDT*99***1#^M)
May  1 03:29:21 x60 chat[20431]: expect (CONNECT)
May  1 03:29:21 x60 chat[20431]: ^M
May  1 03:29:21 x60 chat[20431]: ATDT*99***1#^M^M
May  1 03:29:21 x60 chat[20431]: CONNECT
May  1 03:29:21 x60 chat[20431]:  -- got it
May  1 03:29:21 x60 chat[20431]: send (^M)
May  1 03:29:21 x60 pppd[20420]: Serial connection established.
May  1 03:29:21 x60 pppd[20420]: Using interface ppp0
May  1 03:29:21 x60 kernel: PM: Adding info for No Bus:ppp0
May  1 03:29:21 x60 pppd[20420]: Connect: ppp0 <--> /dev/ttyACM0
May  1 03:29:22 x60 pppd[20420]: PAP authentication succeeded
May  1 03:29:22 x60 kernel: PPP BSD Compression module registered
May  1 03:29:22 x60 kernel: PPP Deflate Compression module registered
May  1 03:29:25 x60 pppd[20420]: not replacing existing default route via 192.168.30.1
May  1 03:29:25 x60 pppd[20420]: Cannot determine ethernet address for proxy ARP
May  1 03:29:25 x60 pppd[20420]: local  IP address 60.254.196.111
May  1 03:29:25 x60 pppd[20420]: remote IP address 192.168.3.2
May  1 03:29:25 x60 pppd[20420]: primary   DNS address 60.254.193.158
May  1 03:29:25 x60 pppd[20420]: secondary DNS address 60.254.209.158
May  1 03:29:26 x60 pppd[20420]: Connect time 0.1 minutes.
May  1 03:29:26 x60 pppd[20420]: Sent 0 bytes, received 10 bytes.
May  1 03:29:26 x60 pppd[20420]: not replacing existing default route via 192.168.30.1
May  1 03:29:26 x60 pppd[20420]: Cannot determine ethernet address for proxy ARP
May  1 03:29:26 x60 pppd[20420]: local  IP address 60.254.196.111
May  1 03:29:26 x60 pppd[20420]: remote IP address 192.168.3.2
May  1 03:29:26 x60 pppd[20420]: primary   DNS address 60.254.193.158
May  1 03:29:26 x60 pppd[20420]: secondary DNS address 60.254.209.158

繋がったみたいです。

 x60:~# ip add show dev ppp0
3: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,10000> mtu 1500 qdisc pfifo_fast qlen 3
    link/ppp
    inet 60.254.196.111 peer 192.168.3.2/32 scope global ppp0

x60:~# ip route
192.168.3.2 dev ppp0  proto kernel  scope link  src 60.254.196.243
default dev ppp0  scope link

参考

http://d.hatena.ne.jp/kwshmnyk/20070407

http://d.hatena.ne.jp/reservoir/20070406