HOWTO: Serval Performance (SERP2) webcam
by Kevin Godby
I found a driver for the webcam here: https://groups.google.com/group/microdia.
Instructions on downloading and building the driver follow. For more thorough instructions, I’d recommend looking at Testing the Microdia driver.
Since we’ll be compiling a kernel driver, you’ll need to install the kernel source files:
$ sudo apt-get install kernel-package linux-source build-essential exuberant-ctags
Next you’ll need to install
git so we can download the driver’s source code:
$ sudo apt-get install git-core gitk git-gui git-doc curl
Now we’ll download the webcam driver:
$ git clone http://repo.or.cz/r/microdia.git
Let’s compile the kernel module (webcam driver):
$ cd microdia
The Microdia driver uses some functions that only exist in newer kernels. Check your kernel version:
$ uname -r
If the kernel version is less than 2.6.22, open the microdia.h file in a text editor and add the following two lines after the #define MICRODIA_H line (around line 35):
#define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member)
Make sure you included the initial hash mark (#). Save your file and continue with these instructions.
Now we’ll compile the Microdia driver:
Load the videodev kernel module so that /dev/video0 can be created:
$ sudo modprobe videodev
Now let’s load our new kernel driver:
$ sudo insmod ./microdia.ko
Check to see that the driver loaded successfully:
You should see something like this at the bottom of the output:
[107348.616179] microdia: Microdia USB2.0 webcam driver startup [107348.616563] microdia: Microdia USB2.0 Webcam - Product ID 624F. [107348.616570] microdia: Release: 0100 [107348.616574] microdia: Number of interfaces : 1 [107348.623570] microdia: Microdia USB2.0 Camera is now controlling video device /dev/video0 [107348.623950] usbcore: registered new interface driver usb_microdia_driver
Now we can test the driver with Ekiga:
$ sudo apt-get install ekiga
Run Ekiga by selecting “Ekiga Softphone” from the “Internet” menu. After walking through the configuration wizard (if this is the first time you’ve run Ekiga), you should be able to test your webcam. During configuration, set the video manager to V4L2. You should see “Microdia USB Video Camera” listed in the video devices.
If all goes well, you may wish to install the kernel module/driver so that it will be loaded automatically each time you boot your computer.
Copy the driver to the kernel tree:
$ sudo cp microdia.ko /lib/modules/`uname -r`/kernel/drivers/media/video/usbvideo/
Now add the videodev and microdia drivers to your /etc/modules file so that they get loaded automatically every time you boot your computer:
$ sudo sh -c "echo videodev >> /etc/modules" $ sudo sh -c "echo microdia >> /etc/modules"
The biggest hurdle that I see is that you’d have to recompile the driver each time the kernel is upgraded. System76 is working on packaging it up as a System76 driver that can be updated as new kernels are released, and so that users don’t have to compile kernel drivers themselves (’cause let’s face it, no one should have to learn to do that!).
Please note that I didn’t write the driver; I just discovered it this evening and got it running.