Re: webcamd quirkyness
On Wednesday 30 March 2011 23:30:32 J.R. Oldroyd wrote: I'm playing with a built-in webcam here, a Sonix Technology Co CNF9055 with usb-ID 04f2:b1d6. This ID isn't listed in the webcamd man pages, but the camera does work... sort of. If I run webcamd in the foreground, about 7-8 times out of 10, I get: Hi, # /usr/local/sbin/webcamd -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit 0 Creating /dev/video0 Compile the webcamd port with debugging option set. Then use the -s and -m options to enable debugging in the various drivers. And the video works. Cool! But sometimes, about 25% of the time, it hangs at: # /usr/local/sbin/webcamd -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit 0 with no creation of the video device. Probably some USB request is hanging. If I run it in the background, it fails 100% of the time: # /usr/local/sbin/webcamd -B -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit -1 # which also means it fails to start if webcamd is started from its rc.d script at boot time. Webcamd version is 0.1.23, cuse is 0.1.13. System is 8.2-release amd64. ugen3.3: CNF9055 Sonix Technology Co., Ltd. at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x04f2 idProduct = 0xb1d6 bcdDevice = 0x2613 iManufacturer = 0x0002 Sonix Technology Co., Ltd. iProduct = 0x0001 CNF9055 iSerialNumber = 0x no string bNumConfigurations = 0x0001 What other info can I provide to debug this? -jr --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: webcamd quirkyness
On Thursday 31 March 2011 09:26:14 Hans Petter Selasky wrote: On Wednesday 30 March 2011 23:30:32 J.R. Oldroyd wrote: I'm playing with a built-in webcam here, a Sonix Technology Co CNF9055 with usb-ID 04f2:b1d6. This ID isn't listed in the webcamd man pages, but the camera does work... sort of. If I run webcamd in the foreground, about 7-8 times out of 10, I get: Hi, # /usr/local/sbin/webcamd -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit 0 Creating /dev/video0 Also try to set the: sysctl hw.usb.ehci.no_hs=1 Before plugging the device. Does it work better? --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: webcamd quirkyness
On Thursday 31 March 2011 15:25:12 J.R. Oldroyd wrote: # ./webcamd -d 3.3 -i 0 -m uvc_driver.trace=0x -B .. same trace as above, until: lirc_dev: IR Remote Control driver registered, major 13 Attached ugen3.3[0] to cuse unit -1 # Try removing the -i 0 option. Does that help? --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: webcamd quirkyness
^C # ./webcamd -d 3.3 -i 0 -m uvc_driver.trace=0x -B .. same trace as above, until: lirc_dev: IR Remote Control driver registered, major 13 Attached ugen3.3[0] to cuse unit -1 # Try to compile webcamd without debugging. Then run it from gdb. Press CTRL+C to break back into gdb when it hangs. Dump backtrace from all threads. --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: webcamd quirkyness
On Thu, 31 Mar 2011 15:34:12 +0200, Hans Petter Selasky hsela...@c2i.net wrote: ^C # ./webcamd -d 3.3 -i 0 -m uvc_driver.trace=0x -B .. same trace as above, until: lirc_dev: IR Remote Control driver registered, major 13 Attached ugen3.3[0] to cuse unit -1 # Try to compile webcamd without debugging. Then run it from gdb. Press CTRL+C to break back into gdb when it hangs. Dump backtrace from all threads. --HPS With/without -i 0 makes no difference. Using gdb, I should point out that with -B it prints the cuse -1 message then it does go into the background and sit there. I can still gdb it, though: # /usr/local/sbin/webcamd -d 3.3 -B Attached ugen3.3[0] to cuse unit -1 # ps ax | grep webcamd 4581 ?? Ss 0:00.17 /usr/local/sbin/webcamd -d 3.3 -B 4833 0 R+ 0:00.00 grep webcamd # gdb /usr/local/sbin/webcamd 4581 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as amd64-marcel-freebsd...(no debugging symbols found)... Attaching to program: /usr/local/sbin/webcamd, process 4581 Reading symbols from /usr/local/lib/libhal.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libhal.so.1 Reading symbols from /usr/local/lib/libdbus-1.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libdbus-1.so.3 Reading symbols from /usr/lib/libusb.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libusb.so.2 Reading symbols from /usr/local/lib/libcuse4bsd.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/local/lib/libcuse4bsd.so.1 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. [New Thread 80120a740 (LWP 100074)] [New Thread 8012041c0 (LWP 100140)] Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libutil.so.8...(no debugging symbols found)...done. Loaded symbols for /lib/libutil.so.8 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 [Switching to Thread 80120a740 (LWP 100074)] 0x000800f1f06c in poll () from /lib/libc.so.7 (gdb) thr ap all bt Thread 2 (Thread 8012041c0 (LWP 100140)): #0 0x000800f631ac in nanosleep () from /lib/libc.so.7 #1 0x000800f63125 in usleep () from /lib/libc.so.7 #2 0x000800c6a2e8 in usleep () from /lib/libthr.so.3 #3 0x004075db in usb_unlink_bsd () #4 0x004076e4 in usb_unlink_urb_sub () #5 0x00407716 in usb_kill_urb () #6 0x004ec12d in uvc_v4l2_release () #7 0x0040bcfd in v4l2_release () #8 0x0040641c in linux_close () #9 0x004f1571 in main () Thread 1 (Thread 80120a740 (LWP 100074)): #0 0x000800f1f06c in poll () from /lib/libc.so.7 #1 0x000800c6a83e in poll () from /lib/libthr.so.3 #2 0x000800a5763d in libusb20_dev_wait_process () from /usr/lib/libusb.so.2 #3 0x00408476 in usb_exec () #4 0x000800c684f1 in pthread_getprio () from /lib/libthr.so.3 #5 0x in ?? () Error accessing memory address 0x7f3fb000: Bad address. (gdb) Repeating in the version with debugging: (gdb) thr ap all bt Thread 2 (Thread 8012041c0 (LWP 100171)): #0 0x0008010491ac in nanosleep () from /lib/libc.so.7 #1 0x000801049125 in usleep () from /lib/libc.so.7 #2 0x000800d502e8 in usleep () from /lib/libthr.so.3 #3 0x004096d1 in usb_unlink_bsd (xfer=0x8012634d0, urb=0x801289e80, drain=1 '\001') at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:635 #4 0x00409835 in usb_unlink_urb_sub (urb=0x801289e80, drain=1 '\001') at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:680 #5 0x0040a9ff in usb_kill_urb (urb=0x801289e80) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_usb.c:1418 #6 0x0057004c in uvc_status_stop (dev=0x801244d00) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/v4l-dvb/linux/drivers/media/video/uvc/uvc_status.c:231 #7 0x0056ba12 in uvc_v4l2_release (file=0x80125a010) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/v4l-dvb/linux/drivers/media/video/uvc/uvc_v4l2.c:482 #8 0x0040f315 in v4l2_release (inode=0x80125a008, filp=0x80125a010) at v4l2-dev.c:340 #9 0x0040782d in linux_close (handle=0x80125a000) at /usr/ports/multimedia/webcamd/work/webcamd-0.1.23/kernel/linux_file.c:88 #10 0x00572dfe in v4b_create (unit=0) at webcamd.c:316 #11 0x0057343e in main (argc=4, argv=0x7fffea78) at webcamd.c:521 Thread 1 (Thread 80120a740 (LWP 100078)): #0
webcamd quirkyness
I'm playing with a built-in webcam here, a Sonix Technology Co CNF9055 with usb-ID 04f2:b1d6. This ID isn't listed in the webcamd man pages, but the camera does work... sort of. If I run webcamd in the foreground, about 7-8 times out of 10, I get: # /usr/local/sbin/webcamd -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit 0 Creating /dev/video0 And the video works. Cool! But sometimes, about 25% of the time, it hangs at: # /usr/local/sbin/webcamd -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit 0 with no creation of the video device. If I run it in the background, it fails 100% of the time: # /usr/local/sbin/webcamd -B -d 3.3 -i 0 Attached ugen3.3[0] to cuse unit -1 # which also means it fails to start if webcamd is started from its rc.d script at boot time. Webcamd version is 0.1.23, cuse is 0.1.13. System is 8.2-release amd64. ugen3.3: CNF9055 Sonix Technology Co., Ltd. at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x00ef bDeviceSubClass = 0x0002 bDeviceProtocol = 0x0001 bMaxPacketSize0 = 0x0040 idVendor = 0x04f2 idProduct = 0xb1d6 bcdDevice = 0x2613 iManufacturer = 0x0002 Sonix Technology Co., Ltd. iProduct = 0x0001 CNF9055 iSerialNumber = 0x no string bNumConfigurations = 0x0001 What other info can I provide to debug this? -jr ___ 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