Skip to content

Instantly share code, notes, and snippets.

@caelor
Last active July 11, 2023 18:18
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save caelor/f8c514d2807f171eafdb to your computer and use it in GitHub Desktop.
Save caelor/f8c514d2807f171eafdb to your computer and use it in GitHub Desktop.
Steps to get the satip/vtuner combination working on Ubuntu 14.10 - this makes a SatIP server appear as 4 local DVB-S2 tuners
Starting from Ubuntu 14.10 Server clean install
Set up:
> sudo mkdir /opt/satip
> sudo chown <user> /opt/satip
> sudo apt-get install git build-essential linux-source linux-headers-$(uname -r)
> cd /opt/satip
> git clone https://code.google.com/p/satip/
> tar xjvf /usr/src/linux-source-3.16.0/linux-source-3.16.0.tar.bz2
(extracts into /opt/satip/linux-source-3.16.0/)
Change the makefile in satip/vtuner_tweak to include the extracted kernel source:
(this is needed because it there seems to be a persistent Ubuntu bug that excludes DVB headers from the linux-headers package)
--- a/vtuner_tweak/Makefile
+++ b/vtuner_tweak/Makefile
@@ -15,6 +15,7 @@ ccflags-y += -Idrivers/media/dvb/dvb-core
ccflags-y += -Idrivers/media/dvb/frontends
ccflags-y += -Idrivers/media/common/tuners
ccflags-y += -Iinclude
+ccflags-y += -I/opt/satip/linux-source-3.16.0/drivers/media/dvb-core
ccflags-y += -DVTUNERC_MAX_ADAPTERS=$(VTUNERC_MAX_ADAPTERS)
ifneq "$(ARCH)" ""
Compile vtuner module & satip userland:
> cd /opt/satip/satip/vtuner_tweak
> make
> cd /opt/satip/satip/satip
> make
Install kernel module:
> sudo cp /opt/satip/satip/vtuner_tweak/vtunerc.ko /lib/modules/`uname -r`/kernel/drivers/media/tuners/vtunerc.ko
> sudo depmod -a
Script to run up satip (into /usr/local/sbin/satip_tuner):
(this is very hackish, and expects to run the satip userland as root, and completely ignores udev permissions for device nodes, leaving them wide open)
#!/bin/bash
rmmod vtunerc
modprobe vtunerc devices=4 debug=0
sleep 1
chmod a+rw /dev/vtunerc*
chmod a+rw /dev/dvb/adapter0/*
chmod a+rw /dev/dvb/adapter1/*
chmod a+rw /dev/dvb/adapter2/*
chmod a+rw /dev/dvb/adapter3/*
/opt/satip/satip/satip/satip -h $1 -m 31 -l 3 -f 1 -d /dev/vtunerc0
(you need a copy of satip running for each virtual tuner. -f selects the SatIP device input (1-4), -d sets the associated vtuner device)
(-m 31 sets debug masking to showing all classes, and -l 3 sets info level debugging)
Supervisord configuration file:
[program:satip]
command=/usr/local/sbin/satip_tuner <ip_addr_of_satip_server>
redirect_stderr=true
autostart=true
autorestart=true
Test using scan (needs sudo apt-get install dtv-scan-tables dvb-apps):
> sudo scan -a 0 /usr/share/dvb/dvb-s/Astra-28.2E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment