{"id":117,"date":"2009-01-03T14:33:42","date_gmt":"2009-01-03T06:33:42","guid":{"rendered":"http:\/\/play.datalude.com\/blog\/?p=117"},"modified":"2009-01-03T14:40:39","modified_gmt":"2009-01-03T06:40:39","slug":"zmicro-video-camera-working-in-ubuntu-intrepid","status":"publish","type":"post","link":"https:\/\/play.datalude.com\/blog\/2009\/01\/zmicro-video-camera-working-in-ubuntu-intrepid\/","title":{"rendered":"Z-star Video Camera working in Ubuntu Intrepid"},"content":{"rendered":"<p>At last. Its a lazy Saturday after New Year, and I just got around to fixing another one of the things which broke when I <a href=\"http:\/\/play.datalude.com\/blog\/?p=107\">upgraded to Intrepid<\/a> &#8211; the video camera. Actually I don't really use it much, hence it got dropped to the back of the queue, but its nice to get things working again.<\/p>\n<p>Here's the relevant info:<!--more--><\/p>\n<blockquote><p>$&gt; tail -f \/var\/log\/messages<\/p>\n<p>{insert camera}<\/p>\n<p>Jan\u00a0 3 14:28:13\u00a0 kernel: [18540.528056] usb 5-1: new full speed USB device using uhci_hcd and address 4<br \/>\nJan\u00a0 3 14:28:13\u00a0 kernel: [18540.741888] usb 5-1: configuration #1 chosen from 1 choice<br \/>\nJan\u00a0 3 14:28:13\u00a0 kernel: [18540.745214] gspca: probing 0ac8:301b<br \/>\nJan\u00a0 3 14:28:14\u00a0 kernel: [18541.048159] zc3xx: probe sensor -&gt; 0a<br \/>\nJan\u00a0 3 14:28:14\u00a0 kernel: [18541.048168] zc3xx: Find Sensor PB0330. Chip revision 0<br \/>\nJan\u00a0 3 14:28:14\u00a0 kernel: [18541.055586] gspca: probe ok<\/p>\n<p>$&gt; lsusb<br \/>\nBus 005 Device 004: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam<\/p>\n<p>$&gt; lsmod | grep gspca<br \/>\ngspca_zc3xx\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 55936\u00a0 0<br \/>\ngspca_main\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 29312\u00a0 1 gspca_zc3xx<br \/>\nvideodev\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 41344\u00a0 1 gspca_main<br \/>\nusbcore\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 148848\u00a0 6 gspca_zc3xx,gspca_main,usbhid,uhci_hcd,ehci_hcd<\/p>\n<p>$ ls \/dev\/video*<br \/>\n\/dev\/video0<\/p><\/blockquote>\n<p>So everything <strong>seemed<\/strong> to be making the right noises, but any app I tried (camorama, skype) would just bomb out, being unable to find the camera.\u00a0 I'd tried a couple of things before, such as recompiling the drivers, and adding lines to \/etc\/modprobe.d\/blacklist and \/etc\/modprobe.d\/options but nothing had worked, mainly I suspect, because these fixes related to the previous version of Ubuntu, 8.04. The answer was eventually very simple and was detailed <a href=\"https:\/\/answers.launchpad.net\/ubuntu\/+question\/49739\">here<\/a>. I'm gong to reproduce it below anyway:<\/p>\n<blockquote><p>The core of the problem is that gspca drivers in 8.10 apparently implement V4L2, while many applications are still using V4L1 protocol. See <a rel=\"nofollow\" href=\"http:\/\/hansdegoede.livejournal.com\/3636.html\">http:\/\/hansdegoede.livejournal.com\/3636.html<\/a> .<\/p>\n<p>Diagnostics:<br \/>\ninstall camstream<br \/>\nstart camstream, open trace window, and start camera. Expect to see messages like:<br \/>\nVIDIOCSYNC(1) failed (Invalid argument)<\/p>\n<p>How to workaround this (see also <a rel=\"nofollow\" href=\"https:\/\/lists.linux-foundation.org\/pipermail\/bugme-janitors\/2008-October\/011912.html\">https:\/\/lists.linux-foundation.org\/pipermail\/bugme-janitors\/2008-October\/011912.html<\/a>):<\/p>\n<p>1. Download and unpack <a rel=\"nofollow\" href=\"http:\/\/people.atrpms.net\/%7Ehdegoede\/libv4l-0.5.0.tar.gz\">http:\/\/people.atrpms.net\/~hdegoede\/libv4l-0.5.0.tar.gz<\/a><br \/>\n2. See README, and install: sudo make install<br \/>\n3. Open terminal window<br \/>\n4. $ export  LD_PRELOAD=\/usr\/local\/lib\/libv4l\/v4l1compat.so<br \/>\n5. $ camstream<br \/>\nStart camera, should now work.<\/p>\n<p>How to make skype work:<br \/>\n1. create new shell script (call it skype_wrapper), put it somehwere (e.g. \/usr\/local\/bin\/skype_wrapper). Content:<br \/>\n#!\/bin\/bash<br \/>\nexport LD_PRELOAD=\/usr\/local\/lib\/libv4l\/v4l1compat.so<br \/>\nskype<br \/>\n2. Open System\/Root Menu manager, locate Skype, Edit the shortcut replacing command \"skype\" =&gt; \"\/usr\/local\/bin\/skype_wrapper\".<br \/>\n3. Start skype (restart, if already running). Test video should now work.<\/p><\/blockquote>\n<p>All good. Even the skype fix worked. Now its just bluetooth to fix &#8230; mutter mutter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At last. Its a lazy Saturday after New Year, and I just got around to fixing another one of the things which broke when I upgraded to Intrepid &#8211; the video camera. Actually I don't really use it much, hence it got dropped to the back of the queue, but its nice to get things &#8230; <a title=\"Z-star Video Camera working in Ubuntu Intrepid\" class=\"read-more\" href=\"https:\/\/play.datalude.com\/blog\/2009\/01\/zmicro-video-camera-working-in-ubuntu-intrepid\/\" aria-label=\"Read more about Z-star Video Camera working in Ubuntu Intrepid\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1,4],"tags":[99,97,98,101],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-it","category-linux","tag-ubuntu-intrepid","tag-video-camera","tag-webcam","tag-zstar-microelectronics-zc0301"],"_links":{"self":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":0,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/play.datalude.com\/blog\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}