Linux DVB driver = success

HDHomeRun development

Moderator: Moderators

Postby kurosan » Sat Aug 27, 2011 7:20 am

Nevermind.. my bad...

I didn't execute mapping on the second tuner.

Now I'm waiting for the arrival of one cam and one cam reader to test encrypted channels from my legit susbscription.


Thanks again
kurosan
 
Posts: 2
Joined: Sat Aug 27, 2011 6:26 am

Will this work with HDHomeRun Prime

Postby snsumner » Mon Sep 05, 2011 2:03 pm

I'm curious if this driver will work with the HDHomeRun Prime that has a cablecard? I'm interested is using tvheadend as a backend to XBMC using HDHomeRun Prime.
snsumner
 
Posts: 21
Joined: Sun Sep 04, 2011 3:43 pm

Postby snsumner » Mon Sep 05, 2011 3:02 pm

So it appears that these drivers kind of work with HDHomeRun Prime (3 Tuner Model) from what I've seen in my initial tests:

sssumner@tunerpc:~$ userhdhomerun
Num of devices = 1

Name of device: 131070DB-0
Auto detecting tuner type
Type of device: hdhomerun3_cablecard
Tuner: 0
Set initial pass-all filter for tuner: 1

Name of device: 131070DB-1
Auto detecting tuner type
Type of device: hdhomerun3_cablecard
Tuner: 1
Set initial pass-all filter for tuner: 1

Couldn't open: /dev/hdhomerun_control
sssumner@tunerpc:~$

I'm not getting the third tuner to show up? Not sure how you get it to show all three tuners. And I'm not sure why it couldn't open the /dev/hdhomerun_control

sssumner@tunerpc:~$ w_scan -f a -A 2 -c US -x
w_scan version 20091230 (compiled for DVB API 5.1)
using settings for UNITED STATES
ATSC
QAM US/CA
frontend_type ATSC, channellist 2
output format initial tuning data
Info: using DVB adapter auto detection.
/dev/dvb/adapter0/frontend0 -> ATSC "HDHomeRun ATSC": good :-)
/dev/dvb/adapter1/frontend0 -> ATSC "HDHomeRun ATSC": good :-)
Using ATSC frontend (adapter /dev/dvb/adapter0/frontend0)
-_-_-_-_ Getting frontend capabilities-_-_-_-_
Using DVB API 5.1
frontend HDHomeRun ATSC supports
INVERSION_AUTO
8VSB
16VSB
QAM_64
QAM_256
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
57000: QAM256(time: 00:00)
63000: QAM256(time: 00:04)
69000: QAM256(time: 00:08)
79000: QAM256(time: 00:13)

How do you get it to work with the third tuner?
snsumner
 
Posts: 21
Joined: Sun Sep 04, 2011 3:43 pm

Postby tfylliv » Tue Sep 06, 2011 1:54 am

snsumner wrote:So it appears that these drivers kind of work with HDHomeRun Prime (3 Tuner Model) from what I've seen in my initial tests:


Cool. :-)

snsumner wrote:How do you get it to work with the third tuner?


Well, the reason the third tuner doesn't appear can be seen on line 52 here:

http://dvbhdhomerun.cvs.sourceforge.net ... iew=markup

Code: Select all
const int MAX_TUNERS = 2;


Apparently I never thought about using the information regarding tuner count that is returned from the function hdhomerun_discover_find_devices_custom() used a couple of lines above the MAX_TUNERS line.... :-)

So, nothing you can do - well, except building a new userhdhomerun yourself and change the MAX_TUNERS to "3". Otherwise needs a new release from me. I have a couple of other minor things I want to add anyway, but probably ain't gonna happen before in couple of weeks.
tfylliv
Expert
 
Posts: 106
Joined: Sat Sep 04, 2010 3:08 pm

Postby snsumner » Tue Sep 06, 2011 8:22 am

tfylliv wrote:So, nothing you can do - well, except building a new userhdhomerun yourself and change the MAX_TUNERS to "3". Otherwise needs a new release from me. I have a couple of other minor things I want to add anyway, but probably ain't gonna happen before in couple of weeks.


When you create a new build that support this let me know and I'll test it. The other issue I ran into is that it appears that Tvheadend doesn't support Prime because of the virtual channels thing. Not sure if there are plans to support that.

I could not add muxes manually and it wouldn't let me do anything within Tvheadend even though I had two device show up.
snsumner
 
Posts: 21
Joined: Sun Sep 04, 2011 3:43 pm

Postby mrmachine » Sat Oct 15, 2011 3:59 pm

tfylliv wrote:
wilagobler wrote:The problem is in the upstart script /etc/init/dvbhdhomerun-utils.conf

Code: Select all
start on (filesystem and net-device-up and started udev)


The net-device-up event is emitted as soon as lo is up, before the real network has started. userhdhome then runs a discover when only the lo interface is running which of course fails.

To fix it change /etc/init/dvbhdhomerun-utils.conf to
Code: Select all
 start on (filesystem and net-device-up IFACE!=lo and started udev)


Which means at least one real interface is configured before running userhdhomerun.


Good point, I'll add that in the next release.


I'm also having a problem where even though I start tvheadend after dvbhdhomerun, tvheadend doesn't see my adapters. I assume it's because dvbhdhomerun needs some time to find and initialise the devices over the network? At least it does on my system. I fixed it locally by adding the following to my tvheadend.conf

Code: Select all
pre-start script
    sleep 5
end script


But it would be better to add just enough sleep to post-start in the dvbhdhomerun-utils.conf. I'm not sure how you can detect that the device is ready, though? Perhaps such a capability could be added to userhdhomerun, e.g. a --status option that will check if it's already running under another process, and if so, if it has hdhomerun devices initialised? that could be called in a sleep 1 loop in the post-start script. Then any services that depend on dvbhdhomerun can be sure it is fully started before they start.
mrmachine
 
Posts: 7
Joined: Sun Jul 17, 2011 5:56 am

Yavdr 0.4 and dvbhdhomerun

Postby anthropo » Thu Nov 03, 2011 2:02 am

Hello,

After installing the yavdr new version 0.4 (ubuntu 11.04 64bits) and dvbhdhomerun, the driver seems to be cut after a while

in the logs i can see a 'no buffer space for dvbhdhomerun...' or something like that.

Is there any setting that i'm missing ?

Thank you
anthropo
 
Posts: 8
Joined: Thu Dec 09, 2010 1:51 am

Re: Yavdr 0.4 and dvbhdhomerun

Postby tfylliv » Thu Nov 03, 2011 7:21 am

anthropo wrote:in the logs i can see a 'no buffer space for dvbhdhomerun...' or something like that.


That can more or less only happen if your machine is running out of memory (well, or if something is happening that I haven't thought about). Try copy paste the logs from you kernel regarding the hdhomerun.

From /var/log/kern.log look for

"HDHomeRun: Begin init, version 0.0.9"

And paste whatever happens after that, there is about 20-30 lines of initialization after that.

Oh, and of course look at how much memory is used on the machine something might be eating it up. :)
tfylliv
Expert
 
Posts: 106
Joined: Sat Sep 04, 2010 3:08 pm

Postby anthropo » Thu Nov 03, 2011 1:05 pm

Thanks,

It happens at the beginning, i've watched the memory (htop) just after the boot but nothing strange, it stays at 223/2048MB.

There's no process eating memory.


Here's the kern.log

Code: Select all
Nov  3 20:51:40 JetWay kernel: [   18.430740] HDHomeRun: Begin init, version 0.0.9
Nov  3 20:51:40 JetWay kernel: [   18.431081] HDHomeRun: Waiting for userspace to connect
Nov  3 20:51:40 JetWay kernel: [   18.431090] HDHomeRun: End init
Nov  3 20:51:41 JetWay kernel: [   18.939700] hdhomerun: userhdhomerun connected
Nov  3 20:51:41 JetWay kernel: [   18.939738] hdhomerun: userhdhomerun connected
Nov  3 20:51:41 JetWay kernel: [   18.939765] hdhomerun: creating dvb device for 1210CCCE-0
Nov  3 20:51:41 JetWay kernel: [   18.939957] DVB: registering new adapter (HDHomeRun)
Nov  3 20:51:41 JetWay kernel: [   18.956434] DVB: registering adapter 0 frontend 0 (HDHomeRun DVB-T)...
Nov  3 20:51:41 JetWay kernel: [   18.956663] HDHomeRun0: DVB Frontend registered
Nov  3 20:51:41 JetWay kernel: [   18.956671] HDHomeRun0: Registered DVB adapter0
Nov  3 20:51:41 JetWay kernel: [   18.956827] hdhomerun: device /dev/hdhomerun_data0 created
Nov  3 20:51:41 JetWay kernel: [   18.956970] hdhomerun: userhdhomerun connected
Nov  3 20:51:41 JetWay kernel: [   18.956984] hdhomerun: creating dvb device for 1210CCCE-1
Nov  3 20:51:41 JetWay kernel: [   18.957118] DVB: registering new adapter (HDHomeRun)
Nov  3 20:51:41 JetWay kernel: [   18.958258] DVB: registering adapter 1 frontend 0 (HDHomeRun DVB-T)...
Nov  3 20:51:41 JetWay kernel: [   18.958447] HDHomeRun1: DVB Frontend registered
Nov  3 20:51:41 JetWay kernel: [   18.958454] HDHomeRun1: Registered DVB adapter1
Nov  3 20:51:41 JetWay kernel: [   18.958597] hdhomerun: device /dev/hdhomerun_data1 created
Nov  3 20:51:41 JetWay kernel: [   18.958938] hdhomerun: userhdhomerun connected
Nov  3 20:51:41 JetWay kernel: [   19.212227] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Nov  3 20:51:41 JetWay kernel: [   19.212251] nvidia 0000:01:00.0: setting latency timer to 64
Nov  3 20:51:41 JetWay kernel: [   19.212264] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=io+mem
Nov  3 20:51:41 JetWay kernel: [   19.212591] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  270.41.06  Mon Apr 18 14:53:56 PDT 2011
Nov  3 20:51:41 JetWay kernel: [   19.284766] svc: failed to register lockdv1 RPC service (errno 97).
Nov  3 20:51:41 JetWay kernel: [   19.284952] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Nov  3 20:51:41 JetWay kernel: [   19.289583] NFSD: starting 90-second grace period
Nov  3 20:51:42 JetWay kernel: [   19.925260] ioremap error for 0x7ffb0000-0x7ffb1000, requested 0x10, got 0x0
Nov  3 20:51:43 JetWay kernel: [   21.076198] HDMI hot plug event: Pin=5 Presence_Detect=1 ELD_Valid=0
Nov  3 20:51:43 JetWay kernel: [   21.101617] HDMI hot plug event: Pin=5 Presence_Detect=1 ELD_Valid=1
Nov  3 20:51:45 JetWay kernel: [   23.180070] HDMI: detected monitor SONY TV
Nov  3 20:51:45 JetWay kernel: [   23.180077]      at connection type HDMI
Nov  3 20:51:45 JetWay kernel: [   23.180086] HDMI: available speakers: FL/FR
Nov  3 20:51:45 JetWay kernel: [   23.180099] HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 88200, bits = 16 20 24
Nov  3 20:51:45 JetWay kernel: [   23.180112] HDMI: supports coding type AC-3: channels = 6, rates = 44100 48000 88200, max bitrate = 640000
Nov  3 20:51:47 JetWay kernel: [   25.120033] HDMI: detected monitor SONY TV
Nov  3 20:51:47 JetWay kernel: [   25.120038]      at connection type HDMI
Nov  3 20:51:47 JetWay kernel: [   25.120046] HDMI: available speakers: FL/FR
Nov  3 20:51:47 JetWay kernel: [   25.120057] HDMI: supports coding type LPCM: channels = 2, rates = 44100 48000 88200, bits = 16 20 24
Nov  3 20:51:47 JetWay kernel: [   25.120068] HDMI: supports coding type AC-3: channels = 6, rates = 44100 48000 88200, max bitrate = 640000
Nov  3 20:51:50 JetWay kernel: [   28.310015] eth0: no IPv6 routers present
Nov  3 20:53:31 JetWay kernel: [  129.041258] No buffer space for hdhomerun control device!

.../...

Nov  3 20:53:34 JetWay kernel: [  132.147785] hdhomerun: userhdhomerun disconnected

in my dvbhdhomerun.log:


Code: Select all
FE_READ_STATUS
sym qual: 0
sym qual: 0
hdhomerun_device_set_tuner_channel: 1
hdhomerun_tuner_status_t: 1
hdhomerun_device_stream_start: 1
START FEED: Pid = 0
PidFilter: 0x12 0x0
PidFilter: 0x12 0x0
Open data device: /dev/hdhomerun_data1
START FEED: Pid = 11
PidFilter: 0x12 0x0 0x11
START FEED: Pid = 10
PidFilter: 0x12 0x0 0x11 0x10


.../...

FE_READ_STATUS
sym qual: 64
FAIL! We didn't receive enough bytes from the device driver!


Thank you
anthropo
 
Posts: 8
Joined: Thu Dec 09, 2010 1:51 am

Postby anthropo » Sat Nov 05, 2011 3:25 am

Hello,
I've looked in my syslog and i've seen that when it happens:

Code: Select all
Nov  5 11:11:20 JetWay vdr: [1357] frontend 0/0 was reinitialized
Nov  5 11:11:20 JetWay vdr: last message repeated 4 times
Nov  5 11:11:20 JetWay init: vdr-frontend main process (3877) terminated with status 1
Nov  5 11:11:20 JetWay init: vdr-frontend main process ended, respawning
Nov  5 11:11:21 JetWay vdr: [1357] frontend 0/0 was reinitialized
Nov  5 11:11:21 JetWay init: vdr-frontend main process (3890) terminated with status 1
Nov  5 11:11:21 JetWay init: vdr-frontend main process ended, respawning
Nov  5 11:11:21 JetWay vdr: [1357] frontend 0/0 was reinitialized
Nov  5 11:11:21 JetWay vdr: [1360] frontend 1/0 lost lock on channel 23, tp 618

Nov  5 11:11:22 JetWay vdr: [1360] frontend 1/0 was reinitialized
Nov  5 11:11:22 JetWay init: vdr-frontend main process (3903) terminated with status 1
Nov  5 11:11:22 JetWay init: vdr-frontend main process ended, respawning
Nov  5 11:11:22 JetWay vdr: [1357] frontend 0/0 was reinitialized
.../...
Nov  5 11:11:22 JetWay vdr: [1360] frontend 1/0 was reinitialized
Nov  5 11:11:22 JetWay kernel: [  107.751030] No buffer space for hdhomerun control device!


Maybe it helps ?

Thanks
anthropo
 
Posts: 8
Joined: Thu Dec 09, 2010 1:51 am

Postby tfylliv » Sat Nov 05, 2011 11:00 am

anthropo wrote:Hello,
I've looked in my syslog and i've seen that when it happens:

Code: Select all
Nov  5 11:11:22 JetWay init: vdr-frontend main process (3903) terminated with status 1
Nov  5 11:11:22 JetWay init: vdr-frontend main process ended, respawning
Nov  5 11:11:22 JetWay vdr: [1357] frontend 0/0 was reinitialized
.../...
Nov  5 11:11:22 JetWay vdr: [1360] frontend 1/0 was reinitialized
Nov  5 11:11:22 JetWay kernel: [  107.751030] No buffer space for hdhomerun control device!



Well, it is definenately interesting that the vdr-frontend is repeately crashing. This might mean that the error from the driver is simply a result of something else dying/crashing on the machine.

Easy to test though. Rename the userhdhomerun so that it can't be started next time you reboot

Code: Select all
sudo mv /bin/userhdhomerun /bin/userhdhomerun_save


Reboot, see what happens in the syslog.
tfylliv
Expert
 
Posts: 106
Joined: Sat Sep 04, 2010 3:08 pm

Postby anthropo » Sun Nov 06, 2011 7:47 am

i've done that, and nothing more happens. No crash.

But with the userhdhome run activated, i've observed that it occurs fastier with a HD channel. With a sd it keeps on working during few minutes. with a hd one only few seconds.

after each crash i restart by a sudo service dvbhdhomerun-utils start

I don't know how vdr works, it seems a little bit opaque, all the readings are in german, and i'm french... But it seems to me that every time it can't read (receive) a channel it tries the next one. In my case when it reaches a HD channel, it crashes ?

on my actual htpc, i have xbmc + yavdr 0.3 on ubuntu server distribution. i wonder why there is so many "frontend 0/0 was reinitialized" but no crashes :
Code: Select all
Nov  6 16:28:08 JetWay vdr: [2361] frontend 1/0 was reinitialized
Nov  6 16:28:09 JetWay vdr: [2361] frontend 1/0 lost lock on channel 28, tp 786
Nov  6 16:28:09 JetWay vdr: [2361] frontend 1/0 regained lock on channel 28, tp 786
Nov  6 16:28:09 JetWay vdr: [2358] frontend 0/0 was reinitialized
Nov  6 16:28:09 JetWay vdr: [2358] frontend 0/0 was reinitialized
Nov  6 16:28:10 JetWay vdr: [2361] frontend 1/0 was reinitialized
Nov  6 16:28:13 JetWay vdr: last message repeated 2 times



I must leave my computer during 2 days but i'll keep searching more.

Thank you
anthropo
 
Posts: 8
Joined: Thu Dec 09, 2010 1:51 am

Postby perko » Wed Nov 09, 2011 2:23 am

Hi

I am running mythbuntu 11.10, on a box I use as both FE and BE for mythtv,
it has two DVB PCI tuner cards , and a dual tuner HDHomerun3, and I was having problems with the EIT scan on the HDhomerun tuners, (From Danish Cable provider YouSee) then I found your driver.

I have just compiled it, and are testing, so far it looks like it is working, off cause I ned more testing than just a few minutes of live TV viewing to say for sure; but so far it looks good.

Thanks Per
perko
 
Posts: 4
Joined: Fri May 27, 2011 1:47 am

Postby tfylliv » Wed Nov 09, 2011 4:29 am

Hi Per,

perko wrote:I have just compiled it, and are testing, so far it looks like it is working, off cause I ned more testing than just a few minutes of live TV viewing to say for sure; but so far it looks good.


Just fyi, on xxxbuntu you don't need to compile, there are packages available.

http://sourceforge.net/apps/trac/dvbhdh ... tuPackages

Unless of course you want to compile yourself. ;-)
tfylliv
Expert
 
Posts: 106
Joined: Sat Sep 04, 2010 3:08 pm

Postby perko » Wed Nov 09, 2011 9:15 am

tfylliv wrote:Hi Per,

Just fyi, on xxxbuntu you don't need to compile, there are packages available.

http://sourceforge.net/apps/trac/dvbhdh ... tuPackages

Unless of course you want to compile yourself. ;-)


I did not think you had a package for ubuntu 11.10
(kernel is 3.0.0-12-generic-pae), I did not see anything newer than 11.04.

But off cause, I need to look at your setup for starting as daemon, I am new to xxbuntu, more used to OpenSuse, so for now, I just did put:

Code: Select all
# Start the custom HDhomerun3 driver
cd /home/per/dvbhdhomerun-0.0.9/userhdhomerun
nohup make run &


in /etc/rc.local

not so elegant; but it does work :wink:

Per
perko
 
Posts: 4
Joined: Fri May 27, 2011 1:47 am

PreviousNext

Return to Development - HDHomeRun

Who is online

Users browsing this forum: No registered users and 0 guests