[clue-tech] Hotplug scripts and usermaps

Tom Poindexter tpoindex at nyx.net
Fri Mar 18 21:42:39 MST 2005


On Fri, Mar 18, 2005 at 04:45:18PM -0700, Matt Gushee 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.

...script stuff....
sleep 10
TTYDEV=`dmesg|awk '/PocketPC PDA converter now attached/ {d=$NF} END {print d}'`
if [ -z $TTYDEV ] ; then
    echo "$time $uname $0: could not find iPAQ device tty" >>/var/log/synce
    exit
fi
...more script stuff...


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.  


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.

If any of this works for you, trying adding 'chmod 777 $your_device' after
you find the correct device.

Good luck.  As much 'flexibility' as hotplug gives up, it's still quite a
PITA to get working.



-- 
Tom Poindexter
tpoindex at nyx.net
http://www.nyx.net/~tpoindex/



More information about the clue-tech mailing list