nw802 webcam linux driver

The Divio nw8xx series chips are used in a number of old Logitec webcams, among others. I was given an old Logitec and got it working using this driver. This driver provides video4linux (v4l) support for nw8xx based webcams. Although it isn’t currently frequently maintained, it works quite well. Image quality is not excellent but is adequate. The webcam displayed on this site is currently using these drivers.

You will need a copy of the kernel source for your current kernel to build the driver. To use the driver, get a copy of the latest version from anonymous CVS:
# cvs -d:pserver:anonymous@nw802.cvs.sourceforge.net:/cvsroot/nw802 login
# cvs -z3 -d:pserver:anonymous@nw802.cvs.sourceforge.net:/cvsroot/nw802 co -P nw802-2.4

When prompted for a password, just press enter. Next compile the driver:
# cd nw802-2.4
The following two commands are only needed if using a 2.6 kernel
# cp Makefile.26 Makefile
# patch -p0 < patch-2.6
# make clean
# make

Load the kernel modules:
# insmod usbvideo.ko
# insmod nw8xx.ko

Plug in the camera and check dmesg output to make sure it registers the device properly and you’re good to go!


6 Comments so far
Leave a comment

That almost worked for me - I have to make this change to the makefile. You can verify by doing ls to see if the file is there:

— Makefile.old 2008-03-24 17:01:49.000000000 -0400
+++ Makefile 2008-03-24 17:05:55.000000000 -0400
@@ -5,8 +5,8 @@

default:
- ln -sf ${KERNEL_SOURCE}/drivers/media/video/usbvideo/usbvideo.h .
- ln -sf ${KERNEL_SOURCE}/drivers/media/video/usbvideo/usbvideo.c .
+ ln -sf ${KERNEL_SOURCE}/drivers/usb/media/usbvideo.h .
+ ln -sf ${KERNEL_SOURCE}/drivers/usb/media/usbvideo.c .
make -C ${KERNEL_SOURCE} SUBDIRS=`pwd` modules

clean:

Thanks for 2.6.x kernel support!

Please add my device to you driver:

{ USB_DEVICE( 0×0728, 0xd001 ) }, // Aver CamGuard NW801

{ 0×0728, 0xd001, NW801, “AverMedia CamGuard NW801″ },

This worked in original driver in 2.4.x kernel, please add support in 2.6.x, Thanks

I`m add my web-cam to you driver - all work propetly:

May 8 12:15:28 kernel: usb 2-1: new full speed USB device using uhci_hcd and address 3
May 8 12:15:29 kernel: usb 2-1: configuration #1 chosen from 1 choice
May 8 12:15:29 kernel: nw802.c: Potentially NW8xx supported cam found ( supported vendor/product IDs )
May 8 12:15:29 kernel: nw802.c: Detected bridge type : DivIO NW801
May 8 12:15:29 kernel: /usr/src/TV/WebCam/nw802-2.4/usbvideo.c: nw802 on /dev/video1: canvas=320×240 videosize=320×240

Hi,

Being a bit of a newbie, I’m having trouble compiling the driver. I’m running Ubuntu 8.04 (Kernel 2.6.24-19 generic).

I have (I believe!) all the necessary packages installed.

When I get to the ‘make’ command, I get quite a few errors. Also, some of the include files seem to be in a different location to those in the original makefiles that come with the NW802 source:

The makefile seems to be looking for some files, which is part of the reason it’s failing to compile (I think!):

${KERNEL_SOURCE}/drivers/media/video/usbvideo/usbvideo.h .

On my system, the usbvideo.h file is here:

/usr/src/linux-headers-2.6.24-19-generic/include/config/video/usbvideo.h

Does this make sense?

Unless the driver just won’t work with my version of Linux?

Help or comments appreciated!

Cheers,

Mike.

The simple answer is yes, it will work! :)

As well as the kernel headers Ubuntu includes by default, you also need
a copy of the full kernel source the get the module to build.

The easiest way is to get the source via apt:

cd /usr/src
sudo apt-get source linux-image-2.6.24-20-generic

This should leave you with a directory called ‘linux-2.6.24′ or
something similar that contains a copy of the kernel source. A good idea
to make things simple at this point is to create a symlink to it named
‘linux’ as follows:

sudo ln -s /usr/src/linux-2.6.24 /usr/src/linux

You now have everything you need to build the module and just need to
make a quick change to the Makefile. Edit the top line and change it from:

KERNEL_SOURCE ?= /lib/modules/`uname -r`/build

to

KERNEL_SOURCE ?= /usr/src/linux

You should then be able to run ‘make clean’ and ‘make’ and the module
should be built successfully. You can use ‘insmod nw802.ko’ to load the
module into the running kernel.

Just as an addition to the above, you will need to copy the kernel config of the running kernel like so:

sudo cp /boot/config-`uname -r` /usr/src/linux/.config



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed.

(required)

(required)