Subject: Re: USB cameras and NetBSD 2.0 Beta (i386)
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: Dave Tyson <Dave.Tyson@liverpool.ac.uk>
List: current-users
Date: 04/15/2004 09:32:31
On Thu, 15 Apr 2004, Mason Loring Bliss wrote:

>On Wed, Apr 14, 2004 at 10:01:56PM +0100, Dave Tyson wrote:
>
>> I was wondering if this was an issue with a user level usb library
>> failing to access the device. I tried changing the perms on
>> /dev/ugen0.04 with no effect. Has anyone else managed to get a usb
>> camera to be recognised with gphoto2 or has some clue as to what needs
>> to be done...
>
>I use a PowerShot S200 here. I believe you want to set permissions for
>/dev/usb* in addition to /dev/ugen*.
>

Thanks to all who responded. I have located the problem - its an
unsupported usb device causing issues. I rejigged my usb devices and
plugged the camera directly into the PC rather than via a usb hub and it
just worked! (I changed the perms on usb*/ugen* so I could work as an
ordinary user)

$usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
port 1 addr 2: full speed, self powered, config 1, DeskJet 970C(0x1004), Hewlett-Packard(0x03f0), rev 1.00
port 2 addr 3: full speed, self powered, config 1, Canon Digital Camera(0x309a), Canon Inc.(0x04a9), rev 0.01

$gphoto2 -L
There are no files in folder '/'.
There are no files in folder '/DCIM'.
There are 25 files in folder '/DCIM/100CANON':
#1     IMG_0076.JPG               rd   883 KB image/jpeg
#2     IMG_0077.JPG               rd  1199 KB image/jpeg
There are no files in folder '/DCIM/CANONMSC'.
There are no files in folder '/MISC'.

Plugging the usb hub back in to the PC and the camera at the first port
on the hub:

$usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
port 1 addr 2: full speed, self powered, config 1, DeskJet 970C(0x1004), Hewlett-Packard(0x03f0), rev 1.00
port 2 addr 3: full speed, self powered, config 1, MiniHub 4000P(0x0003), Kawatsu Semiconductor(0x050f), rev 1.00
port 1 addr 4: full speed, self powered, config 1, Canon Digital Camera(0x309a), Canon Inc.(0x04a9), rev 0.01
port 2 addr 5: full speed, power 500 mA, config 1, Camera(0x0840), Logitech(0x046d), rev 1.00
port 3 addr 6: full speed, power 480 mA, config 1, product 0x0258(0x0258), vendor 0x1292(0x1292), rev 1.00
port 4 addr 7: full speed, power 100 mA, config 1, Solid state disk(0x6803), USB(0x0ea0), rev 1.00

$ gphoto2 -L
There are no files in folder '/'.
There are no files in folder '/DCIM'.
There are 25 files in folder '/DCIM/100CANON':
#1     IMG_0076.JPG               rd   883 KB image/jpeg
#2     IMG_0077.JPG               rd  1199 KB image/jpeg
There are no files in folder '/DCIM/CANONMSC'.
There are no files in folder '/MISC'.

All OK as expected. BUT changing the ordr of devices on the hub so the
camera swaps places with product 0x0258:

$usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x8086), rev 1.00
port 1 addr 2: full speed, self powered, config 1, DeskJet 970C(0x1004), Hewlett-Packard(0x03f0), rev 1.00
port 2 addr 3: full speed, self powered, config 1, MiniHub 4000P(0x0003), Kawatsu Semiconductor(0x050f), rev 1.00
port 1 addr 4: full speed, power 480 mA, config 1, product 0x0258(0x0258), vendor 0x1292(0x1292), rev 1.00
port 2 addr 5: full speed, power 500 mA, config 1, Camera(0x0840), Logitech(0x046d), rev 1.00
port 3 addr 6: full speed, self powered, config 1, Canon Digital Camera(0x309a), Canon Inc.(0x04a9), rev 0.01
port 4 addr 7: full speed, power 100 mA, config 1, Solid state disk(0x6803), USB(0x0ea0), rev 1.00

$gphoto2 -L
*** Error ***
An error occurred in the io-library ('Bad parameters'): Could not find USB device (vendor 0x4a9, product 0x309a). Make sure this device is connected to the computer.
*** Error (-2: 'Bad parameters') ***

Product 0x258 is a creative VOIP blaster. The are some patches on the
fobbit site to get this working under NetBSD - but I haven't added them
yet. It looks like the presence of this device trips up the libusb used
by gphoto2. I wonder if this happens with other unrecognised devices -
if anyone else can try this it may be helpful in locating the exact
problem.

Cheers,
Dave

--
=====================================================================
Computing Services Dept         Phone/Fax: 0151-794-3731/3759
The University of Liverpool     Email: dtyson@liv.ac.uk
Chadwick Tower, Peach Street    WWW:   http://www.liv.ac.uk/~dtyson
Liverpool L69 7ZF               Open Source O/S: www.netbsd.org
=====================================================================