Skip to content

Instantly share code, notes, and snippets.

@theterg
Created May 21, 2012 21:13
Show Gist options
  • Save theterg/2764768 to your computer and use it in GitHub Desktop.
Save theterg/2764768 to your computer and use it in GitHub Desktop.
RM Kit XBee udev rule Located in /etc/udev/rules.d/00-bug20.rules
# Located in /etc/udev/rules.d/00-bug20.rules
# Internal Ethernet lacks EEPROM for MAC address so each reboot it gets
# random one. In effect it appears as usb0 but we prefer to have it as eth0
ACTION=="add", KERNEL=="omap-backlight", SUBSYSTEM=="platform", RUN+="/sbin/modprobe bug_backlight"
KERNEL=="ttyS1", SUBSYSTEMS=="tty", RUN+="/etc/udev/scripts/bt_init.sh"
ACTION=="add", SUBSYSTEM=="bmi", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
ACTION=="remove", SUBSYSTEM=="bmi", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
KERNEL=="ttyS0", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI2"
KERNEL=="ttySC0", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI0"
KERNEL=="ttySC1", SUBSYSTEMS=="platform", SYMLINK+="ttyBMI3"
# Whenever the second SD card gets inserted export them as usb-storage
ACTION=="add" KERNEL=="mmcblk1*", RUN+="/sbin/modprobe g_file_storage file=/dev/%k removable=1"
ACTION=="remove" KERNEL=="mmcblk1*", RUN+="/sbin/modprobe -r g_file_storage"
# For Novatel USB 3G (CDMA) Dongle
SUBSYSTEMS=="scsi",DRIVERS=="sr",ATTRS{vendor}=="Novatel ",ACTION=="add",RUN+="/usr/bin/eject %k"
# For Sprint U301 3g/4g
ATTRS{idVendor}=="1a40", ATTRS{idProduct}=="0101", RUN+="/usr/bin/eject %k"
ATTRS{idVendor}=="16d8", ATTRS{idProduct}=="6008" RUN+="/sbin/modprobe usbserial vendor=0x16d8 product=0x6008"
# For libertas_sdio named eth1
SUBSYSTEMS=="sdio", DRIVERS=="libertas_sdio", NAME="wlan0"
KERNEL=="event*",ATTRS{name}=="twl4030_pwrbutton",SYMLINK+="input/power_button"
KERNEL=="event*",ATTRS{name}=="TWL4030 Keypad",SYMLINK+="input/user_button"
# Set eth1assoc as the default trigger for the wifi-green LED
SUBSYSTEMS=="sdio", DRIVERS=="libertas_sdio", NAME="wlan0", RUN+="/etc/udev/scripts/wlan-trigger.sh"
KERNEL=="ttyUSB[0-9]", DRIVERS=="pl2303", NAME="ttyPL2303", MODE="0666"
KERNEL=="ttyUSB[0-9]", DRIVERS=="ftdi_sio", NAME="ttyXbee%n", MODE="0666"
KERNEL=="ttyUSB[0-9]", DRIVERS=="option1", NAME="ttyOPT%n", MODE="0666"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment