Re: [gentoo-user] USB devices (dvd writer+scanner)

2006-05-21 Thread Jonathan Chocron
Le Dimanche 21 Mai 2006 21:03, [EMAIL PROTECTED] a écrit :
 Hello,

 I want to use linux for dvd writing and scanning.
 Both my scanner (Canon) and my dvd writer (BenQ) are usb devices.

 How can I know which device files these devices use? Or how can I configure
 a device file for these devices?

 Thank you very much in advance,
 Steffen


 pseiko pseiko # lsusb
 Bus 003 Device 001: ID :
 Bus 002 Device 001: ID :
 Bus 001 Device 009: ID 04a5:1007 Acer Peripherals Inc. (now BenQ Corp.)
 Bus 001 Device 007: ID 04a9:2220 Canon, Inc.
 Bus 001 Device 004: ID 0d49:7010 Maxtor
 Bus 001 Device 002: ID 05e3:0606 Genesys Logic, Inc.
 Bus 001 Device 001: ID :


 pseiko pseiko # cat /proc/bus/usb/devices
[snip]
 //The scanner

 T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  7 Spd=12  MxCh= 0
 D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=ff MxPS= 8 #Cfgs=  1
 P:  Vendor=04a9 ProdID=2220 Rev= 1.00
 S:  Manufacturer=Canon
 S:  Product=CanoScan
 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
 I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
 E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=16ms
 E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
 E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

 // I guess this is the dvd writer?

 T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  9 Spd=480 MxCh= 0
 D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
 P:  Vendor=04a5 ProdID=1007 Rev= 1.12
 S:  Product=USB 2.0 Storage Device
 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
 I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
 E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
 E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

Hi,

I am not sure what you mean by device file. If you mean a device node, that 
is a logical file in /dev, you will not find any for the scanner.

1) For the scanner.

First of all, make sure your scanner is supported ! I switched from canon to 
epson because canon scanners were not very welle supported. 

Then, you have to emerge sane-backends with the usb useflag set.

Figure out which backend your scanner use on the sane website 
(sane-project.org, if memory serves).

Then, in the config file of the backend, set the usb id :
usb product id device id

For example, I added 
use 0x4b8 0x110 to /etc/sane.d/epson.conf for sane to detect my epson 1650.

If your scanner is always plugged, you'll need to emerge coldplug and 
rc-update add coldplug default.

You might have permission problems at that stage. Check the permissions 
on /proc/bus/usb/001/007. You must have rw rights to be able to use the 
scanner.

2) For the CD burner.

It seems your cd-burner uses the usb-storage driver. It should then appear 
as /dev/sdX, provided you configured your kernel correctly. It should be 
useable at that address. You can do an lsscsi to figure out what to tell 
cdrecord, but any GUI (k3b...) should be able to detect and use your burner.

I hope this helps,

-- Jonathan


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] USB devices (dvd writer+scanner)

2006-05-21 Thread Walter Dnes
On Sun, May 21, 2006 at 09:03:00PM +0200, [EMAIL PROTECTED] wrote
 Hello,
 
 I want to use linux for dvd writing and scanning.
 Both my scanner (Canon) and my dvd writer (BenQ) are usb devices.
 
 How can I know which device files these devices use? Or how can I
 configure a device file for these devices?

  I strongly recommend udev rules to create symlinks.  The problem is
that mass storage devices (harddrives, CDs, DVDs, flash drives, etc) are
assigned the next available device name.  If you have 2 or more such
devices, their entries in /dev depend on the order they're plugged in.
udev rules allow you to create English symlinks that will always be the
same, and will point to the correct /dev entry, regardless of order of
plugging in.  I'll run through what I did.  You can follow along with
your DVDRW.

 // I guess this is the dvd writer?
 
 T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  9 Spd=480 MxCh= 0
 D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
 P:  Vendor=04a5 ProdID=1007 Rev= 1.12
 S:  Product=USB 2.0 Storage Device
 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
 I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
 E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
 E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us


1) You must either login or su as root to do all the following.


2) *WITHOUT* the device plugged in, execute the command fdisk -l.
Here's my output...

[m3000][root][~] fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   1146011727418+  83  Linux
/dev/sda21461   19457   144560902+   5  Extended
/dev/sda514611704 1959898+  82  Linux swap / Solaris
/dev/sda61705   19457   142600941   83  Linux


3) Connect the device, insert media if required, and wait 60 seconds
for the necessary hand-shaking.


