On Wed, Sep 16, 2009 at 03:02:07PM -0700, Theodore Charles III wrote:
> After some back and forth IRC conversations with Chris, I've made some
> updated udev rules that will hopefully help all of the BB Tour users out
> there. Here they are:
Thanks Theodore!
I spent some time tonight integrating your suggestions as well as
simplifying the udev rules substantially, and making them as
cross-distro as possible. As long as the machine has a 'plugdev'
group, these files can drop right into /etc/udev/rules.d/ and go.
These files will be in the next 0.16 release, barring any serious
problems.
Please, everybody, give them a trial run on your distro! :-)
Just make a backup of your existing 10-blackberry.rules file,
and then copy these two files into /etc/udev/rules.d, and see if
charging still works (lsusb -v) and whether permissions are correct.
Thanks!
- Chris
#
# Blackberry devices
#
# Note: the following rules may appear wasteful, in that bcharge is run
# twice: once for changing the mode, and once again after the
# device resets itself to enter this mode. This is required
# in order to support older kernels (approx. 2.6.20 to 2.6.22) with
# CONFIG_USB_SUSPEND enabled. The second time bcharge is run
# is when the -p argument comes into play, adjusting the device's
# autosuspend settings.
#
# Note: SUBSYSTEM=="usb_device" is not reliably available on all kernels
# and all versions of udev, so instead we use the very first
# kernel message of: SUBSYSTEM=="usb", ENV{DEVTYPE}="usb_device"
# (See the output of 'udevadm monitor --kernel')
# Since the device is likely not created at this point, we
# can't set permissions... so permissions are handled in the
# generic 99-blackberry-perms.rules file.
#
#
# Older devices that only use 0x0001 (no USB Mass Storage)
#
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0001", \
RUN="/usr/sbin/bcharge -p %p"
#
# Newer devices with USB Mass Storage:
# 0x8007 usually get transformed into 0x8004
# 0x8004 sometimes get transformed into 0x0004
# 0x0006 usually get transformed into 0x0004
#
# 0x0006 turns into 0x0004, so no need to fiddle with autosuspend here
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0006", \
RUN="/usr/sbin/bcharge"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", \
RUN="/usr/sbin/bcharge -p %p"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8004", \
RUN="/usr/sbin/bcharge -p %p"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0004", \
RUN="/usr/sbin/bcharge -p %p"
#
# This file sets the permissions of Blackberry devices, using a very
# broad ruleset. It runs no external commands, so this broad ruleset
# should not impact performance at all.
#
# Note: for opensuse-11.1, use the group 'dialout'
#
ATTRS{idVendor}=="0fca", ATTRS{idProduct}=="0001", GROUP="plugdev", MODE="0660"
ATTRS{idVendor}=="0fca", ATTRS{idProduct}=="0004", GROUP="plugdev", MODE="0660"
ATTRS{idVendor}=="0fca", ATTRS{idProduct}=="0006", GROUP="plugdev", MODE="0660"
ATTRS{idVendor}=="0fca", ATTRS{idProduct}=="8004", GROUP="plugdev", MODE="0660"
ATTRS{idVendor}=="0fca", ATTRS{idProduct}=="8007", GROUP="plugdev", MODE="0660"
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel