# What's needed for a usb cammera?

## MighMoS

I've got an (older) logitech quickcam travler that I wish to use with linux kernel 2.6.  I'm running udev, and so far, nothing pops up.  dmesg says the following:

```
usb 2-1: USB disconnect, address 4

usb 2-1: new full speed USB device using address 5

usb 2-1: USB disconnect, address 5
```

  The numbers increase by one each time (address numbers).  Do I need video for linux, or something else?  Also, any programs to get images off the camera would prove useful, unless I just mount it.  My .config file is at http://mighmos.hopto.org/~adam/KernelConfig .

----------

## NeddySeagoon

MighMoS,

You need 4 things

1. The kernel driver for your motherboard USB hardware

2. Video For Linux available to the kernel

3. The kernel module  for your camera (if its a webcam)

4. An application like xawtv to see the pictures from the camera.

If you already have other USB 1.1 devices working, then you have already done item 1.

To identify the correct kernel module for you camera, please post the Vendor ID and Product ID which you can get from usbview.

When all this is in place you can run 

```
xawtv -c /dev/v4l/video0
```

to see  the picture.

----------

## MighMoS

Thank you, I'm gonna try to get it to work now!

----------

## Razzle

I also have some problems getting my webcam (Terracam USB Pro) working.

The green LED never lights up..

How can I find out if the usb device was detected?

I think I have all required options for USB enabled in my kernel config..(here's grep -i usb .config) Maybe I missed some option?

Also I read that I need the ov511 module for this cam. 

lsmod says it's loaded, dmesg doesn't report errors (dmesg | grep -i usb).

----------

## NeddySeagoon

Razzle,

I would turn off 

```
CONFIG_USB_DEBUG=y
```

soon. It will fill you logs.

If your camera is detected you will have a device for it in /dev/v4l/. Since you built the kernel driver as a module, lsmod should show it if its loaded. If not, modprobe ov511. Is the device there now?

You did include Video For Linux too?

If you can't get anything in /dev/v4l/ post the Vendor ID and Product ID for your camera. You get that from usbview.

----------

## Razzle

yes, it seems to be loaded:

```

Module                  Size  Used by

sg                     35360  0 

ov511                  81180  0 

videodev               10240  1 ov511

v4l2_common             6272  0 

v4l1_compat            13124  0 

fglrx                 207500  7 

supermount             94676  0 

nls_cp437               5632  1 

smbfs                  67512  0 

```

But /dev/v4l does not exist. I am sure I included v4l support and there are two v4l modules loaded (see above).

usbview only has this listed:

```

EHCI Host Controller

Manufacturer: Linux 2.6.3-gentoo-r2 ehci_hcd

Serial Number: 

Speed: 480Mb/s (high)

Number of Ports: 6

Bandwidth allocated: 0 / 800 (0%)

Total number of interrupt requests: 0

Total number of isochronous requests: 0

USB Version:  2.00

Device Class: 09(hub  )

Device Subclass: 00

Device Protocol: 01

Maximum Default Endpoint Size: 8

Number of Configurations: 1

Config Number: 1

   Number of Interfaces: 1

   Attributes: 40

   MaxPower Needed:   0mA

   Interface Number: 0

      Name: hub

      Alternate Number: 0

      Class: 09(hub  ) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 3

         Type: Int.

         Max Packet Size: 2

         Interval: 256ms

```

----------

## NeddySeagoon

Razzle,

You have the wrong USB hardware driver loaded for your motherboard. EHCI is for USB 2.0 but you also need either UHCI or OHCI depending on your hardware.

Look through dmesg for a line like  *Quote:*   

> ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

 

which means I have OHCI USB 1.1.

Can can build both the UHCI and OHCI drivers as modules and let the kerenl sort out the mess. If you want to do a 'built in' you much choose only the right one.

----------

## MighMoS

Ar, I got it close to working, but not quite yet.  The ov511 driver doesn't work, and when I plug it in, I get:

```
Warning:  invalid config descriptor

Warning:  invalid config descriptor

... no modules for USB product 46d/890/90

... no modules for USB product 46d/890/90

... no modules for USB product 46d/890/90
```

...Its a logitech quickcam, but I haven't found any useful help on google..

----------

## Razzle

 *NeddySeagoon wrote:*   

> Razzle,
> 
> You have the wrong USB hardware driver loaded for your motherboard. EHCI is for USB 2.0 but you also need either UHCI or OHCI depending on your hardware.
> 
> Look through dmesg for a line like  *Quote:*   ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI) 
> ...

 

