Modem keluaran Haier ini, by default, akan terdeteksi sebagai CD Drive di Linux. Di ‘machine’ saya
blok device CD Drive tersebut adalah /dev/sr1
. Untuk mengubah menjadi interface modem, biasanya
dilakukan dengan me-remove (baca:eject) CD Drive tersebut dari Linux, misalnya dengan perintah:
eject /dev/sr1
.
Cara yang lebih efektif adalah dengan menggunakan program usb_modeswitch
yang merupakan paket
standar di Slackware. Berikut ini adalah dokumentasi langkah-langkah yang saya lakukan:
- Tambah konfigurasi baru di
/etc/usb_modeswitch.d/
dengan nama file 201e:2009 (vendor ID dan product ID dari Haier CE100). Konfigurasi file tersebut seperti dibawah ini:
# Copy here
# Haier CE 100
DefaultVendor= 0x201e
DefaultProduct= 0x2009
TargetClass= 0xff
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
NeedResponse=1
CheckSuccess=10
#Stop here
- Ubah file
/lib/udev/rules.d/40-usb_modeswitch.rules
dengan menambahkan baris
ATTRS{idVendor}=="201e", ATTRS{idProduct}=="2009", RUN+="usb_modeswitch '%b/%k'"
Dengan konfigurasi diatas, udev akan mendeteksi idVendor dan idProduct dari CE100. Ketika device di
plug, usb_modeswitch
akan langsung berjalan dan mengubah interface CD Drive menjadi modem secara
otomatis. Berikut potongan dari syslog
:
Oct 27 05:31:10 pcxthinkslack kernel: [99749.244250] usb 2-1.2: new full speed USB device number 38
using ehci_hcd
Oct 27 05:31:10 pcxthinkslack kernel: [99749.331205] usb 2-1.2: New USB device found, idVendor=201e,
idProduct=2009
Oct 27 05:31:10 pcxthinkslack kernel: [99749.331214] usb 2-1.2: New USB device strings: Mfr=1,
Product=2, SerialNumber=3
Oct 27 05:31:10 pcxthinkslack kernel: [99749.331221] usb 2-1.2: Product: USB MMC Storage
Oct 27 05:31:10 pcxthinkslack kernel: [99749.331225] usb 2-1.2: Manufacturer: Qualcomm, Incorporated
Oct 27 05:31:10 pcxthinkslack kernel: [99749.331229] usb 2-1.2: SerialNumber: 000000000002
Oct 27 05:31:10 pcxthinkslack kernel: [99749.331980] option 2-1.2:1.0: GSM modem (1-port) converter
detected
Oct 27 05:31:10 pcxthinkslack kernel: [99749.332214] usb 2-1.2: GSM modem (1-port) converter now
attached to ttyUSB0
Oct 27 05:31:10 pcxthinkslack usb_modeswitch: switching 201e:2009 (Qualcomm, Incorporated: USB MMC
Storage)
Oct 27 05:31:10 pcxthinkslack kernel: [99749.916425] option1 ttyUSB0: GSM modem (1-port) converter
now disconnected from ttyUSB0
Oct 27 05:31:10 pcxthinkslack kernel: [99749.916486] option 2-1.2:1.0: device disconnected
Oct 27 05:31:10 pcxthinkslack kernel: [99750.091198] usb 2-1.2: USB disconnect, device number 38
Oct 27 05:31:12 pcxthinkslack kernel: [99751.291511] usb 2-1.2: new full speed USB device number 39
using ehci_hcd
Oct 27 05:31:12 pcxthinkslack kernel: [99751.377915] usb 2-1.2: New USB device found, idVendor=201e,
idProduct=2009
Oct 27 05:31:12 pcxthinkslack kernel: [99751.377923] usb 2-1.2: New USB device strings: Mfr=1,
Product=2, SerialNumber=3
Oct 27 05:31:12 pcxthinkslack kernel: [99751.377930] usb 2-1.2: Product: Qualcomm CDMA Technologies
MSM
Oct 27 05:31:12 pcxthinkslack kernel: [99751.377935] usb 2-1.2: Manufacturer: Qualcomm, Incorporated
Oct 27 05:31:12 pcxthinkslack kernel: [99751.377939] usb 2-1.2: SerialNumber: 00100_DATACAR
Oct 27 05:31:12 pcxthinkslack kernel: [99751.379057] option 2-1.2:1.0: GSM modem (1-port) converter
detected
Oct 27 05:31:12 pcxthinkslack kernel: [99751.379269] usb 2-1.2: GSM modem (1-port) converter now
attached to ttyUSB0
Oct 27 05:31:12 pcxthinkslack kernel: [99751.379795] option 2-1.2:1.1: GSM modem (1-port) converter
detected
Oct 27 05:31:12 pcxthinkslack kernel: [99751.379953] usb 2-1.2: GSM modem (1-port) converter now
attached to ttyUSB1
Oct 27 05:31:12 pcxthinkslack kernel: [99751.380483] option 2-1.2:1.2: GSM modem (1-port) converter
detected
Oct 27 05:31:12 pcxthinkslack kernel: [99751.380638] usb 2-1.2: GSM modem (1-port) converter now
attached to ttyUSB2
Oct 27 05:31:12 pcxthinkslack usb_modeswitch: switched to 201e:2009 (Qualcomm, Incorporated:
Qualcomm CDMA Technologies MSM)