[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev rule for a kindle



On 13/12/13 03:53, Sharon Kimble wrote:
> On Fri, 13 Dec 2013 02:02:06 +1100 Scott Ferguson
> <scott.ferguson.debian.user@gmail.com> wrote:
> 
>> On 13/12/13 01:30, Sharon Kimble wrote:
>>> On Thu, 12 Dec 2013 11:43:32 +1100 Scott Ferguson
>>> <scott.ferguson.debian.user@gmail.com> wrote:
>>> 
>>>> On 12/12/13 01:01, Sharon Kimble wrote:
>>>>> 
>>>>> I have a script for backing up my kindle when its first
>>>>> mounted, but its not running on mounting, but *does* run when
>>>>> invoked manually! When the kindle is mounted it should
>>>>> trigger this udev rule -
>>>>> 
<snipped>
>> 
> Following on from your actions listed - sudo leafpad
> /etc/udev/rules.d/85-kindle.rules #again, one long line 
> ACTION=="add", SYSFS{idVendor}=="1949", SYSFS{idProduct}=="0004", 
> RUN+="/home/boudiccas/bin/obkindle" sudo udevadm control
> --reload-rules #plug in kindle, and mount by hand in thunar sudo grep
> Kindle /var/log/syslog Dec 12 16:21:29 london kernel: [200220.440937]
> usb 1-2.4.1: Product: Amazon Kindle Dec 12 16:21:30 london kernel:
> [200221.455151] scsi 25:0:0:0: Direct-Access     Kindle   Internal
> Storage 0100 PQ: 0 ANSI:2 Dec 12 16:21:43 london udisksd[5448]:
> Mounted /dev/sde1 at /media/boudiccas/Kindle on behalf of uid 1000 
> #just on the off chance sudo grep kindle /var/log/syslog #returns
> zero, no output at all, it *has* to be 'Kindle'

kindle on mine (KDE/Wheezy) but "# grep -i kindle /var/log/syslog" will
catch all case variants.

> 
> It accepts 'SYSFS' or 'ATTR', no difference, and accepts *either*
> rule. But still does not run the script.
> 
> This is on a up-to-date 'jessie' system, with a basic Kindle
> (costing £69 from Amazon, the basic model). Just so that we can
> perhaps see the differences between our two systems.

I have that model (also). As long as your rule includes the udav
identifiers it should match the correct device.

> 
> I attach a screenshot showing the kindle open in thunar. You'll see
> I have 3 external usb drives, and thinking about it, they *all* have
> to be mounted by hand, so the problem is not just with the kindle,
> its system-wide. 'thunar-volman' is loaded, but I still have to mount
> by hand, whichever file manager I use.

I don't think that's the problem. All my drives mount automagically, but
the same udev rule doesn't work for me either. I usually have several
USB devices mounted (at least one during all these tests).

No errors shown in:-
dmesg | grep -i 'warn\|fail\|error\|alert'

> 
> ps aux|grep udevd root       367  0.0  0.0  11796  1720 ?        Ss
> Dec10   0:01 udevd --daemon boudicc+ 12207  0.0  0.0   4208   804
> pts/10   S+   16:45 0:00 grep --color=auto udevd
> 
> Just to check one commonality, udevd is running. udev 204-5 from
> http://mirror.bytemark.co.uk/debian/ jessie/main i386 Packages

everything here is either stock Wheezy or backports.

> 
> I've tried to find any and all commonalities between our two
> systems, because they seem to be handling the same information in two
> different ways!
> 
> Active kernel = 3.11-2-686-pae

3.2.0-4-686-pae

> 
> Are we any further forward though? I'm not sure, so, any ideas
> please?

I've got nothing. :(
As udev runs as root I can't think of why it won't run a user script -
just that for some reason it's not triggering *despite* matching the
device - perhaps changing it's priority or filtering the Kindle out of
the rule that precedes it (in priority). In earlier releases the kindle
was controlled by a udev multimedia device rule.
I was hoping to use your rule to autmagically start usb networking. For
now the udev rule goes back onto the "when I get time list"

> 
> Thanks Sharon.
> 


Kind regards

Attachment: kindle.jpg
Description: JPEG image


Reply to: