No /dev/bus/usb/ in Lucid Puppy

Using applications, configuring, problems
Message
Author
ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

No /dev/bus/usb/ in Lucid Puppy

#1 Post by ahoppin »

Sorry the following is so long. The gist of it is that I need to know where the usb character special device files are in Lucid Puppy's /dev directory. I found some, but they don't do what I need them to do.

Details:

I'm using Lucid 5.2.5 full and xsane 0.996. (Old dog, I know, but still catching tennis balls just fine.)

Xsane says that the world will end if I run it as root, so for years I ran it as spot (su -c xsane spot) with a Umax scsi scanner. To do this I had a shell script that used sane-find-scanner to determine the scanner's port, then ran a chmod o+rw command on that port. Worked fine.

chmod o+rw `sane-find-scanner | grep dev | cut -c52-`
su -c xsane spot

The Umax recently died in a power surge. I replaced it with an almost-as-old Epson Perfection 2400 USB scanner. This is listed as fully supported (as "Epson GT-9300 flatbed scanner") in sane.

It scans perfectly when I run xsane as root.

However, the same permissions trick I used before now doesn't work, so I can't scan as spot any more.

When I'm spot, sane-find-scanner reports:

found USB scanner (vendor=0x04b8, product=0x011b) at libusb:001:004

All well and good.

But as spot, scanimage -L says:

No scanners were identified.

So I can run xsane as root just fine, but not as spot.

I see lots of questions about this on other forums with Ubuntu, Arch, Slackware, and so on. All report the same symptom -- they can run xsane as root, but not as a normal user.

The forums have various solutions. The "legit" fix, I guess, uses udev.

Some suggest the same quick and dirty solution I used for the scsi scanner -- changing permissions of the USB device the scanner's using. And that's fine with me. But I can't get it to work with the USB port.

All these forums devoted to other distros say to set permissions on your scanner's USB device in /dev/bus/usb.

Following their format, for my present setup, that would be

chmod go+rw /dev/bus/usb/001/004

But that doesn't work.

The problem is that Lupu 5.2.5 doesn't have the /dev/bus directory at all.

(Precise 5.7.1 on another machine does, but I haven't yet tried using the scanner on that machine.)

Lucid DOES have /dev/usb, which contains character special files scanner0 (180, 48) and scanner1 (180, 49). Changing the permissions of these devices to 666 has no effect on sane or scanimage. Spot doesn't get to scan.

Lucid ALSO has the character special /dev/usbdev1.4 (189,3). That would seem to be equivalent to libusb:001:004. Changing that device's permissions to 666 ALSO has no effect on xsane or scanimage. Spot still doesn't get to scan.

I'm stumped.

I can scan as root, bypassing xsane's we're-all-gonna-die don't-run-me-as-root message.

But it's making me crazy that I can't figure out what device to change permissions on so that ***spot*** can talk to my USB scanner (which worked perfectly with my old SCSI scanner).

Again, sorry for the long post, I hope it makes some sense. I also hope that someone who knows and understands Lucid's USB system can help with this. Thanks!

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: No /dev/bus/usb/ in Lucid Puppy

#2 Post by greengeek »

ahoppin wrote:When I'm spot, sane-find-scanner reports:

found USB scanner (vendor=0x04b8, product=0x011b) at libusb:001:004

All well and good.

But as spot, scanimage -L says:

No scanners were identified.
Hi ahoppin - finding an answer is above my intellect grade unfortunately, but I am interested to understand your method so I tried to emulate a little of what you did (although I am not using Lucid or spot - i am Slacko 5.6 and I assume root).

Here is what I get when I try the commands sane-find-scanner and scanimage -L

Code: Select all

# sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x08ff, product=0x1600 [Fingerprint Sensor]) at libusb:006:002
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
# scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
# 
It found my builtin usb fingerprint reader (didn't even know I had one) but couldn't do anything with it. (A bit like spot with your epson).

The responses imply that "It may or may not be supported by SANE"

Is it possible that spot does not have access to a required Sane file (but root does)?

Are "sane-find-scanner" and "scanimage" parts of the same software or different modules? Would spot have equal access covering both modules?

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#3 Post by ahoppin »

Interesting thoughts, thanks for the response. I guess your fingerprint scanner is presenting itself to the OS as a USB scanner, but SANE supports only document and photo scanners (as far as I know). I would guess that that's why scanimage -L says "no scanners were identified," it's not one that SANE knows anything about.

But you have a point, that if SANE couldn't read the config files for the scanner, it might say the same thing for me. I checked permissions on /etc/sane.d/epson2.conf, and it's readable by all (same as umax.conf, which xsane used before), so I wouldn't think that would cause the problem. Same with /usr/lib/libsane-epson.so.1.0.20.

Sane-find-scanner, scanimage, and xsane are all part of the SANE package. I don't know why sane-find-scanner and scanimage -L give different results. If I did, I might have a better idea what's wrong.

I wonder if there's any way to get a debug trace from any of these utilities, see where they're failing. Might have to build them from source to do that.

I'm also wondering whether the Tahr xsane package from Ibiblio would work on Lucid, how many dependencies I'd have to track down, and how many library conflicts updating the libraries would introduce.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#4 Post by greengeek »

ahoppin wrote:I'm also wondering whether the Tahr xsane package from Ibiblio would work on Lucid, how many dependencies I'd have to track down, and how many library conflicts updating the libraries would introduce.
I always feel that anything is worth a try - but only with the caveat that all such testing should be done without a savefile - using only the pristine puppy.sfs without modifications or overlays.

Given that I have no real clue why spot wont play ball I hope you don't mind if I chuck in some random thoughts (i love a good bug hunt...)

Any interesting thoughts in this link?
http://englanders.us/~jason/scanner.php
Compile and install SANE (Scanner Access Now Easy)
I put a howto for building and installing Sane and a few frontends here
Add this line to /usr/local/etc/sane.d/epson.conf:
usb /dev/usb/scanner0
Uncomment the "epson" line in /usr/local/etc/sane.d/dll.conf
If your version of Slackware (>= 8.1 should) has a /etc/profile.d/ directory, create a /etc/profile.d/sane.sh script (chmod 755) that has this in it:
#!/bin/sh
export SANE_DEFAULT_DEVICE=/dev/usb/scanner0
If you don't have /etc/profile.d/, add that line to /etc/profile. Setting this environment variable tells scanimage and xscanimage what your scanner device is (without having to specify it on the commandline). If your (non-root) account is the only one that'll be using the scanner, you could also just throw that line in ~/.bash_login
EDIT : Also http://khk.net/sane/usb_scanner.html
Configuring SANE

Create the device file in /dev according to the instructions in the USB Guide. The device name you are using is needed for the next step.

Here is the command I used to create this file:

mknod /dev/usbscanner0 c 180 48
chmod 666 /dev/usbscanner0
To actually use the scanner with SANE the only thing left to do is to configure SANE. The EPSON backend uses a file epson.conf that is either located in /etc/sane.d or in /usr/local/etc/sane.d (or wherever you or your Linux distribution intalled SANE). Edit this file and make sure that the following line is the only information in the file:

usb /dev/usbscanner0
Replace the /dev/usbscanner0 with the actual device name used in the previous step.
Does Spot have access to the whole of /dev and /proc?

EDIT2 :You've probably also seen this: https://bugzilla.redhat.com/show_bug.cgi?id=122328
It links to a page discussing hotplug permissions and scanner group declarations in /etc/group:
http://www.freecolormanagement.com/sane/libusb.html

EDIT 3:Apologies if none of this is relevant - but heres another couple of interesting links:

1) Explicitly specifying the usb parameters to scanimage in case Spot can't access some critical config file:
https://bugs.mageia.org/show_bug.cgi?id=5376
[sane-find-scanner extract]
found USB scanner (vendor=0x04b8 [EPSON], product=0x0110 [EPSON Scanner]) at libusb:003:005

$ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

$ scanimage -d epson:libusb:003:005 --batch-count=1 --batch=out%d.tif -p
Scanning 1 pages, incrementing by 1, numbering from 1
Scanning page 1
Scanned page 1. (scanner status = 5)

So works.

xsane alone doesn't.
I think I found the issue.

In /etc/sane.d/dll.conf the epson entry is commented out. Putting it back solves the issue. I see that as a regression from Mageia 1 but there may be some good reasons for that.
HTH,
Bruno.
2) https://forums.mageia.org/en/viewtopic. ... 00&p=23565
by MontyWilliams » Jul 27th, '12, 17:28