4) *WITH* the device plugged in, execute the command fdisk -l.
Here's my output...

[m3000][root][~] fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   1146011727418+  83  Linux
/dev/sda21461   19457   144560902+   5  Extended
/dev/sda514611704 1959898+  82  Linux swap / Solaris
/dev/sda61705   19457   142600941   83  Linux

Disk /dev/sdb: 40.0 GB, 40060403712 bytes
64 heads, 32 sectors/track, 38204 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   1   3820439120880   83  Linux


5) Look for new devices (*NOT* partitions).  Disk /dev/sdb is my
new device... *THIS TIME*.  If I unplug it, plug in one or more other
USB devices, and plug it in again, it'll be a different device.  To
work around that hassle, we need a udev rule that creates a consistent
symlink.


6) Use the command udevinfo -a -p /sys/block/???  x.txt to get udev
info for your device.  Note that this variant only works for block
devices.  Replace the ??? with the device name in /dev.  It should be
something like sda or sdb, etc.  Mine was sdb, so...

[m3000][root][~] udevinfo -a -p /sys/block/sdb  x.txt

7) This will include a lot of output.  It'll have the main USB bus, the
USB ports, and also the device itself.  Here's the important part for my
shirtpocket USB drive...

ID==2-2
BUS==usb
DRIVER==usb
SYSFS{configuration}==
SYSFS{serial}==1E0009C22E4B
SYSFS{product}==LaCie Hard Drive USB
SYSFS{manufacturer}==LaCie
SYSFS{maxchild}==0
SYSFS{version}== 2.00
SYSFS{devnum}==2
SYSFS{speed}==480
SYSFS{bMaxPacketSize0}==64
SYSFS{bNumConfigurations}==1
SYSFS{bDeviceProtocol}==00
SYSFS{bDeviceSubClass}==00
SYSFS{bDeviceClass}==00
SYSFS{bcdDevice}==
SYSFS{idProduct}==0341
SYSFS{idVendor}==059f
SYSFS{bMaxPower}==  2mA
SYSFS{bmAttributes}==c0
SYSFS{bConfigurationValue}==1
SYSFS{bNumInterfaces}== 1

  Use any combination of the above keys that is unique enough *FOR YOUR
NEEDS* to generate a udev rule.  If you've got 3 kids with identical
model mp3 players, and only one will connect at any time, then BUS, and
SYSFS{idProduct}, and SYSFS{idVendor} should be sufficient to identify
the device.  If two or more will be connected simultaneously, you'll
need to key in on SYSFS{serial} to differentiate between them.  Note;
you *MUST* copy the keys *EXACTLY*, including leading and trailing
spaces.  I suggest cut-and-paste.

  In addition to identifying the device on the system, you also have to
tell udev what the device will be called, and also what symlink to use
for it.  Here is my rule for the above device; yours will obviously be

[gentoo-user] USB devices (dvd writer+scanner)

2006-05-20 Thread gentoo
Hello,

I want to use linux for dvd writing and scanning.
Both my scanner (Canon) and my dvd writer (BenQ) are usb devices.

How can I know which device files these devices use? Or how can I configure
a device file for these devices?

Thank you very much in advance,
Steffen


pseiko pseiko # lsusb
Bus 003 Device 001: ID :
Bus 002 Device 001: ID :
Bus 001 Device 009: ID 04a5:1007 Acer Peripherals Inc. (now BenQ Corp.)
Bus 001 Device 007: ID 04a9:2220 Canon, Inc.
Bus 001 Device 004: ID 0d49:7010 Maxtor
Bus 001 Device 002: ID 05e3:0606 Genesys Logic, Inc.
Bus 001 Device 001: ID :


pseiko pseiko # cat /proc/bus/usb/devices

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.16.1 ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=:02:0e.1
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.16.1 ohci_hcd
S:  Product=OHCI Host Controller
S:  SerialNumber=:02:0e.0
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 5
B:  Alloc=  0/800 us ( 0%), #Int=  1, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor= ProdID= Rev= 2.06
S:  Manufacturer=Linux 2.6.16.1 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=:02:0e.2
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0606 Rev= 7.02
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

//The scanner

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  7 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=04a9 ProdID=2220 Rev= 1.00
S:  Manufacturer=Canon
S:  Product=CanoScan
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=16ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

// I guess this is the dvd writer?

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04a5 ProdID=1007 Rev= 1.12
S:  Product=USB 2.0 Storage Device
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us


pgpdeGvFYtf9v.pgp
Description: PGP signature