Microdia WebCam (0c45:xxxx) experimental drivers – installation and testing Part 1

Posted by on May 31, 2008 in Linux, Technology, Ubuntu72 commentsPrint This Post

Updated 04/04/09 to reflect changes to the installation process.

The driver currently supports the following Microdia webcams:

0c45:6240 0c45:6242 0c45:6243 0c45:6248 0c45:624b 0c45:624c 0c45:624e 0c45:624f 0c45:6253 0c45:6260 0c45:6262 0c45:6270 0c45:627a 0c45:627b 0c45:627c 0c45:627f 0c45:6280 0c45:6282 0c45:6283 0c45:6288 0c45:628a 0c45:628b 0c45:628e 0c45:628f 0c45:62a0 0c45:62b0 0c45:62b3 0c45:62ba 0c45:62bb 0c45:62bc 0c45:62be

Keep up to date on the current supported webcams: http://groups.google.com/group/microdia/web/project-status?hl=en

The webcam (Acer Orbicam) on my Acer Aspire 5052 has been somewhat of a bane – with no drivers available, it has been one of the last stumbling blocks of getting all of my hardware working in Linux (the Ubuntu 8.04 Distro, Hardy Heron, Ubuntu Jaunty in my case). That is until I ambled across, quite by accident, the Microdia Google Group. These guys are the epitome of Open Source development in action – a group of widely distributed people who are collaborating to solve a common problem: to get the Microdia webcams supported under Linux. And they’re doing a fantastic job so far.

Note: I should first mention that the drivers are still heavily under development, and although they are not (for some webcams) to the point where they can be used for Skype, for example, major progress has been made, and there is now finally communication with my webcam, to the point where I can successfully output video to mplayer. Therefore, this post is not quite yet a HowTo on getting a Microdia webcam fully function, but a step towards helping people installing and testing the drivers under development.

So, here’s how I’ve got to the stage of seeing myself in mplayer…

Information Gathering

Note: this section is only relevant if you’re interested in the workings of the camera, or would like to aid the driver developers by supplying information about your webcam. If you just want to compile and install the drivers, scroll down to Driver Compiling and Installing.

Firstly, I had to determine i) whether or not my Webcam was in fact a Microdia camera, and ii) the model number, so in a Terminan, I ran:

lsusb

Which output, amongst other information about the rest of my USB devices:

Bus 003 Device 002: ID 0c45:6260 Microdia

confirming that my Acer Orbicam is a Microdia device. The two hex values 0c45:6260 represent the Vendor ID and Product ID respectively – 0c45 being Microdia, and 6260 the Product itself. In order to create my meagre contribution to the Microdia Group, I had to gather some more information about the device’s bridge and sensor. Firstly, I needed the USB Device Descriptors, which were obtained by running:

sudo lsusb -d 0c45:6260 -v > ~/Desktop/0c45_6260_device_descriptors.txt

I then needed to discover the Bridge and Sensor types, which thankfully could be found in the Windows driver file, snp2std.inf:

%USBPCamDesc% = SN.USBPCamVGA,USBVID_0c45&PID_6260 ; SN9C201 + OV7670ISP

Which tells me:
Bridge: SN9C201
Sensor: OV7670

The full guide to gathering information for your webcam can be found at the Microdia group, here.

Driver Compiling and Installing

First, I installed some prerequisites – git (to obtain the Microdia Drivers source code), kernel source, build essential etc.:

sudo apt-get install git-core git-doc git-gui kernel-package linux-headers-`uname -r` build-essential libv4l-0 mplayer

Once finished, I created a directory to set up my local git repository and downloaded the driver code:

cd ~/Documents
mkdir webcam
cd webcam
git clone http://repo.or.cz/r/microdia.git

The final command executes git, and tells it to clone the remote repository. The files are downloaded to a sub directory called microdia, from which I ran the rest of the commands:

cd microdia

I then compiled the code (not with sudo):

make

and received this error, but it’s not important:

make: ctags: Command not found
make: *** [ctags] Error 127

Once compiled, the module can be inserted to the kernel for testing:

sudo insmod ./sn9c20x.ko

I also received the following error:

ERROR: insmod: error inserting 'sn9c20x.ko': -1 Unknown symbol in module

so had to run the following first:

sudo modprobe videodev
sudo modprobe compat-ioctl32

and then I could insert the module:

sudo insmod ./sn9c20x.ko

Finally, to test, I ran:

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv driver=v4l2:width=640:height=480:fps=25:device=/dev/video0 -vo x11

The only thing is… it’s currently a mirror image:

Finally…

If everything looks good, and the camera works well, it can be installed permanently by running the following:

strip -g sn9c20x.ko
sudo mkdir -p /lib/modules/`uname -r`/kernel/drivers/media/video/usbvideo/
sudo cp sn9c20x.ko /lib/modules/`uname -r`/kernel/drivers/media/video/usbvideo/
sudo depmod -a

However, only do this if you are comfortable with the driver, and happy that it is stable on your system!

References

  1. Microdia, Google Group
  2. Full list of currently supported (and unsupported) Microdia Webcams
  3. How to gather information on your webcam
  4. Using git with Microdia
  5. Testing the Microdia driver
  6. PATCH: v4l-experimental support for 6260 (3rd try) Thread


Something not quite right? Inaccuracies or invalid code? Didn’t work for you? Don’t like me using Ss instead of Zs? Add a comment below! All comments are welcome. Except spam, because spam is a bit crap.





















Dragon Touch® Y88X 7'' Quad Core Google Android 4.4 KitKat Tablet PC, Dual Camera, HD 1024x600 Multi-touch Screen, 8GB Nand Flash, Google Play Pre-load, 3D Game Supported (Advanced version of Y88) [By TabletExpress]


Dragon Touch® Y88X 7” Quad Core Google Android 4.4 KitKat Tablet PC, Dual Camera, HD 1024×600 Multi-touch Screen, 8GB Nand Flash, Google Play Pre-load, 3D Game Supported (Advanced version of Y88) [By TabletExpress]


$59.89


Outstanding PerformanceThe Y88X tablet is equipped with a Quad-Core CPU, which means up to 4x the CPU speed for everything you do. Its AnTuTu score almost doubles that of Y88, with 14,800, while Y88 is 7,900. Enjoy the stream videos, smooth-flowing gaming, web surfing and more!Newest Android 4.4 KitKatThe KitKat system enables faster multitasking, optimizes user interface with more convenience and…

Chromo Inc® 7 Tablet Google Android 4.1 with Touchscreen, Camera, 1024x600 Resolution, Netflix, Skype, 3D Game Supported - Pink [New Model June 2014]


Chromo Inc® 7 Tablet Google Android 4.1 with Touchscreen, Camera, 1024×600 Resolution, Netflix, Skype, 3D Game Supported – Pink [New Model June 2014]


$44.88


Chromo Inc® 7″ Capacitive Touch Screen Tablet Android 4.0 1.2GHz 512MB 4GB Webcam WiFi Model: CHR-2543 Webcam: 1.3MP Front Camera Wireless: Wifi 802.11b/g/n 3G: Supporting External 3G Modem G-sensor: Support RAM: DDR3 512MB ROM: 4GB Bluetooth: No GPS: No Power Battery: 2200mAh Li-ion Battery Working Time: 2-3 hours Power Device: AC Adapter Head 110V Device Specifications Color: P…

Tags: , , , ,