Webcam programs working with webcamd in FreeBSD

I am using FreeBSD version 8.1 (AMD64)

I installed V4l_compat, libv4l and webcamd.

I have checked to make sure that those software applications were installed correctly.

I have loaded webcamd_enable in /etc/rc.conf

I have also loaded the cuse4bsd in /boot/loader.conf

I have tried 3 different web cams and none of them are capable of rending streaming content.

I have looked at /var/log/messages and see no record of my device pluging in my web cam either. It does indicate or show a USB memory stick
 
# usbconfig dump_device_desc dump_curr_config_desc
Code:
ugen0.1: <OHCI root HUB ATI> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0100 
  bDeviceClass = 0x0009 
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0000 
  idProduct = 0x0000 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  <ATI>
  iProduct = 0x0002  <OHCI root HUB>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001 


 Configuration index 0
 
Hello.

I'm using PC-BSD 8.1 on laptop Lenovo G530. webcamd-0.1.14 is preinstalled. It detects my webcam as /dev/ugen7.2. But Skype reports the webcam is not detected and pwcview command gives me

Code:
[const@alpha] /dev# pwcview
Failed to set palette to YUV420P: Invalid argument
and usbconfig
Code:
[const@alpha] /dev# usbconfig dump_device_desc dump_curr_config_desc
ugen7.2: <Lenovo EasyCamera Image Processor> at usbus7, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ef 
  bDeviceSubClass = 0x0002 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x090c 
  idProduct = 0x3371 
  bcdDevice = 0x2171 
  iManufacturer = 0x0001  <Image Processor>
  iProduct = 0x0002  <Lenovo EasyCamera>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001 


 Configuration index 0

    bLength = 0x0009 
    bDescriptorType = 0x0002 
    wTotalLength = 0x01b7 
    bNumInterfaces = 0x0002 
    bConfigurationValue = 0x0001 
    iConfiguration = 0x0000  <no string>
    bmAttributes = 0x0080 
    bMaxPower = 0x00fa 

    Additional Descriptor

    bLength = 0x08
    bDescriptorType = 0x0b
    bDescriptorSubType = 0x00
     RAW dump: 
     0x00 | 0x08, 0x0b, 0x00, 0x02, 0x0e, 0x03, 0x00, 0x00


    Interface 0
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0000 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0001 
      bInterfaceClass = 0x000e 
      bInterfaceSubClass = 0x0001 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x0d
      bDescriptorType = 0x24
      bDescriptorSubType = 0x01
       RAW dump: 
       0x00 | 0x0d, 0x24, 0x01, 0x00, 0x01, 0x4d, 0x00, 0x80, 
       0x08 | 0xc3, 0xc9, 0x01, 0x01, 0x01


      Additional Descriptor

      bLength = 0x12
      bDescriptorType = 0x24
      bDescriptorSubType = 0x02
       RAW dump: 
       0x00 | 0x12, 0x24, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 
       0x08 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 
       0x10 | 0x00, 0x00


      Additional Descriptor

      bLength = 0x1a
      bDescriptorType = 0x24
      bDescriptorSubType = 0x06
       RAW dump: 
       0x00 | 0x1a, 0x24, 0x06, 0x02, 0x92, 0x42, 0x39, 0x46, 
       0x08 | 0xd1, 0x0c, 0xe3, 0x4a, 0x87, 0x83, 0x31, 0x33, 
       0x10 | 0xf9, 0xea, 0xaa, 0x3b, 0x03, 0x01, 0x01, 0x01, 
       0x18 | 0xff, 0x00


      Additional Descriptor

      bLength = 0x0b
      bDescriptorType = 0x24
      bDescriptorSubType = 0x05
       RAW dump: 
       0x00 | 0x0b, 0x24, 0x05, 0x03, 0x02, 0x00, 0x00, 0x02, 
       0x08 | 0x7f, 0x17, 0x00


      Additional Descriptor

      bLength = 0x09
      bDescriptorType = 0x24
      bDescriptorSubType = 0x03
       RAW dump: 
       0x00 | 0x09, 0x24, 0x03, 0x04, 0x01, 0x01, 0x00, 0x03, 
       0x08 | 0x00

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0083  <IN>
        bmAttributes = 0x0003  <INTERRUPT>
        wMaxPacketSize = 0x0008 
        bInterval = 0x0010 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 

      Additional Descriptor

      bLength = 0x05
      bDescriptorType = 0x25
      bDescriptorSubType = 0x03
       RAW dump: 
       0x00 | 0x05, 0x25, 0x03, 0x08, 0x00



    Interface 1
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0000 
      bNumEndpoints = 0x0000 
      bInterfaceClass = 0x000e 
      bInterfaceSubClass = 0x0002 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

      Additional Descriptor

      bLength = 0x0e
      bDescriptorType = 0x24
      bDescriptorSubType = 0x01
       RAW dump: 
       0x00 | 0x0e, 0x24, 0x01, 0x01, 0xfb, 0x00, 0x81, 0x00, 
       0x08 | 0x04, 0x01, 0x00, 0x00, 0x01, 0x00


      Additional Descriptor

      bLength = 0x1b
      bDescriptorType = 0x24
      bDescriptorSubType = 0x04
       RAW dump: 
       0x00 | 0x1b, 0x24, 0x04, 0x01, 0x05, 0x59, 0x55, 0x59, 
       0x08 | 0x32, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 
       0x10 | 0xaa, 0x00, 0x38, 0x9b, 0x71, 0x10, 0x01, 0x00, 
       0x18 | 0x00, 0x00, 0x00


      Additional Descriptor

      bLength = 0x2a
      bDescriptorType = 0x24
      bDescriptorSubType = 0x05
       RAW dump: 
       0x00 | 0x2a, 0x24, 0x05, 0x01, 0x01, 0x80, 0x02, 0xe0, 
       0x08 | 0x01, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d, 
       0x10 | 0x00, 0x00, 0x60, 0x09, 0x00, 0x9a, 0x5b, 0x06, 
       0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c, 
       0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c, 
       0x28 | 0x0a, 0x00


      Additional Descriptor

      bLength = 0x2a
      bDescriptorType = 0x24
      bDescriptorSubType = 0x05
       RAW dump: 
       0x00 | 0x2a, 0x24, 0x05, 0x02, 0x01, 0x60, 0x01, 0x20, 
       0x08 | 0x01, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d, 
       0x10 | 0x00, 0x00, 0x18, 0x03, 0x00, 0x9a, 0x5b, 0x06, 
       0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c, 
       0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c, 
       0x28 | 0x0a, 0x00


      Additional Descriptor

      bLength = 0x2a
      bDescriptorType = 0x24
      bDescriptorSubType = 0x05
       RAW dump: 
       0x00 | 0x2a, 0x24, 0x05, 0x03, 0x01, 0x40, 0x01, 0xf0, 
       0x08 | 0x00, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d, 
       0x10 | 0x00, 0x00, 0x58, 0x02, 0x00, 0x9a, 0x5b, 0x06, 
       0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c, 
       0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c, 
       0x28 | 0x0a, 0x00


      Additional Descriptor

      bLength = 0x2a
      bDescriptorType = 0x24
      bDescriptorSubType = 0x05
       RAW dump: 
       0x00 | 0x2a, 0x24, 0x05, 0x04, 0x01, 0xb0, 0x00, 0x90, 
       0x08 | 0x00, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d, 
       0x10 | 0x00, 0x00, 0xc6, 0x00, 0x00, 0x9a, 0x5b, 0x06, 
       0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c, 
       0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c, 
       0x28 | 0x0a, 0x00


      Additional Descriptor

      bLength = 0x2a
      bDescriptorType = 0x24
      bDescriptorSubType = 0x05
       RAW dump: 
       0x00 | 0x2a, 0x24, 0x05, 0x05, 0x01, 0xa0, 0x00, 0x78, 
       0x08 | 0x00, 0x00, 0xec, 0x0d, 0x00, 0x00, 0xec, 0x0d, 
       0x10 | 0x00, 0x00, 0x96, 0x00, 0x00, 0x9a, 0x5b, 0x06, 
       0x18 | 0x00, 0x04, 0x9a, 0x5b, 0x06, 0x00, 0x2a, 0x2c, 
       0x20 | 0x0a, 0x00, 0x2b, 0x2c, 0x0a, 0x00, 0x2c, 0x2c, 
       0x28 | 0x0a, 0x00



    Interface 1 Alt 1
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0001 
      bNumEndpoints = 0x0001 
      bInterfaceClass = 0x000e 
      bInterfaceSubClass = 0x0002 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0005  <ASYNC-ISOCHRONOUS>
        wMaxPacketSize = 0x1400 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 


    Interface 1 Alt 2
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0002 
      bNumEndpoints = 0x0001 
      bInterfaceClass = 0x000e 
      bInterfaceSubClass = 0x0002 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0005  <ASYNC-ISOCHRONOUS>
        wMaxPacketSize = 0x1340 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 


    Interface 1 Alt 3
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0003 
      bNumEndpoints = 0x0001 
      bInterfaceClass = 0x000e 
      bInterfaceSubClass = 0x0002 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0005  <ASYNC-ISOCHRONOUS>
        wMaxPacketSize = 0x1300 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000 


    Interface 1 Alt 4
      bLength = 0x0009 
      bDescriptorType = 0x0004 
      bInterfaceNumber = 0x0001 
      bAlternateSetting = 0x0004 
      bNumEndpoints = 0x0001 
      bInterfaceClass = 0x000e 
      bInterfaceSubClass = 0x0002 
      bInterfaceProtocol = 0x0000 
      iInterface = 0x0000  <no string>

     Endpoint 0
        bLength = 0x0007 
        bDescriptorType = 0x0005 
        bEndpointAddress = 0x0081  <IN>
        bmAttributes = 0x0005  <ASYNC-ISOCHRONOUS>
        wMaxPacketSize = 0x12c0 
        bInterval = 0x0001 
        bRefresh = 0x0000 
        bSynchAddress = 0x0000
