Re: Please explain how hotplug works in lay terms.
From: Keith Keller (kkeller-usenet_at_wombat.san-francisco.ca.us)
Date: 02/07/05
- Next message: Grant Edwards: "Re: Forward slashes in filenames"
- Previous message: Dave Uhring: "Re: Linux Screen Savers for Win XP?"
- In reply to: Al. C: "Please explain how hotplug works in lay terms."
- Next in thread: Dave Carrigan: "Re: Please explain how hotplug works in lay terms."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 6 Feb 2005 20:03:37 -0800
On 2005-02-06, Al. C <no.spam.acanton@take.out.adams-blake.no.spam.com> wrote:
> I run Slackware 9.1 with KDE.
>
> I have a cheapo Palm pilot and use Jpilot for it. Works fine. But I don't
> understand HOW. No matter which USB port I plug it into it works. The key is
> the link:
> /dev/pilot -> /dev/ttyUSB1
>
> Can someone explain in lay terms what is going on here?
>
> I read some of:
> http://linux-hotplug.sourceforge.net/?selected=overview
>
> but it's pretty technical. I'm just trying to figure out how the kernel knows
> that no matter what USB slot I plug in my Palm, it lets Jpilot find it.
The physical slot you use does not matter. When a device is plugged
into a USB port, if appropriate a device is created. In your case,
your Palm is possibly the second tty device you plugged in, so it gets
ttyUSB1. (The first tty USB device is generally ttyUSB0.)
This also depends on whether you are using old-style /dev (which IIRC
Slackware 9.1 uses), devfs, or udev.
> Second question.
>
> Given this entry in /etc/fstab
> /dev/sda1 /mnt/sony vfat user,noauto
>
> If I plug in my camera I can open it with /mnt/sony via a KDE desktop icon.
>
> Say I had a second camera or a printer or whater and I plug it into a second
> slot, it becomes sda2, right?
A camera might, since it'd probably be accessed by the USB mass storage
driver. A printer probably would not, unless it too has some sort of
storage mechanism. More likely it'd become a ttyUSB* device. (A camera
or other disk drive is a block device, whereas a printer or palm cradle
is a character device, which is the primary difference.)
> I'd have to have an entry in fstab for that as
> well, correct? What happens when I unplug the first device. Does sda2 become
> sda1?
No, but if you unplug both cameras, then the next camera you plug in may
become sda1, just as if you unplug your printer and palm, the next one
you plug in may become ttyUSB0. (Or ttyUSB1, if you have another
character device still plugged in.)
> I'm looking at buying a USB printer and don't understand which of the 4 USBs I
> should plug it into (or does it matter?), and what to put in fstab if
> anything.
For a printer you would not modify fstab, but beyond that I can't help
too much, since I have never used a USB printer. But I just did a quick
google.com/linux search, and a few links down is a link to an article by
AEleen Frisch, who notes that a USB printer will normally become
/dev/usblp0. So that's probably a good starting point for you.
--keith
-- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom see X- headers for PGP signature information
- Next message: Grant Edwards: "Re: Forward slashes in filenames"
- Previous message: Dave Uhring: "Re: Linux Screen Savers for Win XP?"
- In reply to: Al. C: "Please explain how hotplug works in lay terms."
- Next in thread: Dave Carrigan: "Re: Please explain how hotplug works in lay terms."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|