トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS


  • 追加された行はこの色です。
  • 削除された行はこの色です。
DocomoのUSB通信アダプタであるL-05AはWindowsのみサポートされておりLinuxではサポートされていない。しかし、Linuxでも利用することは可能であり、その方法を記述する。

|RIGHT:100|LEFT:410|c
|~ハードウエア|ThinkPad X220|
|~OS        |RedHat Enterprise Linux Workstation 6.3|

***接続時の動作 [#m622fd37]
L-05Aを接続するとCD-ROMドライブとして認識される。Windowsの場合、CD-ROMとして認識されドライバを導入するように促される。この場合、/dev/sr0としてCD-ROMドライブとして認識されている。
 usb 2-1.1: new high speed USB device number 3 using ehci_hcd
 usb 2-1.1: New USB device found, idVendor=1004, idProduct=613a
 usb 2-1.1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
 usb 2-1.1: Product: FOMA L05A
 usb 2-1.1: Manufacturer: LG Electronics Inc.
 usb 2-1.1: SerialNumber: 352360039211984
 usb 2-1.1: configuration #1 chosen from 1 choice
 Initializing USB Mass Storage driver...
 scsi6 : SCSI emulation for USB Mass Storage devices
 usb-storage: device found at 3
 usb-storage: waiting for device to settle before scanning
 usbcore: registered new interface driver usb-storage
 USB Mass Storage support registered.
 usb-storage: device scan complete
 scsi 6:0:0:0: CD-ROM            LGE      CD-ROM           1.00 PQ: 0 ANSI: 2
 scsi 6:0:0:0: Attached scsi generic sg1 type 5
 sr0: scsi-1 drive
 Uniform CD-ROM driver Revision: 3.20
 sr 6:0:0:0: Attached scsi CD-ROM sr0
 ISO 9660 Extensions: Microsoft Joliet Level 1
 ISOFS: changing to secondary root
 SELinux: initialized (dev sr0, type iso9660), uses genfs_contexts

 $ lsusb
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 003: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)
 Bus 001 Device 011: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)
 Bus 002 Device 003: ID 1004:613a LG Electronics, Inc. 


***CD-ROMドライブをejectすることで通信アダプターとして認識 [#g10687fe]
CD-ROMドライブのeject
 $ sudo eject /dev/sr0

CD-ROMドライブをejectしたL-05Aは、通信アダプタとして認識され、ダイアルアップソフトウエアでモデムとして使用可能となる。
 usb 2-1.1: USB disconnect, device number 3
 usb 2-1.1: new high speed USB device number 4 using ehci_hcd
 usb 2-1.1: New USB device found, idVendor=1004, idProduct=6124
 usb 2-1.1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
 usb 2-1.1: Product: FOMA L05A
 usb 2-1.1: Manufacturer: LG Electronics Inc.
 usb 2-1.1: configuration #1 chosen from 1 choice
 cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
 cdc_acm 2-1.1:1.2: ttyACM1: USB ACM device
 cdc_acm 2-1.1:1.4: ttyACM2: USB ACM device
 usbcore: registered new interface driver cdc_acm
 cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN  adapters
 tty_port_close_start: tty->count = 1 port count = 0.
 tty_port_close_start: tty->count = 1 port count = 0.
 tty_port_close_start: tty->count = 1 port count = 0.
 tty_port_close_start: tty->count = 1 port count = 0.
 tty_port_close_start: tty->count = 1 port count = 0.
 tty_port_close_start: tty->count = 1 port count = 0.

USBのProductIDが変化している。
 $ lsusb
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 003: ID 04f2:b217 Chicony Electronics Co., Ltd Lenovo Integrated Camera (0.3MP)
 Bus 001 Device 011: ID 0a5c:217f Broadcom Corp. BCM2045B (BDC-2.1)
 Bus 002 Device 004: ID 1004:6124 LG Electronics, Inc. 

wvdialの接続先をmopera(*99***3#)に設定
 $ cat /etc/wvdial.conf
 [Dialer Defaults]
 Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
 Modem Type = USB Modem
 Phone = *99***3#
 ISDN = 0
 Username = ''
 Init1 = ATZ
 Password = ''
 Modem = /dev/ttyACM0
 Baud = 7200000
 Stupid Mode = yes
 Carrier Check = no

wvdailを実行し接続する。resolv.confは修正されないため、DNSサーバーは手動で設定する必要がある。この後、VPNソフトウエアなどでVPNを張ってから使用する場合は必ずしもDNSの設定は必要ない。
 $ sudo /usr/bin/wvdial
 --> WvDial: Internet dialer version 1.60
 --> Cannot get information for serial port.
 --> Initializing modem.
 --> Sending: ATZ
 OK
 --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2
 ATQ0 V1 E1 S0=0 &C1 &D2
 OK
 --> Modem initialized.
 --> Sending: ATDT*99***3#
 --> Waiting for carrier.
 ATDT*99***3#
 CONNECT 7200000
 --> Carrier detected.  Starting PPP immediately.
 --> Starting pppd at Thu Jun 12 13:54:54 2014
 --> Pid of pppd: 8037
 --> Using interface ppp0
 --> local  IP address 1.67.30.184
 --> remote IP address 10.64.64.64
 --> primary   DNS address 220.159.212.200
 --> secondary DNS address 220.159.212.201

CTRL+Cで切断することができる。
 ^CCaught signal 2:  Attempting to exit gracefully...
 --> Terminating on signal 15
 --> Connect time 1.0 minutes.
 --> Disconnecting at Thu Jun 12 13:55:55 2014

***その他 [#ob6ad6d9]
udevのルールで最初から通信アダプターとして認識でいないか試したが、CD-ROMとして認識される。
 $ diff /lib/udev/rules.d/40-usb_modeswitch.rules /tmp/40-usb_modeswitch.rules
 340,341c340
 < #ATTRS{idVendor}=="1004", ATTRS{idProduct}=="613a", RUN+="usb_modeswitch '%b/%k'"
 < ATTRS{idVendor}=="1004", ATTRS{idProduct}=="6124", RUN+="usb_modeswitch '%b/%k'"
 ---
 > ATTRS{idVendor}=="1004", ATTRS{idProduct}=="613a", RUN+="usb_modeswitch '%b/%k'"
----
[1] [[FOMA接続(mopera U従量接続)>https://www.nttdocomo.co.jp/support/trouble/data/l08c/internet/connect_soft/measured/]]