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:

[tes...@tessai:~ #]> cat /lib/udev/rules.d/10-blackberry.rules
#
# 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.
#
# Note2: the SUBSYSTEM and ENV{DEVTYPE} checks are to prevent bcharge from
#       running each time a new endpoint is discovered by udev.
#       Both SUBSYSTEM and ENV{DEVTYPE} are included so that the version
#       of udev on your system doesn't matter.
#

#
# Older devices that only use 0x0001 (no USB Mass Storage)
#

#BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", 
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0001", SYMLINK+="bb-%k", 
RUN="/usr/sbin/bcharge -p %p"

#BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", 
ATTR{idVendor}=="0fca", ATTR{idProduct}=="0001", SYMLINK+="bb-%k", 
RUN="/usr/sbin/bcharge -p %p"

#
# Newer devices with USB Mass Storage, 0x8004 + 0x0006 + 0x0004.
#

#BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", 
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", SYMLINK+="bb-%k", 
RUN="/usr/sbin/bcharge -p %p"

BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", 
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", SYMLINK+="bb-%k", 
RUN="/usr/sbin/bcharge -p %p"
BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", 
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8004", SYMLINK+="bb-k%", 
RUN="/usr/sbin/bcharge -p %p"


[tes...@tessai:~ #]> cat /lib/udev/rules.d/99-barry-permissions.rules
#
# To avoid other udev rules changing the permissions again on us, this 
filename
# is '99-barry-perms'
#
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", GROUP="plugdev", 
MODE="0660"
ATTR{idVendor}=="0fca", ATTR{idProduct}=="8004", GROUP="plugdev", 
MODE="0660"

I run Slackware 13.0 as of today, and the group that's assigned 
permissions to udev-detected devices is called "plugdev". This is why I 
have the plugdev group listed in the permissions file. These udev rules 
work whether or not your auto mass storage mode is on or not (if it's 
on, the phone is detected as 8004, and if off, 8007). Hope that helps some.

-- 
Theodore Charles III
Network Administrator
Los Angeles Senior High
323-900-2724 / 323-900-2792


------------------------------------------------------------------------------
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

Reply via email to