Logitech C525 webcam won't work on Raspberry PI2

2015-07-17 Thread Tom Lislegaard
This is an RPI2 with a recent CURRENT snapshot, but the original RPI with
10.1-Stable give exactly the same result. The camera works without problems
on amd64 with 10.1-Stable.

tl@rpi2:~ % uname -a
FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284969: Wed Jul  8
19:50:02 CEST 2015 tl@rpi2:/usr/obj/usr/src/sys/RPI2  arm

Trying to connect the camera I get this error

usb_alloc_device: Failure selecting configuration index 0:USB_ERR_TIMEOUT,
port 4, addr 5 (ignored)

Things I have tried include disconnecting all other usb-devices, and
connect the cam via an external powered hub.

usbconfig/lsusb show the following

root@rpi2:~ # usbconfig
ugen0.1:  at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps)
pwr=SAVE (0mA)
ugen0.2:  at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (2mA)
ugen0.3:  at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON (2mA)
ugen0.4:  at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)
ugen0.5:  at usbus0, cfg=255 md=HOST spd=HIGH
(480Mbps) pwr=ON (100mA)

root@rpi2:~ # lsusb -d 046d: -vvv

Bus /dev/usb Device /dev/ugen0.5: ID 046d:0826 Logitech, Inc.
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  239 Miscellaneous Device
  bDeviceSubClass 2 ?
  bDeviceProtocol 1 Interface Association
  bMaxPacketSize064
  idVendor   0x046d Logitech, Inc.
  idProduct  0x0826
  bcdDevice0.10
  iManufacturer   0
  iProduct2 HD Webcam C525
  iSerial 1 045B8DA0
  bNumConfigurations  1
Device Qualifier (for other device speed):
  bLength10
  bDescriptorType 6
  bcdUSB   2.00
  bDeviceClass  239 Miscellaneous Device
  bDeviceSubClass 2 ?
  bDeviceProtocol 1 Interface Association
  bMaxPacketSize064
  bNumConfigurations  1
can't get debug descriptor: Input/output error
Device Status: 0x
  (Bus Powered)


I'd be grateful for any tips or trick you might share to make this webcam
work.
(please CC me on any reply as I'm not subscribed to the list)

Added below is the full dmesg output in case it's useful.

-tom


root@rpi2:~ # dmesg
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2015 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r284969: Wed Jul  8 19:50:02 CEST 2015
tl@rpi2:/usr/obj/usr/src/sys/RPI2 arm
FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525
VT: init without driver.
sema_sysinit
CPU: Cortex A7 rev 5 (Cortex-A core)
 Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
 WB disabled EABT branch prediction enabled
LoUU:2 LoC:3 LoUIS:2
Cache level 1:
 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
Cache level 2:
 512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory  = 989851648 (943 MB)
avail memory = 958423040 (914 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: 
simplebus0:  mem 0x3f00-0x3fff on
ofwbus0
bcm28360: 
generic_timer0:  irq 72,73,75,74 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 1920 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 1920 Hz quality 1000
intc0:  mem 0xb200-0xb3ff on simplebus0
bcmwd0:  mem 0x10001c-0x100027 on simplebus0
gpio0:  mem 0x20-0x2000af irq 57,59,58,60
on simplebus0
gpio0: read-only pins: 46,48-53.
gpio0: reserved pins: 48-53.
gpiobus0:  on gpio0
gpioled0:  at pin(s) 35 on gpiobus0
gpioled1:  at pin(s) 47 on gpiobus0
gpioc0:  on gpio0
iichb0:  mem 0x205000-0x20501f irq 61 on
simplebus0
iicbus0:  on iichb0
iic0:  on iicbus0
iichb1:  mem 0x804000-0x80401f irq 61 on
simplebus0
iicbus1:  on iichb1
iic1:  on iicbus1
spi0:  mem 0x204000-0x20401f irq 62 on
simplebus0
spibus0:  on spi0
bcm_dma0:  mem 0x7000-0x7fff,0xe05000-0xe05fff irq
24,25,26,27,28,29,30,31,32,33,34,35,36 on simplebus0
mbox0:  mem 0xb880-0xb8bf irq 1 on simplebus0
sdhci_bcm0:  mem 0x30-0x3000ff irq 70
on simplebus0
mmc0:  on sdhci_bcm0
uart0:  mem 0x201000-0x201fff irq 65 on simplebus0
uart0: console (115200,n,8,1)
vchiq0:  mem 0xb800-0xb84f irq 2 on simplebus0
vchiq0: [GIANT-LOCKED]
vchiq: local ver 6 (min 3), remote ver 6.
pcm0:  on vchiq0
bcm283x_dwcotg0:  mem
0x98-0x99 irq 17 on simplebus0
usbus0 on bcm283x_dwcotg0
cpulist0:  on ofwbus0
cpu0:  on cpulist0
bcm2835_cpufreq0:  on cpu0
cpu1:  on cpulist0
cpu2:  on cpulist0
cpu3:  on cpulist0
fb0:  on ofwbus0
fbd0 on fb0
VT: initialize with new VT driver "fb".
fb0: 1824x984(1824x984@0,0) 24bpp
fb0: fbswap: 1, pitch 5472, base 0x3d359000, screen_size 5428224
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
ugen0.1:  at 

Re: Logitech C525 webcam won't work on Raspberry PI2

2015-07-19 Thread Tom Lislegaard
On Sat, Jul 18, 2015 at 11:24 PM, Hans Petter Selasky  wrote:
> On 07/17/15 21:28, Tom Lislegaard wrote:
>>
>> This is an RPI2 with a recent CURRENT snapshot, but the original RPI with
>> 10.1-Stable give exactly the same result. The camera works without
>> problems
>> on amd64 with 10.1-Stable.
>>
>> tl@rpi2:~ % uname -a
>> FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284969: Wed Jul  8
>> 19:50:02 CEST 2015 tl@rpi2:/usr/obj/usr/src/sys/RPI2  arm
>>
>> Trying to connect the camera I get this error
>>
>> usb_alloc_device: Failure selecting configuration index 0:USB_ERR_TIMEOUT,
>> port 4, addr 5 (ignored)
>>
>> Things I have tried include disconnecting all other usb-devices, and
>> connect the cam via an external powered hub.
>>
>> usbconfig/lsusb show the following
>
>
> If you run:
>
> usbconfig -d X.Y set_config 0
>
> Does it work?

set_config 0 does not help. No errors messages, but usbconfig still
report "cfg=255" for the device

>
> Have you tried other webcams? Might be a timing issue at USB transaction
> level, because the USB controller in the RPI is driven mostly by software,
> while on the PC side by hardware.
>

I tried a different Logitech (very old, reported as model "Quickcam E
3500") which is recognized fine

> If you update the RPI2 kernel to the latest as of today - any difference?
>

I've updated to CURRENT revision r285693M. It did not help as I get
exactly the same error.

> My Logitech webcam enumerates just fine.

Is this a current model?
I may look at an alternative to the C525, but unfortunately the E3500
is truly a piece of crap and inadequate for my intended use. My
requirement is reasonable quality stills, streaming video is not
important.

-tom

>
> --HPS
>
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Logitech C525 webcam won't work on Raspberry PI2

2015-07-20 Thread Tom Lislegaard
On Mon, Jul 20, 2015 at 9:59 AM, Hans Petter Selasky  wrote:
> Hi,
>
> On 07/20/15 01:41, Tom Lislegaard wrote:
>>
>> Is this a current model?
>> I may look at an alternative to the C525, but unfortunately the E3500
>> is truly a piece of crap and inadequate for my intended use. My
>> requirement is reasonable quality stills, streaming video is not
>> important.
>
>
> Do you have an USB analyzer which can record the USB traffic? Else if it is
> important to you, maybe you can ship me such a webcam and I can analyze it
> for you?
>
> --HPS

I have no analyzer - and nowhere near the knowledge to use one :-)

If you PM me your address I'll take you up on the offer to check it out.

thanks
-tom
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"


Re: Logitech C525 webcam won't work on Raspberry PI2

2015-08-05 Thread Tom Lislegaard
On Tue, Jul 28, 2015 at 9:38 AM, Hans Petter Selasky  wrote:
> On 07/20/15 11:29, Tom Lislegaard wrote:
>>
>> On Mon, Jul 20, 2015 at 9:59 AM, Hans Petter Selasky 
>> wrote:
>>>
>>> Hi,
>>>
>>> On 07/20/15 01:41, Tom Lislegaard wrote:
>>>>
>>>>
>>>> Is this a current model?
>>>> I may look at an alternative to the C525, but unfortunately the E3500
>>>> is truly a piece of crap and inadequate for my intended use. My
>>>> requirement is reasonable quality stills, streaming video is not
>>>> important.
>>>
>>>
>>>
>>> Do you have an USB analyzer which can record the USB traffic? Else if it
>>> is
>>> important to you, maybe you can ship me such a webcam and I can analyze
>>> it
>>> for you?
>>>
>>> --HPS
>>
>>
>> I have no analyzer - and nowhere near the knowledge to use one :-)
>>
>> If you PM me your address I'll take you up on the offer to check it out.
>>
>> thanks
>> -tom
>>
>
> Hi,
>
> Can you try this:
>
> https://svnweb.freebsd.org/changeset/base/285935
>
> --HPS

With the patch the camera is detected correctly, and webcamd starts
and creates the /dev/video0 device.

root@rpi2:~ # usbconfig
ugen0.1:  at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (0mA)
ugen0.2:  at usbus0, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=SAVE (2mA)
ugen0.3:  at usbus0, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=ON (2mA)
ugen0.4: <11n Adapter D-Link> at usbus0, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON (450mA)
ugen0.5:  at usbus0, cfg=0 md=HOST
spd=HIGH (480Mbps) pwr=ON (500mA)


root@rpi2:~ # pgrep -lf webcamd
28483 /usr/local/sbin/webcamd -i 0 -d ugen0.5 -B -U webcamd -G webcamd -H


I still can't read anything off the camera though with pwcview

root@rpi2:~ # pwcview -h -c 1 -d /dev/video0 -o x.jpg
Webcam set to: 320x240 (sif) at 5 fps
libv4l2: error turning on stream: Device not configured
libv4l2: error reading: Invalid argument
Error reading from webcam: Invalid argument

Am I overlooking something obvious?

-tom
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"