What does this error mean and is it possible to make this webcam work?

Thank you.
 
I installed webcamd, loaded cuse4bsd module. My webcam is ugen7.2. However when I run webcamd -d ugen7.2 -i 0 -v 0 it displays

Code:
Attached ugen7.2[0] to cuse unit 0
Creating /dev/video0

and stops at it. The video0 device in /dev is created, but after waiting for an hour for webcamd to finish, I just stopped it with CTRL+C. Is there something wrong, or my camera is unsupported? I have Logitech C310, it's UVC-enabled, works on Debian stable OOTB.
 
I am confused, witch driver's I have to load, pwc and cuse4bsd, only pwc, webcamd and cuse4bsd?
Mr zeiz, I will upload a tarball for both linux compat and skype, the sound work perfect for me and I am working on to make video work, just be patient.
 
Now I understand, loading pwc doesn't work with my webcam so switch to webcamd, /dev/video0 is appear but when open it I get green screen, any suggestions.
Code:
Webcam set to: 640x480 (vga) at 5 fps
Warning short read, got only 18349 of 460800 bytes
.
.
.
Warning short read, got only 19101 of 460800 bytes
^CError reading from webcam: Device not configured
 
I suggest that you use a lower resolution for pwcview to work properly. It seems pwcview can't handle too many resolutions. For cheese, things get better.
 
