etc/udev/rules.d/15-zte-mf622.rules:
ACTION!="add", GOTO="End"
SUBSYSTEM=="usb", SYSFS{idProduct}=="2000",
SYSFS{idVendor}=="19d2", GOTO="ZeroCD"
SUBSYSTEM=="usb", SYSFS{idProduct}=="0001",
SYSFS{idVendor}=="19d2", GOTO="Modem"
LABEL="ZeroCD"
RUN+="/sbin/rmmod usb_storage"
LABEL="Modem"
RUN+="/sbin/modprobe usbserial vendor=0x19d2 product=0x0001",
MODE="660", GROUP="dialout"
LABEL="End"
[Dialer zte]
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init5 = AT+CGDCONT=1,"IP","indosatm2"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99#
Modem = /dev/ttyUSB0
Username = user
Password = password
Dial Command = ATDT
Baud = 460800
[Dialer nokia]
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init5 = AT+CGDCONT=1,"IP","indosatm2"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99#
Modem = /dev/ttyACM0
Username = user
Password = password
Dial Command = ATDT
Baud = 460800
[Dialer wimode]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = 1
Modem Type = USB Modem
ISDN = 0
Phone = #777
Modem = /dev/ttyACM0
Username = wimode
Password = wimode
Dial Command = ATDT
Baud = 460800
Surprisingly, e61i ternyata langsung detected as ttyACM0 :D senangnya, ga perlu crippled sama so many things hehhee
Now the times for a lil explanation:
sysfs is a new filesystem to the 2.6 kernels. It is managed by the kernel, and exports basic information about the devices currently plugged into the system. udev can use this information to create device nodes corresponding to your hardware.
Creating rules is not a workaround if the device attached or plugged is not having any nodes.
Files in /etc/udev/rules.d/ are parsed in lexical order, and in some circumstances, the order in which rules are parsed is important.
Be aware that udev does not support any form of line continuation. Do not insert any line breaks in your rules, as this will cause udev to see your one rule as multiple rules and will not work as expected.
BASIC RULES :
- KERNEL - match against the kernel name for the device
- SUBSYSTEM - match against the subsystem of the device
- DRIVER - match against the name of the driver backing the device
- NAME - the name that shall be used for the device node
- SYMLINK - a list of symbolic links which act as alternative names for the device node
Tidak ada komentar:
Posting Komentar