NSLU2-Linux
view · edit · print · history

Much of this is based on the work of EfFeM? from InstallWinTVPVRUSB2.

This page is to describe the installation of the Happauge WinTV? PVR USB2? on a Linksys NSLU2 that is running OpenDebianSlug.

1/ setup OpenDebianSlug

2/ Install Hotplug

 apt-get install hotplug

3/ Get the driver and support modules

a/ aquire them from your recent build from openslug/tmp/deploy/ipk or b/ wget them from the openslug ipkg repository (http://ipkg.nslu2-linux.org/feeds/openslug/cross/2.6-beta/ or similar)

The modules you need are:

 pvrusb2-mci_20050911-r0_nslu2.ipk
 kernel-module-v4l1-compat_2.6.12.2-r17.1_nslu2.ipk
 kernel-module-v4l2-common_2.6.12.2-r17.1_nslu2.ipk
 kernel-module-videodev_2.6.12.2-r17.1_nslu2.ipk
 kernel-module-firmware-class_2.6.12.2-r17.1_nslu2.ipk

4/ Install them

 dpkg --force-all -i \
 pvrusb2-mci_20050911-r0_nslu2.ipk \
 kernel-module-v4l1-compat_2.6.12.2-r17.1_nslu2.ipk \
 kernel-module-v4l2-common_2.6.12.2-r17.1_nslu2.ipk \
 kernel-module-videodev_2.6.12.2-r17.1_nslu2.ipk \
 kernel-module-firmware-class_2.6.12.2-r17.1_nslu2.ipk

This step is quite ugly and can/will be integrated more neatly with Step 3 at a later time

5/ Extract the device firmware from the Windows software CD that came with the device

See details at http://www.isely.net/pvrusb2-utils.html.

 wget 'http://www.isely.net/downloads/pvrusb2-mci-20060107.tar.bz2'
 tar xjf pvrusb2*.tar.bz2
 cd pvrusb2*
 cd utils
 mkdir win_driver
 cp /cdrom/HCWUSB2?.sys win_driver
 ./fwextract.pl

You will now have two files, pvrusb2.f1 and pvrusb.f2

You may get files that are names as follows

 v4l-cx2341x-enc.fw
 v4l-pvrusb2-29xxx-01.fw

You can either rename the files or copy them to the firmware directory and symbolically link them to the proper names.

Here are how they match up

 v4l-pvrusb2-29xxx-01.fw (8192 bytes) -->  pvrusb2.f1
 v4l-cx2341x-enc.fw (262144 bytes) -->  pvrusb.f2

6/ Copy these two files to the hotplug firmware directory on the Slug..

 scp pvrusb2.f{1,2} slug:/usr/lib/hotplug/firmware

7/ Start hotplug or reboot

8/ Hotplugging the PVRUSB2? should load the firmware and start the Device; you can verify status messages using dmesg

9/ Test!

 cat /dev/video0 > /some/place/on/disk/testfile.mpg

you should be able to play that file on anything that understands MPEG2? files - mplayer, xine, totem etc.

10/ You can change the channel and do other various things by setting flags in /sys/class/pvrusb2/ctl_* (see the "Sysfs Interface" section at http://www.isely.net/pvrusb2.html). For example:

 # cd /sys/class/pvrusb2/sn-*
 # cat ctl_input/enum_val
 television
 s-video
 composite
 radio
 # echo composite > ctl_input/cur_val

This switches to the composite input. Another useful one is ctl_signal_present which you can look at to see if it has detected any video.

Apart from that, I dont know how to control this device via software; but that is in the works!


UPDATE for Debianslug 3.10 beta.

(21 sept 2006)

0/ install debianslug

1/ run "apt-get install hotplug" to install hotplug

2/ get these files from http://ipkg.nslu2-linux.org/feeds/debianslug/cross/3.10-beta/:

 pvrusb2-mci_20060517-r0_ixp4xxle.ipk
 kernel-module-firmware-class_2.6.16-r6.6_ixp4xxle.ipk  
 kernel-module-v4l1-compat_2.6.16-r6.6_ixp4xxle.ipk
 kernel-module-v4l2-common_2.6.16-r6.6_ixp4xxle.ipk
 kernel-module-videodev_2.6.16-r6.6_ixp4xxle.ipk
 kernel-module-tuner_2.6.16-r6.6_ixp4xxle.ipk           
 kernel-module-tveeprom_2.6.16-r6.6_ixp4xxle.ipk        
 kernel-module-msp3400_2.6.16-r6.6_ixp4xxle.ipk         
 kernel-module-saa7115_2.6.16-r6.6_ixp4xxle.ipk       

Note: there is some confusion about which of these are really needed. It depends on your pvrusb2. Some revisions need other modules. Mine is Rev D157 for PAL and SECAM.

3/ install them with dpkg -i --force-all. The warnings about "package architecture (ixp4xxle) does not match system (arm)" and some failed dependencies are normal and can be ignored.

4/ run:

 depmod
 modprobe firmware-class 
 modprobe videodev 
 modprobe tuner 
 modprobe tveeprom  
 modprobe v4l1-compat 
 modprobe msp3400
 modprobe v4l2-common 
 modprobe saa7115 
 modprobe pvrusb2

5/ follow the instructions from http://www.isely.net/pvrusb2/setup.html#Firmware and copy the 2 firmwarefiles to /usr/lib/hotplug/firmware/.

6/ plug in the pvrusb2, wait for 5 seconds and check the dmesg-output. It should contain about 100 lines starting with "pvrusb2:". Congrats.


My NSLU2 locks up ten minutes after using the PVRUSB2? driver if I have the Debian ntp-server package loaded. This happens even if the server is killed; the crash happens if it has ever run since boot. You may like to avoid this package in combination with the PVRUSB2?.

view · edit · print · history · Last edited by mrkzander.
Based on work by mrkzander, pumpkin, and endecotp.
Originally by dyoung.
Page last modified on December 02, 2006, at 01:17 AM