Kodi Community Forum

Full Version: HDHR Prime Tutorial - Where's my mistake?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I had TVH 3.2 working with my Prime and a Comcast Motorola Cable Card. It was running on LinuxMint 13. I had only network stations showing up, but all the functionality was there. I thought I figured out how to get the encrypted channels to show ( had to use 3.3 and a patch dvbhdhomerun) up so I thought I would install Lubuntu 12.10 on a Virtural Box, document everything and post a tutorial since there doesn't seem to be one. I can't get anything to show up and I can't figure out where I'm going wrong. Here is the full tutorial - can you help me point out my mistake?

OS: Lubuntu 12.10
Cable: Comcast w/ Motorola Cable Card
Software: TV Headend 3.3.152
XBMC: Openelec RC1 (XBMC RC3)

I didn't come up w/ all this on my own, it's cobbled together from various forums and IRC chats with the HTS team


sudo add-apt-repository ppa:adamsutton/tvheadend-unstable

sudo add-apt-repository ppa:tfylliv/dvbhdhomerun

Update Sources
sudo apt-get update

if you want to be able to view premium/encrypted channels you will need to build dvbhdhomrun from source with the included descrambler patch

For info on the patch see here


sudo apt-get install hdhomerun-config hdhomerun-config-gui
gui install is optional

Make sure your Prime is discoverable
hdhomerun_config discover

Your output should look like this with a different IP and device number of course: hdhomerun device 1316952D found at

Take note of your device ID, you'll need this later on.

sudo apt-get install dvbhdhomerun-dkms dvbhdhomerun-utils

Service should be started now. If it isn't, start it manually
sudo service dvbhdhomerun-utils start

Set the kernel module to start at boot
sudo echo dvb_hdhomerun >> /etc/modules

Alternatives: If this doesn't work there are two work arounds.

1) Use Nano:
sudo nano /etc/modules
- Once in /etc/modules just add a line that says "dvb_hdhomerun" without the quotes

2) Enter into superuser
# su
where # is the terminal prompt
- This worked in Mint 13. For Ubuntu Root access is locked by default so this won't work. To enable su see this

Configure dvbhdhomerun to see your tuners. This is used if auto discovery doesn't work (I think Confused )
sudo nano /etc/dvbhdhomerun

Change your config file so that the adaptors look like this (use your device ID in place of 1316952D):




sudo reboot

Rebuild kernel modules
sudo dpkg-reconfigure dvbhdhomerun-dkms


HDHomeRun Prime
sudo userhdhomerun -f

sudo service dvbhdhomerun-utils start


We need to verify that your cable provider is supplying unique TSID's for the Muxes. If not then this won't work for you.

Replace your 1316952D with your device ID
hdhomerun_config 1316952D scan 0 ~/scan0.txt

You should see something like this

Notice the TSID (0x81A1, 0x81C5, etc...) If you are seeing all zeros, or 0x0000 then you are not getting unique TSID's

When the scan is done we will create a custom DVB location file for TVH to scan. Name your file in the format (country-STATE-Town)
awk '{if ($1 ~ /SCANNING/) print "\n" $2; else print $0}' scan0.txt | awk 'BEGIN { RS = "" ; FS = "\n" } { if (length($4) > 0) print "A " $1 " qam256" }' >us-IL-Peoria

When done your custom DVB file should look something like this:

A 849000000 qam256
A 843000000 qam256
A 837000000 qam256
A 813000000 qam256
A 807000000 qam256
A 771000000 qam256
A 765000000 qam256
A 759000000 qam256
A 753000000 qam256
A 747000000 qam256

Move the file to the proper location
sudo mv us-IL-Peoria /usr/share/tvheadend/data/dvb-scan/atsc/us-IL-Peoria

I noticed the other DVB files that come with TVH actually had QAM256, not qam256. You can change it in print section of the command, I'm not sure it makes a difference.


Start/Restart TVHeadend
sudo service tvheadend restart

Open a web browser and go to http://tvheadendIP:9981

Since I'm on the same machine as my server it's just http://localhost:9981

Go to Configuration --> TV Adapters

From the drop down you should have three tuners present. If they are not showing up restart your helpers and then restart TVH.

Select "Add DVB Network by Location"

Pick your custom file you just made

Check autodetect muxes

Turn off full mux reception. Hit save. You should now see muxes showing up, and starting to scan. If it finds services they will show up in the services tab.

So at this point all of my muxes show up, but no services. The only thing left to do is to add the EPG data from schedules direct, and map the services to channels.

If you have services showing up then lets add EPG data for you

Go here and register for an account

You have to run this as user hts, so lets change users
sudo su - hts
(enter your password)

Run the schedule grab
sudo /usr/bin/tv_grab_na_dd --configure

Enter your schedules direct username and password, and follow the prompts.

Next go into tvheadend via your browser and navigate to the EPG Grabber section. Select schedules direct via the drop down menu and save. Next go back to Configuration --> TV Adapters and click on map DVB services to channels.

I'll clean up this last part later, I know it's kind of rough.

Any ideas why my services aren't showing up?

(2013-01-19, 06:33)Busenheimer Wrote: [ -> ]Set the kernel module to start at boot
sudo echo dvb_hdhomerun >> /etc/modules

Just a minor note, you don't need to put the kernel module in /etc/modules. When you start the dvbhdhomerun-utils service it will load the kernel module as the first thing (see /etc/init/dvbhdhomerun-utils.conf)
What is your problem? Do you see thr HDHomerun in TVH config? If not it's probably a timing issue, dvbhdhomerun needs to complete its thing before TVH launches, easiest way to do this is to delete the dvbhdhomerun launch script in init or init.d and add the dvbhdhomerun launch command to the TVH launch script then a sleep 5, something like this
pre-start script
test -x /usr/bin/tvheadend || { stop; logger -t tvheadend "cannot execute /usr/bin/tvheadend, exiting" ; exit 1; }
modprobe dvb_hdhomerun
sleep 5
sudo userhdhomerun -f
sleep 5
end script

exec su - pi -c "/usr/bin/tvheadend -C -d"

also check /var/log/dvbhdhomerun.log for errors
I can see my tuners and scan the muxes. My problem is I don't have any services.
(2013-01-20, 20:35)Busenheimer Wrote: [ -> ]I can see my tuners and scan the muxes. My problem is I don't have any services.

Sounds like maybe the hacked dvbhdhomerun isn't working, can you see services if you use the regular dvbhdhomerun?

Have you checked the dvbhdhomerun log? is there a read error at the bottom? I experienced similar problems when the kernel module and the userspace portion has mismatched versions