Posts List

Create udev rule to run Kppp when Haier CE682 plugged

Find device info with udevadm command: root@pcxthinkslack:~# udevadm info -a -n /dev/ttyUSB0 Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/pci0000:00/0000:00:1a.

Blacklist Smartfren modem Haier CE682 on ModemManager autoprobe

Create new udev rule /etc/udev/rules.d/81-blacklist-modemmanager.rules with this content: ATTRS{idVendor}=="201e", ATTRS{idProduct}=="1022", ENV{ID_MM_DEVICE_IGNORE}="1" Reload udev & plug-in the modem Voila…. ref: http://cgit.freedesktop.org/ModemManager/ModemManager/tree/src/77-mm-usb-device-blacklist.rules =-=-=-=-= Powered by Blogilo

Workaround: Automount Removable Media with udev

Got this tricks from Arch guy somewhere on the internet. I did this thing because the default KDE shipped with Slackware does not do the automount job well, at least on my machine. This tricks uses udev. Here is my addition of udev rule: bowo@pcxthinkslack:~$ cat /etc/udev/rules.d/10-my-media-automount.rules # /etc/udev/rules.d/10-my-media-automount.rules # start at sdb to ignore the system hard drive KERNEL!="sd[c-z]*", GOTO="my_media_automount_end" ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end" # import some useful filesystem info as variables IMPORT{program}="/sbin/blkid -o udev -p %N" # get the label if present, otherwise assign one based on device/partition ENV{ID_FS_LABEL}!

Rename Network Interface trough udev

Since kernel 3.7 my internal GSM modem interfaces name has changed from usb0 to wwan0 ,indeed it sounds good :) . However, it messed up Knemo traffic statistic, since I registered my internet connection based on its volume. So it’s better to use the same ifname. Using udev, I force my Slackware to use wwan0 as ifname. root@pcxthinkslack:~# cat /etc/udev/rules.d/10-network.rules SUBSYSTEM=="net", ATTR{address}=="02:80:37:ec:02:00", NAME="wwan0" =-=-=-=-= Powered by Blogilo