Random Bug of the Day
by JS
I was struggling yesterday to get my research code running on my laptop. I depend on an open source library called libwebcam to enable pan and tilt control of an off-the-shelf camera. This code works on machines running Ubuntu Hardy, but not on my laptop running Ubuntu Intrepid.
It seems that the uvc camera driver in the Linux kernel has undergone a number of revisions (since r178) that are not compatible with libwebcam-0.1.1. So, as per the notes I left myself, I tried to compile and install the r178 version of the uvc driver. No go. Linux headers have changed too much and that version of the driver is now obsolete relative to the default Intrepid kernel.
Via judicious searching, I discovered that the SVN version of libwebcam does work with modern uvc drivers. I downloaded that version, compiled it, installed and … nothing. Pan and tilt still would not function. To enable the pan and tilt features requires running a userspace program that imports, well, something into driverspace:
sudo uvcdynctrl -i /etc/udev/data/046d/logitech.xml
On a whim I tried loading the logitech.xml file from the old 0.1.1 release of libwebcam instead of the version that comes with the version in svn. Importing the logitech configuration file twice is kind of a trick in itself. You have to remove and reload (via rmmod and modprobe) the uvcvideo driver. After all these acrobatics (and several hours of lost time) I finally got back pan and tilt control on Ubuntu Intrepid.
There’s not really any lesson to be learned here, I just wanted to put my problem and solution on the web for those of you with similar issues and strong Google-Fu.
