Building the System in VirtualBox ==================================== Notes -------- VirtualBox 4 has a bug with USB 2.0 devices. If a USB 2.0 device is plugged into a USB2.0 external hub, VirtualBox will present the device to the Guest OS as USB 1.1 (meaning the DVBSky S960 is unusable). If this has happened then you'll likely see the following root@holly:~# dmesg | grep dvb [ 8.762370] dvbsky_identify_state, build on Nov 28 2014 05:41:02(),delay=0 [ 8.799498] usbcore: registered new interface driver dvb_usb_dvbsky [ 8.988444] usb 2-1: dvb_usb_v2: found a 'DVBSky S960/S860' in warm state [ 8.988665] usb 2-1: dvb_usb_v2: this USB2.0 device cannot be run on a USB1.1 port (it lacks a hardware PID filter) [ 8.989019] usb 2-1: dvb_usb_v2: 'DVBSky S960/S860' error while loading driver (-19) [ 8.989091] usb 2-1: dvb_usb_v2: 'DVBSky S960/S860' successfully deinitialized and disconnected There's a bug report here - https://www.virtualbox.org/ticket/8112 - though no sign of action on it (bug was raised 4 years ago and is still affecting the latest builds. Base OS --------- - Debian Wheezy (7) x86 (netinstall) - 1 CPU Core - 256MB RAM Device is seen by the OS root@holly:~# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 0572:6831 Conexant Systems (Rockwell), Inc. Fuller device info Bus 001 Device 002: ID 0572:6831 Conexant Systems (Rockwell), Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0572 Conexant Systems (Rockwell), Inc. idProduct 0x6831 bcdDevice 0.00 iManufacturer 1 Bestunar iProduct 2 S960 iSerial 3 20120511 bNumConfigurations 1 Getting the DVBSky Driver loaded ----------------------------------- Originally performed on a Pi in PIDVR-7 (http://projects.bentasker.co.uk/jira_projects/browse/PIDVR-7.html) # Install the build essentials root@holly:~# apt-get update root@holly:~# apt-get install gcc-4.7 cpp-4.7 dkms linux-headers-486 # Grab and compile the driver root@holly:~# cd /usr/src/ root@holly:~# wget http://www.dvbsky.net/download/linux/media_build-bst-13-140619.tar.gz root@holly:~# tar xvzf media_build-bst-13-140619.tar.gz root@holly:~# cd media_build-bst-13/ root@holly:~# ./v4l/build_x86.sh root@holly:~# make root@holly:~# make install # Grab the firmware root@holly:~# cd /lib/firmware root@holly:~# wget http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz root@holly:~# tar xvzf dvbsky-firmware.tar.gz root@holly:~# mv dvbsky-firmware/* ./ root@holly:~# reboot # Verify it worked root@holly:~# ls /dev/dvb/ adapter0 Getting TVHeadEnd Up and Running ------------------------------------ Originally performed on a Pi in PIDVR-6 (http://projects.bentasker.co.uk/jira_projects/browse/PIDVR-6.html) root@holly:~# apt-get install curl root@holly:~# curl http://apt.tvheadend.org/repo.gpg.key | apt-key add - root@holly:~# apt-get update root@holly:~# apt-get install tvheadend root@holly:~# netstat -lnp | grep 9981 tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN 13965/tvheaden Accessed the web interface and set the channel scan running, set up EPG etc (see PIDVR-6 for the exact steps) Recording directory left as /home/hts for the time being root@holly:~# update-rc.d tvheadend defaults HTTP Egress ------------- Originally performed on the Pi in PIDVR-9 (http://projects.bentasker.co.uk/jira_projects/browse/PIDVR-9.html) root@holly:~# apt-get install nginx root@holly:~# cd /etc/nginx/ root@holly:/etc/nginx# mkdir /mnt/recording_cache root@holly:/etc/nginx# chown hts /mnt/recording_cache root@holly:/etc/nginx# cd sites-available/ root@holly:/etc/nginx/sites-available# cp default recordings root@holly:/etc/nginx/sites-available# nano recordings # See PIDVR-9 for a copy of the config used root@holly:/etc/nginx/sites-available# ln -s /etc/nginx/sites-available/recordings /etc/nginx/sites-enabled/ root@holly:/etc/nginx/sites-available# service nginx start root@holly:/etc/nginx/sites-available# wget -O - http://127.0.0.1/ --header="Host: recordings.tvheadend" root@holly:/etc/nginx/sites-available# update-rc.d nginx defaults Went back to the TVHeadEnd interface and amended the recording directory to be /mnt/recording_cache Tuner seems a little unstable though, after a while it became unavailable, and running a USB2 reset root@holly:~# for i in $(ls /sys/bus/pci/drivers/ehci_hcd/|grep :); do echo $i >/sys/bus/pci/drivers/ehci_hcd/unbind; echo $i >/sys/bus/pci/drivers/ehci_hcd/bind; done Just led to the following in dmesg holly kernel: [ 659.876236] DVB: registering new adapter (DVBSky S960/S860) holly kernel: [ 661.887998] dvbsky_usb MAC address=00:00:00:00:00:00 holly kernel: [ 661.888054] usb 1-1: dvb_usb_v2: MAC address: 00:00:00:00:00:00 holly kernel: [ 661.890833] M88DS3103 tuner read stops = 0. holly kernel: [ 663.893311] DS3000 chip version: ffffff92 attached. holly kernel: [ 667.893870] TS202x chip version[1]: ffffff92 attached. holly kernel: [ 671.893335] m88ds3103_tuner_writereg: writereg error(err == -110, reg == 0x00, value == 0x03) holly kernel: [ 675.909693] TS202x chip version[2]: ffffff92 attached. holly kernel: [ 675.910266] usb 1-1: dvb_usb_v2: 'DVBSky S960/S860' error while loading driver (-19) holly kernel: [ 675.912972] usb 1-1: dvb_usb_v2: 'DVBSky S960/S860' successfully deinitialized and disconnected Running a USB2 reset on the VM Host results in the same, will probably have to physically unplug and then reconnect.