[clue-tech] Hotplug scripts and usermaps
Matt Gushee
mgushee at havenrock.com
Sat Mar 19 13:19:26 MST 2005
Tom Poindexter wrote:
>>I seem to have a USB hotplugging problem.
>
> I just worked on getting my phone (Windows Smartphone) working via hotplug,
> using the SynCE stuff. My issue was one of timing. My device
> typically is mounted as /dev/ttyUSB0 (or sometimes /dev/ttyUSB1). I find the
> device by finding the last line from 'dmesg' output, and extracting the
> tty device, which for the ipaq USB driver is the last word on the line.
No, that's not it. I know the correct device ... or at least I think I
do, though there are several manifestations of it: /dev/usb/tts/1,
/proc/bus/usb/001/NNN (number varies), and
/sys/bus/usb-serial/devices/<gobbledygook>. I'm not sure which is really
the correct one, but as I mentioned, if I am logged in as root and
manually do "chmod 666 /dev/usb/tts/*," I can then run the hotsync as a
regular user.
> It also turns out that the device inode creation was several seconds behind the
> hotplug script being invoked. You might trying adding 'sleep 10' when starting
> your script to see if that helps.
Unfortunately, no. Actually I think the hotplug daemon just isn't
running (see below).
> Otherwise, /var/log/messages and /var/log/syslog should have most of the
> information you need, as well as /proc/bus/usb/devices for the actual
> Vendor and Product USB ids. Look for the lines in /proc/bus/usb/devices
> beginning with "P:" for the ids. Look in /var/log/message for
> where the device was mounted.
As I mentioned before, I do know the correct vendor and product
IDs--thats about the only thing I'm sure of.
David Anselmi wrote:
> By any chance should your script be called visor, since that's what's
> on the line in the usermap? I haven't yet set up hotplugging
> (probably do udev first) so that's just a guess.
That's a good question, and I thought of that too. But I don't think so,
because the scanner-related files, which work (or at least did before my
latest kernel upgrade), are /etc/hotplug/libsane and
/etc/hotplug/libsane.usermap; the lines in libsane.usermap all begin
with 'libusbscanner'. Apparently this associates the device with a
module. I checked, and I do have a 'visor' module, and it is supposedly
the correct driver for my Palm Pilot, so that's what I put in my
pilot.usermap.
Anyway, I think the hotplug daemon just isn't running. At least:
# ps aux |grep hotplug
root 16936 0.0 0.2 3480 588 pts/0 S+ 13:12 0:00 grep hotplug
I've checked that numerous times, including just after I attempted to
manually start the hotplug daemon. It just doesn't seem to run. I also
put some
echo "PILOT blablabla" >2
lines into /etc/hotplug/usb/pilot. Nothing shows up from that either--at
least not in /var/log/*, which is where I would assume STDERROR is
redirected to.
I suspect this is related to the "DEVPATH not set" error messages I
mentioned earlier. I've been Googling for info about that for the past
half-hour or so; lots of people mention the problem, but I can't find
any info about exactly how that variable is supposed to be set, or what
an appropriate value for it would be.
<SIGH>
Thanks for the suggestions so far, gemmun.
--
Matt Gushee
Englewood, CO, USA
More information about the clue-tech
mailing list