Altera_Forum
Honored Contributor
19 years agoproblem with usb camera
Hi,
I have some trouble with getting usb camera to work. I configured kernel with UsbHost following the document in http://nioswiki.jot.com//wikihome/operatingsystems/usbhost (http://nioswiki.jot.com//wikihome/operatingsystems/usbhost) In kernel menuconfig, turn on scsi device, scsi disk turn on host-side usb, usb dev fs, your hcd, usb device eg mass storage. File systems --> DOS/FAT/NT Filesystems ---> [*] MSDOS fs support [*] VFAT (Windows-95) fs support (437) Default codepage for FAT (iso8859-1) Default iocharset for FAT Native Language Support --> (iso8859-1) Default NLS Option [*] Codepage 437 (United States, Canada) [*] Simplified Chinese charset(CP936,GB2312) Besides,I configured more other thing for my usb camera Device Drivers --> Multimedia devices--> <*> video For Linux USB support--> <*> Support for Host-side USB ................... [*] USB device filesystem ................... <*> ISP1362 HCD support ................... <*> USB Mass Storage support .................... <* > USB OV511 Camera support then make ,make linux image ,download the zImage into DE2 board. insert the usb camera,the kernel detect the camera as follow: Uncompressing Linux... Ok, booting the kernel. Linux version 2.6.16-uc0 (leewood@localhost.localdomain) (gcc version 3.4.6)# 28 PREEMPT Wed Aug 2 19:39:48 CST 2006 uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. setup_arch: No persistant network settings signature at 008F0000 Built 1 zonelists Kernel command line: PID hash table entries: 64 (order: 6, 1024 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 5552k/8192k RAM, 0k/0k ROM (1608k kernel code, 938k data) Mount-cache hash table entries: 512 NET: Registered protocol family 16 SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub io scheduler noop registered io scheduler deadline registered (default) i8042.c: i8042 controller self test timeout. Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x81004000 (irq = 1) is a jtag_uart dmfe_probe:eth0, 50000 Khz Nios <DM9000> eth0 I/O: 80900090, VID: 90000a46 ADDR: 00:07:ed:00:00:00 dmfe_probe:eth1, 50000 Khz Nios Linux video capture interface: v1.00 usbmon: debugfs is not available driver isp1362-hcd, 2005-04-04 isp1362-hcd isp1362-hcd: ISP1362 Host Controller isp1362_hc_reset: Clock not ready after 20ms isp1362-hcd isp1362-hcd: new USB bus registered, assigned bus number 1 isp1362-hcd isp1362-hcd: irq 4, io mem 0x80900080 isp1362_hc_start: isp1362-hcd isp1362-hcd: ISP1362 Memory usage: isp1362-hcd isp1362-hcd: ISTL: 2 * 256: 512 @ $0000:$0100 isp1362-hcd isp1362-hcd: INTL: 16 * ( 64+8): 1152 @ $0200 isp1362-hcd isp1362-hcd: ATL : 32 * ( 64+8): 2304 @ $0680 isp1362-hcd isp1362-hcd: USED/FREE: 3968 128 usb usb1: configuration# 1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected ISP1362 Host Controller, irq 4 Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. usbcore: registered new driver ov511 drivers/usb/media/ov511.c: v1.64 for Linux 2.5 : ov511 USB Camera Driver NET: Registered protocol family 2 IP route cache hash table entries: 128 (order: -3, 512 bytes) TCP established hash table entries: 512 (order: -1, 2048 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Freeing unused kernel memory: 688k freed (0x1c4000 - 0x26f000) usb 1-2: new full speed USB device using isp1362-hcd and address 2 Shell invoked to run file: /etc/rc Command: hostname uClinux Command: mount -t proc proc /proc Command: mount -t sysfs sysfs /sys Command: mount -t usbfs none /proc/bus/usb mount failed: No such file or directory Command: mkdir /var/tmp Command: mkdir /var/log Command: mkdir /var/run Command: mkdir /var/lock Command: mkdir /var/empty Command: ifconfig lo 127.0.0.1 Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo Command: ifconfig eth0 192.168.2.210 Command: route add default gw 192.168.2.1usb 1-2: configuration# 1 chosen from 1 choice drivers/usb/media/ov511.c: USB OV511+ video device found drivers/usb/media/ov511.c: model: Unknown drivers/usb/media/ov511.c: Camera type (108) not recognized drivers/usb/media/ov511.c: Please notify mark@alpha.dyndns.org of the name, drivers/usb/media/ov511.c: manufacturer, model, and this number of your camera. drivers/usb/media/ov511.c: Also include the output of the detection process. Command: cat /etc/motdWelcome to ____ _ _ / __| ||_| _ _| | | | _ ____ _ _ _ _ | | | | | | || | _ \| | | |\ \/ / | |_| | |__| || | | | | |_| |/ | ___\____|_||_|_| |_|\____|\_/\_/ | | |_| For further information check: http://www.uclinux.org/ (http://www.uclinux.org/) Execution Finished, Exiting Sash command shell (version 1.1.1) /> drivers/usb/media/ov511.c: Sensor is an OV7620 drivers/usb/media/ov511.c: Device at usb-isp1362-hcd-2 registered to minor 0 Then i ran app "vidcat" : /> mknod /dev/video0 c 81 0 /> chmod 666 /dev/video0 /> vidcat -h vidcat: invalid option -- h VidCat, Version 0.7.2 Usage: vidcat <options> -b make a raw PPM instead of an ASCII one -d <device> video device (default: /dev/video) -f {ppm|jpeg|png|yuv4mpeg} output format of the image -g greayscale instead of color -i {tv|comp1|comp2|s-video} which input channel to use -l loop on, doesn't make sense in most cases -n {pal|ntsc|secam} select video norm -o <file> write output to file instead of stdout -p c|g|y|Y videopalette to use -q <quality> only for jpeg: quality setting (1-100, default: 80) -s NxN define size of the output image (default: 320x240) Example: vidcat | xsetbg stdin /> vidcat -d /dev/video0 -p c -o test.jpg Isochronous transfers not supported drivers/usb/media/ov511.c: init isoc: usb_submit_urb(0) ret -28 Isochronous transfers not supported drivers/usb/media/ov511.c: init isoc: usb_submit_urb(0) ret -28 Isochronous transfers not supported drivers/usb/media/ov511.c: init isoc: usb_submit_urb(0) ret -28 Isochronous transfers not supported drivers/usb/media/ov511.c: init isoc: usb_submit_urb(0) ret -28 Isochronous transfers not supported drivers/usb/media/ov511.c: init isoc: usb_submit_urb(0) ret -28 Can't open device /dev/video0 /> Is the problem driver or app? Pls help me.Thx. --leewood