The bug fix (uncommenting epson in /etc/sane.d/dll.conf) enables the device to be seen. However it is identified as a GT-9300 just to confuse me - that is the Japanese designation.
I see that the Perfection 2400 photo is no longer a listed device in the MCC configuration options.
Well beyond my pay grade unfortunately :shock:

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#5 Post by ahoppin »

Wow, lots of material there. Regrettably I think I'm in over my head too. I can't even figure out which of them might apply to my situation. :-(

I think my main problem is that I don't understand how the USB system works, and especially how Lucid Puppy's differs from other distros'.

As a result, I can't figure out how to change the permissions of the USB device that xsane is looking for, so that xsane can see it when it's run as Spot.

I may have to just give up and run xsane as root, ignoring its alarming warnings ("You try to run XSane as root, that really is DANGEROUS!").

It just annoys me that I had no trouble figuring out how to run xsane as Spot when I had a SCSI scanner, but can't do it with a USB scanner.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#6 Post by greengeek »

One of those posts i highlighted talks about telling scanimage which device to use directly.

Maybe you could try the following syntax (both as root and spot):

Code: Select all

$ scanimage -d epson:libusb:001:004 --batch-count=1 --batch=out%d.tif -p
(I replaced the libusb parameter in the webpage example with your figures of "libusb:001:004" reported by sane-find-scanner)

In theory that might allow spot to drive scanimage even in the absence of xsane's port config files. (or maybe it might need "epson2" instead of "epson" depending on where your driver is?)

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#7 Post by ahoppin »

# scanimage -d epson2:libusb:001:004 --batch-count=1 --batch=out%d.tif -p

scanimage: open of device epson2:libusb:001:004 failed: Access to resource has been denied

Well, foo.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#8 Post by bigpup »

I can scan as root, bypassing xsane's we're-all-gonna-die don't-run-me-as-root message
.
So what!

I have never, I repeat never, had a problem caused by running any program as root.

Maybe, a small benefit to running a browser as spot.
That is about all spot was suppose to be about.

To be honest, I do not think running as spot ever got fully tested and bug fixed.

Running as spot does not do what a lot of people think it does.
http://www.puppylinux.org/wikka/spot?redirect=no
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#9 Post by ahoppin »

I just plugged the scanner into my laptop and booted Tahr. Xsane found it and worked with it perfectly (if slow to start) when run as root.

But when run as spot, xsane could NOT find the scanner...

Until I did (as root):

# sane-find-scanner
found USB scanner ... at libusb:002:003 ... [LOTS more text]
# scanimage -L
device 'epson2:libusb:002:003' is a Epson GT-9300 flatbed scanner
# cd /dev/bus/usb/002
# chmod o+rw 003
# cd /dev
# chmod ugo+x bus

And then xsane worked when run as spot!

Now if I could just figure out how to do the same in Lucid -- but it doesn't have the directory /dev/bus. Instead, it has /dev/usbdevX.Y

where X is 1-7 and Y is 1,2,3,5,12,21.

When the scanner was at 001:004, chmod o+rw usbdev1.4 did NOT work.

Now after re-plugging it's at 001:006, and chmod o+rw usbdev1.6 still doesn't work.

I'm still stumped.

FWIW, Lucid 5.2.8 has BOTH /dev/usbdevX.Y and /dev/bus/usb.

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#10 Post by ahoppin »

> I have never, I repeat never, had a problem caused by running
> any program as root.

I don't really think that anything bad will happen as a result of running xsane as root. But the warning is annoying. Also, I'm trying to get my sweetie to scan her own stuff, and that's likely to scare her off.

Good news, though, I just discovered that I can install the package xsane-0.997-patched-2-w5c.pet from http://distro.ibiblio.org/puppylinux/pet_packages-tahr/ and it seems to work fine on Lucid. That version has no sky-is-falling root warning.

However, it still would be nice to know why chmod-ing usbdevX.Y didn't grant xsane permission to the usb scanner device file.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#11 Post by greengeek »

ahoppin wrote:scanimage: open of device epson2:libusb:001:004 failed: Access to resource has been denied
Well, foo.
How would you interpret that answer? I think it confirms your focus on setting permissions. ("somewhere" !)

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#12 Post by greengeek »

ahoppin wrote:Until I did (as root):

# sane-find-scanner
found USB scanner ... at libusb:002:003 ... [LOTS more text]
# scanimage -L
device 'epson2:libusb:002:003' is a Epson GT-9300 flatbed scanner
# cd /dev/bus/usb/002
# chmod o+rw 003
# cd /dev
# chmod ugo+x bus

And then xsane worked when run as spot!
Interesting that scanimage here had no problem seeing the scanner prior to your permissions changes to the bus directory. I'm confused though - did Spot succeed in interfacing the scanner at that point? (prior to changing the permissions, but AFTER scanimage was able to identify the scanner).

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#13 Post by greengeek »

ahoppin wrote:# scanimage -L
device 'epson2:libusb:002:003' is a Epson GT-9300 flatbed scanner
# cd /dev/bus/usb/002
# chmod o+rw 003
# cd /dev
# chmod ugo+x bus

And then xsane worked when run as spot!

Now if I could just figure out how to do the same in Lucid -- but it doesn't have the directory /dev/bus. Instead, it has /dev/usbdevX.Y
Just for the hell of it - could you change permissions on ALL of the directories (recursively) in /dev (in Lucid)and see if it gives Spot what it wants?

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#14 Post by ahoppin »

> scanimage here had no problem seeing the scanner prior to
> your permissions changes ...

Oops, sorry that wasn't clear. The commands listed were typed as root.

After that, Spot could start and use xsane.

The above was in Tahr, but I think it would also work in Precise, and maybe in Lucid 5.2.8. Not Lucid 5.2.5, however.

There's no need to change the permissions of /dev, it's already 755 (rwxr-xr-x), so it's searchable by anyone.

The usbdev* files are at the first level under /dev, so there are no directories that would need to be changed.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

@ahoppin:-

I'm just gonna throw this out here. It'll probably fall on barren ground & refuse to take 'root' (sorry; I know, I know...!), but here goes anyway.

Now you've got an Epson scanner, as an alternative to Xsane.....have you considered trying Epson's own scanner packages?

It's only a suggestion, but you may quite like Epson's I-Scan app. I run an SX218 all-in-one (printer/scanner/copier; that kinda thing), but you've always had to install printer & scanner drivers separately on these things. Don't ask me why; that's just the way Epson have always done it....when they're not busy denying that they even do drivers for Linux, that is!


Image


If you fancy taking a look at this, you're in luck. Epson used to make you download two packages for it; a 'data' package, which had to be installed first.....followed by the driver itself, which needed info from the data package to be able to run. A b]right[/b] PITA; nowadays, they appear to have finally condensed all this into one package (which makes more sense..!)

If you go here, to Epson's downloads page:-

http://download.ebz.epson.net/dsc/searc ... archModule

Enter the model number (GT-9300), then below it, use the drop-down to select your OS; in this case, Linux.

The next page will give you the download link to the package. Click on this, then the following page will show you a huge list of all the models this driver will support. (Virtually every model they've ever produced...)

Scroll down to the bottom, and click on 'Accept'. A box will appear, where you'll want the first option; 'Package Download Page'. Click on this, and.....hooray, you've finally reached the download!

You'll want the 32-bit (i386) .deb package. Trust me on this.

Once all that's done, simply click on the downloaded package to install it.

-------------------------------------------------------------

One 'peculiarity' of this; it may say, the first time you try to launch it, that it can't find the scanner. That's OK; power your scanner down, wait a few seconds, then power it back on again. Now launch Image Scan! again; all things being equal, it'll fire up this time.

This is only a suggestion.....but many people don't seem to be aware that Epson even do Linux packages, let alone specific ones. Anyway, I'll leave that with ya.

Entirely your decision, of course. Personally, I've never been able to figure Xsane out, much less use it..! I've always found Image Scan! to be very easy to use.


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#16 Post by greengeek »

This information:
ahoppin wrote:I just plugged the scanner into my laptop and booted Tahr. Xsane found it and worked with it perfectly (if slow to start) when run as root.

But when run as spot, xsane could NOT find the scanner...

Until I did (as root):

# sane-find-scanner
found USB scanner ... at libusb:002:003 ... [LOTS more text]
# scanimage -L
device 'epson2:libusb:002:003' is a Epson GT-9300 flatbed scanner
# cd /dev/bus/usb/002
# chmod o+rw 003
# cd /dev
# chmod ugo+x bus

And then xsane worked when run as spot!

Now if I could just figure out how to do the same in Lucid -- but it doesn't have the directory /dev/bus. Instead, it has /dev/usbdevX.Y
seems incompatible with the suggestion that in Lucid you have a problem with permissions in /dev/bus - given that you have said (in recent testing) that:
There's no need to change the permissions of /dev, it's already 755 (rwxr-xr-x), so it's searchable by anyone.

The usbdev* files are at the first level under /dev, so there are no directories that would need to be changed.
If you are correct that /dev (and recursive) permissions are already fine for Spot's needs, then I see no need to be wanting to do the chmod things that worked previously. Or have I misinterpreted this? I would have expected setting all /dev files for the permissions you wanted would make Spot happy. If it didn't then surely that requires us to look further afield? Maybe force all /etc files to the permissions you need? Or maybe /proc too?

Or, in your example above, did Spot start to work simply because you had already surmounted the problem by running the scanner as root first?

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#17 Post by ahoppin »

Hi Mike, thanks for the suggestion. I'm conflicted over this. I have a strong preference for open source, which is why I'm using Puppy.

However, I also want to encourage hardware manufacturers to support Linux users, even when (as here) the support is limited to "Here it is, try it; if it doesn't work, you're on your own."

I've used xsane with a Umax scanner (now deceased) for over 6 years, and I've been pretty well satisfied with it. But I downloaded the Epson Image Scan package you suggested anyway. I can load it on a pfix=ram Puppy to see whether I like it better.

FYI, Image Scan may have changed since you installed yours. I'm not sure but I don't think I can just click on the downloaded file to install it. The file I have is iscan-bundle-1.0.4.x64.deb.tar.gz. I think the .deb package will have to be extracted from the archive before I can install it, but that's not a big deal.

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#18 Post by ahoppin »

Hi Greengeek. I really appreciate your taking the time to help with this. Sorry if I'm not explaining what I did and tried clearly.

The commands I listed were ones that I ran as root in Tahr. Before them, spot couldn't use xsane. After them, spot could. Again, though, that was in Tahr.

I hope that makes more sense.

> [the commands seem] incompatible with the suggestion that in
> Lucid you have a problem with permissions in /dev/bus ...

Well, not exactly. Lucid doesn't have a /dev/bus directory. So, those commands don't work on Lucid because the character special device files they change in Tahr, don't exist in Lucid.

Unfortunately, I can't find the equivalent files in Lucid.

I guess that the /dev/bus directory is a change to udev (?) that antedates Lucid (but which Tahr has). I don't know for sure, though.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#19 Post by Mike Walsh »

Hi again, ahoppin.
ahoppin wrote:> [the commands seem] incompatible with the suggestion that in
> Lucid you have a problem with permissions in /dev/bus ...

Well, not exactly. Lucid doesn't have a /dev/bus directory. So, those commands don't work on Lucid because the character special device files they change in Tahr, don't exist in Lucid.
I decided to have a look in my own install of Lucid (5.2.8.7). I originally only installed this to help somebody else out with a browser query, and it kind of hung around, and I starting playing about with a bit more often, and did some customising, and.....well, TBH I really rather like it now! Getting OpenShot & RecordMyDesktop (both Python apps) installed and running well was the clincher, I must admit. (Works a treat on the old 2002 Dell lappie with the P4.)

I seem to have a /dev/bus/usb directory in Lucid. However, comparing it to the same directory in a few other Pups (Raring, Precise, Slackos 560 & 570, Tahrpup - to name but a few) it doesn't appear to have anywhere near as many of the 'special character' inode files as the others do. But it does exist.

Food for thought, perhaps? (BTW, what do these 'special character' files actually do? Do you happen to know? I have a sneaking suspicion these get created whenever a new piece of USB hardware is detected; if you were using a parallel port scanner, and no other USB devices, could be why the directory doesn't seem to exist...)

Of course, that immediately shoots holes in my own theory of how they're created, since the moment you plugged the Epson in via USB, some of these should have appeared in the /dev/bus/usb directory. So perhaps my theory doesn't hold water!

-----------------------------------

As for I-Scan, yes; it needs extracting first.....then the debs are inside that. Looks like you still need to install two packages to get things working. (They've simply combined the individual .debs into a 'bundle'. At least it's a step in the right direction; previously, you had to download each .deb individually. It's 'progress' - I suppose!)

Anyway:-

First, install the .deb inside the 'data' directory. Then, install the .deb inside the 'core' directory. (Don't bother with the contents of the 'plugins' directory; that's strictly for networking.....if you want to try and control the scanner remotely. I've never found this to work with Puppy anyway.)

And I could be wrong, but I think you've accidentally downloaded the 64-bit package:-
The file I have is iscan-bundle-1.0.4.x64.deb.tar.gz.
AFAIK, that won't work for Lucid..!




Mike. :wink:
Last edited by Mike Walsh on Mon 26 Mar 2018, 01:17, edited 1 time in total.

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#20 Post by ahoppin »

Warning, long and somewhat rambling post!

> I decided to have a look in my own install of Lucid (5.2.8.7)...
> I seem to have a /dev/bus/usb directory...

I saw that in Lucid 5.2.8, too. IIRC, it had both the /dev/bus/usb and the /dev/usbdev* files.

> what do these 'special character' files actually do?

A character special file is a way for Linux (or Unix) to write to and read from a device that transfers data one character at a time.

The printer devices /dev/lp0 and /dev/lp1 are also character special files. If you open a console window and issue the command

ls -l /dev/lp?

you'll see them. The c in the first column of the permissions field says they're character special files.

Now if you type in that same window

ls -l /dev/sd*

you'll get a list of your computer's disks. The b in the first column means they're block special files. A block special file is an interface with a block-oriented device (one which transfers data to/from the kernel in large blocks or chunks), such as a disk drive or its file system.

If you're old enough to remember MSDOS, you might remember using CON, PRN, LPT1, COM1, NUL, and other similar device files that you could write to and/or read from. Similar principle.

> I have a sneaking suspicion these get created whenever a new piece
> of USB hardware is detected

That could be. I do see /dev/bus/usb in Tahr on a fresh boot. However, that might be because the laptop I'm experimenting with has an always-connected USB device, a fingerprint sensor.

Also, the /dev/usbdev* files in Lucid 5.2.5 are always there. lsusb returns 12 addresses. But again, I never boot this Lucid machine with no USB devices plugged in.

What I DO notice is that the USB device files, whether /dev/bus/usb/* or /dev/usbdev*, get their time and date stamps updated when you plug in a USB device.

Just for comparison, I booted Puppy 4.3.1. No /dev/bus directory, and no /dev/usbdev files at all. That seemed strange. Maybe it couldn't see the fingerprint sensor? Just a guess. It did have a file /dev/usbmouse, however.

Plugged in the scanner. Sill no /dev/bus/usb directory, but /dev/usbdev2.2, /dev/usbdev2.2_ep00, /dev/usbdev2.2_ep01, /dev/usbdev2.2_ep02, and /dev/usbdev2.2_ep81 all showed up. They all had the current time stamp.

I'm afraid that all this is just adding to the confusion. :-(

I *think* that whatever changed in Puppy that made the /dev/bus/usb directory appear, it changed with Lucid 5.2.8. However, I suspect that this is more related to the Linux kernel's evolution than to Puppy's growth.

> if you were using a parallel port scanner, and no other USB devices,
> could be why the directory doesn't seem to exist.

Do you mean /dev/bus/usb? If so, I would think it should exist if I booted Lucid 5.2.5 with the scanner connected. That doesn't happen. No matter what, I *never* see /dev/bus/usb in Lucid 5.2.5.

This has me intrigued. I think I need to do some research on the evolution of Linux's usb subsystem.

PS - thanks for catching that downloading error! I'll try again.

Post Reply