Hello everyone.
I am trying to get a Logitech C160 webcam working on webcamd, to use it with motion software, but I smell unsupported hardware.

I have also the hunch that webcamd won't work on usb 2.0 ports ( I have no 1.1 ports on the box... dang ).

Said webcam is UVC-supported as in this page of the Logitech support forums ( http://logitech-en-amr.custhelp.com/app/answers/detail/a_id/6471 ) so I guess it should be supported by webcamd.
After I did everything that has been suggested in this thread, I still can't get it working.

anyway, the box is headless, so pwcview -h:
Code:
pwcview -h
yields
Code:
Failed to set palette to YUV420P: Invalid argument
so I tried with a lower res:
Code:
pwcview -s sqcif -h
but:
Code:
Failed to set palette to YUV420P: Invalid argument

Code:
usbconfig dump_device_desc dump_curr_config_desc
Code:
ugen2.2: <product 0x0824 vendor 0x046d> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ef 
  bDeviceSubClass = 0x0002 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x046d 
  idProduct = 0x0824 
  bcdDevice = 0x0010 
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0002  <340253A0>
  bNumConfigurations = 0x0001
So it's definitely a video device.
I could not find a list of supported hardware with webcamd. Anyway motion says:

Code:
motion: [1] v4l_start: set input [8]
motion: [1] Retrying until successful connection with camera

Code:
webcamd -d ugen2.2 -i 0 -v 0 -B
Code:
Attached ugen2.2[0] to cuse unit 0
Creating /dev/video0

Code:
ls -l /dev/video0
crw-rw-rw- 1 root operator 0, 85 Mar 23 20:49 /dev/video0

Code:
ls /var/db/pkg | grep v4l
Code:
libv4l-0.8.1
v4l_compat-1.0.20101027_1



Any ideas? I guess my cam is not supported.

Thanks in advance to everyone.
 
Unfortunately, I can't offer much in the way of advice. I do have a uvc webcam. webcamd does allow me to use some applications (mplayer, vlc, emesene) but, even so, motion errors out for me :)

Adam
 
Update: I managed to re-install and re-compile motion with pwc support, re-compile pwc to the latest version, but I still can't figure why I have no /dev/video0. Driver is loaded correctly, and when I plug/unplug the webcam, dmesg reports:

Code:
ugen2.2: <vendor 0x046d> at usbus2 (disconnected)
ugen2.2: <vendor 0x046d> at usbus2

The system sees the hardware. At least it's something :) I want to try to create /dev/video0 manually since motion's log says that it can't access the device file.

Code:
mknod /dev/video0 c 81 0 root:wheel
returns
Code:
mknod: /dev/video0: No such file or directory
The man page says that mknod is deprecated since 6.0, what should I use to create manually the device? Devfs?
 
According to your first post, you do have a /dev/video0. It's created when webcamd attaches to the device.

Adam
 
Back
Top