Thank you, that fixed it! xawtv works now but vidcat returns an error:

root@ichigo razzle # vidcat    

VIDIOCMCAPTURE: Invalid argument

args: width=320 height=240 palette=4

Error: Can't get image

To make /dev/video available to other users I just have to chown it, right?

----------

## MighMoS

Chgrp video.  Adjust permissions accordingly.

----------

## NeddySeagoon

Razzle,

Changiner permissions should work but is not reccomended.

You should find the /dev/v4l/video0 belongs to the video group.

Add users that are to be granted access too this device to the video group in /etc/group.

Messing with the permissions on /dev/video will get you nowhere. Its a symbolic link to /dev/v4l/video0 and permissions on symbolic links are never checked.

----------

## MighMoS

Does anyone have any advice for me getting 

```
Warning:  invalid config descriptor

Warning:  invalid config descriptor

... no modules for USB product 46d/890/90

... no modules for USB product 46d/890/90

... no modules for USB product 46d/890/90
```

?

----------

## NeddySeagoon

MighMoS,

Get usbview and post whatever that says about the device.

Tell us what the device is and if its USB 1.1 or USB 2.0.

Knowing which modules you have loaded (lsmod) would be useful too.

----------

## MighMoS

```
Unknown Device

Speed: 12Mb/s (full)

USB Version:  1.00

Device Class: 00(>ifc )

Device Subclass: 00

Device Protocol: 00

Maximum Default Endpoint Size: 8

Number of Configurations: 1

Vendor Id: 046d

Product Id: 0890

Revision Number:  0.90

Config Number: 1

   Number of Interfaces: 3

   Attributes: 80

   MaxPower Needed: 500mA

   Interface Number: 0

      Name: (none)

      Alternate Number: 0

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 0

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 1

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 128

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 2

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 384

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 3

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 512

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 4

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 640

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 5

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 768

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 6

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 896

         Interval: 1ms

   Interface Number: 0

      Name: (none)

      Alternate Number: 7

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 81

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 1023

         Interval: 1ms

   Interface Number: 1

      Name: (none)

      Alternate Number: 0

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 3

         Endpoint Address: 82

         Direction: in

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

         Endpoint Address: 03

         Direction: out

         Attribute: 2

         Type: Bulk

         Max Packet Size: 64

         Interval: 0ms

         Endpoint Address: 84

         Direction: in

         Attribute: 3

         Type: Int.

         Max Packet Size: 1

         Interval: 8ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 0

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 0

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 1

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 16

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 2

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 32

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 3

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 48

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 4

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 64

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 5

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 80

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 6

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 96

         Interval: 1ms

   Interface Number: 2

      Name: (none)

      Alternate Number: 7

      Class: ff(vend.) 

      Sub Class: 0

      Protocol: 0

      Number of Endpoints: 1

         Endpoint Address: 85

         Direction: in

         Attribute: 1

         Type: Isoc

         Max Packet Size: 128

         Interval: 1ms
```

----------

## NeddySeagoon

MighMoS,

That's a Logitech QuickCam/Digital Camera combined.

Which bit are you trying to get working, the web cam or digital camera or both?

It may be worth trying gphoto2 if the digital camera is in PTP mode or usb-storage if it not

You could try the logitech kernel drivers for other webcams but you will need to pass module parameters for  Vendor Id: 0x046d

Product Id: 0x0890.

Modules will vary on the parameters the take. Use /sbin/modinfo <module_name> to find out. I believe this will only work if you build the modules as modules.

If you don't find anything that works, you need a new or modified kernel module.

----------

## MighMoS

I'm really just trying to get the webcam part working, but both would be nice.  I hate to keep comming to you for help, but where are the logitech drivers I need?

----------

## NeddySeagoon

MighMoS,

There aren't any. Thats why I was suggesting you try what there is.

You can contribute your findings for others or even write a kernel module for your camera.

----------

