On Tue, Sep 18, 2001, Lane Gearle Brooks <[EMAIL PROTECTED]> wrote:
> I am a hardware engineer at a startup digital camera company, and 
> we are due to release our first digital camera sometime this winter.
> In my spare time I started working on a usb driver in linux for our
> camera, but I have run into some problems (I am an avid linux user,
> but am a newbie and kernal and driver development).
> 
> Our camera uses bulk endpoints for communication, and in poking our
> the usb stuff, I noticed the dc2xx driver is a generic bulk end point
> driver.  So I thought I would start by compiling the dc2xx driver
> with our vendor and product id included and try it out, but after
> doing that I cannot get the usb core to assign the dc2xx driver
> to our camera (even though it says that it registers the dc2xx
> driver).  Any ideas on why?  I am included the debug output showing
> what happens.  (I am using kernel 2.4.3).
> 
> 
> kernel: hub.c: USB new device connect on bus1/1, assigned device number 2
> kernel: Manufacturer: SMaL Camera Technologies
> kernel: Product: Digital Camera
> kernel: usb.c: USB device 2 (vend/prod 0xdca/0xc) is not claimed by any active 
>driver.
> kernel:   Length              = 18
> kernel:   DescriptorType      = 01
> kernel:   USB version         = 1.00
> kernel:   Vendor:Product      = 0dca:000c
> kernel:   MaxPacketSize0      = 64
> kernel:   NumConfigurations   = 1
> kernel:   Device version      = 0.00
> kernel:   Device Class:SubClass:Protocol = 00:00:00
> kernel:     Per-interface classes
> kernel: Configuration:
> kernel:   bLength             =    9
> kernel:   bDescriptorType     =   02
> /sbin/hotplug: arguments (usb) env (PWD=/etc/hotplug DEVICE=/proc/bus/usb/001/002 
>INTERFACE=6/1/1 ACTION=add DEBUG=kernel MACHTYPE=i386-redhat-linux-gnu OLDPWD=/ 
>DEVFS=/proc/bus/usb TYPE=0/0/0 SHLVL=1 SHELL=/bin/bash HOSTTYPE=i386 OSTYPE=linux-gnu 
>HOME=/ TERM=dumb PRODUCT=dca/c/0 _=/usr/bin/env)
> kernel:   wTotalLength        = 0020
> /sbin/hotplug: invoke /etc/hotplug/usb.agent
> kernel:   bNumInterfaces      =   01
> kernel:   bConfigurationValue =   01
> kernel:   iConfiguration      =   03
> kernel:   bmAttributes        =   c0
> kernel:   MaxPower            =  100mA
> kernel: 
> kernel:   Interface: 0
> kernel:   Alternate Setting:  0
> kernel:     bLength             =    9
> kernel:     bDescriptorType     =   04
> kernel:     bInterfaceNumber    =   00
> kernel:     bAlternateSetting   =   00
> kernel:     bNumEndpoints       =   02
> kernel:     bInterface Class:SubClass:Protocol =   06:01:01
> kernel:     iInterface          =   00
> kernel:     Endpoint:
> kernel:       bLength             =    7
> kernel:       bDescriptorType     =   05
> kernel:       bEndpointAddress    =   81 (in)
> kernel:       bmAttributes        =   02 (Bulk)
> kernel:       wMaxPacketSize      = 0040
> kernel:       bInterval           =   00
> kernel:     Endpoint:
> kernel:       bLength             =    7
> kernel:       bDescriptorType     =   05
> kernel:       bEndpointAddress    =   01 (out)
> kernel:       bmAttributes        =   02 (Bulk)
> kernel:       wMaxPacketSize      = 0010
> kernel:       bInterval           =   00
> /etc/hotplug/usb.agent: Modprobe and setup dc2xx dc2xx for USB product dca/c/0
> kernel: usb.c: registered new driver dc2xx
> 
> 
> 
> Then when I more /proc/bus/usb/devices, I get:
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
> D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=0dca ProdID=000c Rev= 0.00
> S:  Manufacturer=SMaL Camera Technologies
> S:  Product=Digital Camera
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=06(unk. ) Sub=01 Prot=01 Driver=(none)
> E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms
> E:  Ad=01(O) Atr=02(Bulk) MxPS=  16 Ivl=  0ms
> .

It's probably because of this code:

        /* models differ in how they report themselves */
        interface = &dev->actconfig->interface[ifnum].altsetting[0];
        if ((interface->bInterfaceClass != USB_CLASS_PER_INTERFACE
                && interface->bInterfaceClass != USB_CLASS_VENDOR_SPEC)
                        || interface->bInterfaceSubClass != 0
                        || interface->bInterfaceProtocol != 0
                        || interface->bNumEndpoints != 2
                        ) {
                dbg ("Bogus camera interface info");
                return NULL;
        }

The interface class/subclass/protocol wouldn't match.

Aside from the minor code problems, you probably shouldn't be using a
kernel driver anyway. Take a look at gphoto2 to see how it supports all
of the cameras via USB.

What is Class 6 anyway? I haven't seen that yet.

JE


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to