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

Re: Where to put the PDA ?



On Sat, Jan 01, 2005 at 11:27:19AM -0500, J.F.Gratton wrote:

> Besides trying my PDA into each and every USB port (trial/error), is
> there a way to know which port is actually ttyUSB[01] ?

The USB ports on your computer do not actually correspond to specific
devices. The device nodes are mapped to actual devices when the device
(i.e., your PDA) registers itself on the USB bus. The first serial USB
device that registers will be ttyUSB0, the second will be ttyUSB1,
etc. This means that you can plug your PDA into any port and it will
always be the same device (assuming that you don't have any other serial
USB devices).

Clies and other Palm devices actually register two USB devices, so when
a Clie registers, it will use up the next two free device nodes (i.e.,
ttyUSB0 and ttyUSB1). For hotsyncing, you generally use the second node
that gets registered, so you would use ttyUSB1 (assuming that your Clie
is the only serial USB device on the bus). Some Palms (T|T maybe?) did
it backwards, and you would hotsync them using ttyUSB0.

Finally, the device doesn't actually register itself until you press the
hotsync button, so programs won't actually be able to open ttyUSB1 until
after you press the hotsync button. 

Using devfs (on 2.4 kernels) or udev (on 2.6 kernels) can make it easier
to do this, because the device nodes won't actually be created until you
press the hotsync button, and they're removed when the hotsync stops, so
it's immediately apparent what devices the PDA has registered itself
as. 

With udev you can even make it so that it creates custom device
files. For my system, I have udev configured to create devices called
/dev/palmv, /dev/t3, /dev/t5, /dev/clie, depending on which PDA is
currently trying to sync.

-- 
Dave Carrigan
Seattle, WA, USA
dave@rudedog.org | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Dave is currently listening to The Plimsouls - Not Of This World (Kool Trash)

Attachment: signature.asc
Description: Digital signature


Reply to: