[mythtv-users] Can't tune HDHR

DryHeat122 . dryheat122 at gmail.com
Thu May 14 18:10:09 UTC 2020


On Thu, May 14, 2020 at 7:09 AM Klaas de Waal <klaas.de.waal at gmail.com>
wrote:

>
>
> On Thu, 14 May 2020 at 12:33, Daryl McDonald <darylangela at gmail.com>
> wrote:
>
>>
>>
>> On Wed, May 13, 2020 at 10:50 PM Stephen Worthington <
>> stephen_agent at jsw.gen.nz> wrote:
>>
>>> On Wed, 13 May 2020 16:56:07 -0700, you wrote:
>>>
>>> >On Wed, May 13, 2020 at 4:37 PM DryHeat122 . <dryheat122 at gmail.com>
>>> wrote:
>>> >
>>> >> On Wed, May 13, 2020 at 2:08 AM Stephen Worthington <
>>> >> stephen_agent at jsw.gen.nz> wrote:
>>> >>
>>> >>> On Tue, 12 May 2020 20:22:59 -0700, you wrote:
>>> >>>
>>> >>> >When it rains it pours I guess.  I was just posting about HDPVR
>>> problems
>>> >>> a
>>> >>> >few days ago.  Now Myth can't tune any channels on my HDHomerun Duo.
>>> >>> >Checked the troubleshooting section on the wiki, but it assumes the
>>> >>> problem
>>> >>> >is with the HDHR. I can tune channels just fine on a Windows
>>> machine on
>>> >>> the
>>> >>> >same network, so its not the HDHR.  Any advice on how to
>>> troubleshoot?
>>> >>>
>>> >>> Does it work if you restart mythbackend?  Are there any error
>>> messages
>>> >>> in mythbackend.log?  You can get additional logging about the
>>> >>> recording process by adding -v record to the mythbackend command
>>> line:
>>> >>>
>>> >>> root at mypvr:/etc/mythtv# cat additional.args
>>> >>> ADDITIONAL_ARGS=-v record
>>> >>>
>>> >>> Then restart mythbackend.  Or from a command line, temporarily add
>>> the
>>> >>> extra "record" logging while mythbackend is running:
>>> >>>
>>> >>> sudo mythbackend --setverbose record
>>> >>>
>>> >>> and turn it off again with:
>>> >>>
>>> >>> sudo mythbackend --setverbose norecord
>>> >>>
>>> >>> I am not sure if sudo is required above - all the second copy of
>>> >>> mythbackend is doing is to open a connection to a port on the main
>>> >>> mythbackend and send it the serverbose command.  So it may not need
>>> >>> any extra privileges.
>>> >>>
>>> >>> Thanks for the advice.  I checked the logs before doing anything, and
>>> >> found (machine ID stuff stripped out for readability):
>>> >>
>>> >> May 13 15:39:21  I ProcessRequest mainserver.cpp:1698 (HandleAnnounce)
>>> >> MainServer: MainServer::ANN Playback
>>> >> May 13 15:39:21  I ProcessRequest mainserver.cpp:1703 (HandleAnnounce)
>>> >> MainServer: adding: steve-EP45-UD3P(1f26320) as a client (events: 0)
>>> >> May 13 15:39:21  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)
>>> >> TVRec[2]: Changing from None to WatchingLiveTV
>>> >> May 13 15:39:21  I TVRecEvent mythdbcon.cpp:422
>>> (PurgeIdleConnections) New
>>> >> DB connection, total: 13
>>> >> May 13 15:39:21  I TVRecEvent tv_rec.cpp:3685 (TuningFrequency)
>>> TVRec[2]:
>>> >> TuningFrequency
>>> >> May 13 15:39:21  N CoreContext autoexpire.cpp:264 (CalcParams)
>>> AutoExpire:
>>> >> CalcParams(): Max required Free Space: 3.0 GB w/freq: 14 min
>>> >> May 13 15:39:21  N TVRecEvent recordinginfo.cpp:687
>>> >> (ApplyRecordRecGroupChange) ApplyRecordRecGroupChange: LiveTV to
>>> LiveTV (2)
>>> >> May 13 15:39:25  W TVRecEvent tv_rec.cpp:4004 (TuningSignalCheck)
>>> >> TVRec[2]: TuningSignalCheck: taking more than 3000 ms to get a lock.
>>> >> marking this recording as 'Failing'.
>>> >> May 13 15:39:25  W TVRecEvent tv_rec.cpp:4006 (TuningSignalCheck)
>>> >> TVRec[2]: See 'Tuning timeout' in mythtv-setup for this input
>>> >> May 13 15:39:36  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)
>>> >> TVRec[2]: Changing from WatchingLiveTV to None
>>> >> May 13 15:39:36  I MythSocketThread(74) mainserver.cpp:7629
>>> >> (connectionClosed) Playback sock(1f26320) 'steve-EP45-UD3P'
>>> disconnected
>>> >>
>>> >> I then rebooted and tried to tune one of the HDHR channels (3_1) from
>>> the
>>> >> program guide.  Now it doesn't even try to tune and I get:
>>> >>
>>> >> May 13 15:55:33  I ProcessRequest mainserver.cpp:1698 (HandleAnnounce)
>>> >> MainServer: MainServer::ANN Playback
>>> >> May 13 15:55:33  I ProcessRequest mainserver.cpp:1703 (HandleAnnounce)
>>> >> MainServer: adding: steve-EP45-UD3P(13e54b0) as a client (events: 0)
>>> >> May 13 15:55:33  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)
>>> >> TVRec[2]: Changing from None to WatchingLiveTV
>>> >> May 13 15:55:33  I TVRecEvent tv_rec.cpp:3685 (TuningFrequency)
>>> TVRec[2]:
>>> >> TuningFrequency
>>> >> May 13 15:55:33  E TVRecEvent dtvmultiplex.cpp:379 (ParseTuningParams)
>>> >> DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000
>>> >> May 13 15:55:33  E TVRecEvent recorders/dtvchannel.cpp:299
>>> >> (SetChannelByString) DTVChan[2](10668BF0-0): SetChannelByString(3_1):
>>> >> Failed to initialize multiplex options
>>> >> May 13 15:55:33  E TVRecEvent tv_rec.cpp:3763 (TuningFrequency)
>>> TVRec[2]:
>>> >> Failed to set channel to 3_1. Reverting to kState_None
>>> >> May 13 15:55:33  I TVRecEvent tv_rec.cpp:1073 (HandleStateChange)
>>> >> TVRec[2]: Changing from WatchingLiveTV to None
>>> >> May 13 15:55:33  I MythSocketThread(67) mainserver.cpp:7629
>>> >> (connectionClosed) Playback sock(13e54b0) 'steve-EP45-UD3P'
>>> disconnected
>>> >>
>>> >> Hmm.  That doesn't look good.  I checked backend setup for tuners and
>>> >> nothing seems to be amiss.
>>> >>
>>> >> I also tried to follow your instructions for configuring verbose
>>> logging
>>> >> but it didn't work:
>>> >>
>>> >> steve at steve-EP45-UD3P:~$ cd /etc/mythtv
>>> >> steve at steve-EP45-UD3P:/etc/mythtv$ ls
>>> >> config.xml  config.xml.orig  session-settings
>>> >> steve at steve-EP45-UD3P:/etc/mythtv$ cat additional.args
>>> >> cat: additional.args: No such file or directory
>>> >> steve at steve-EP45-UD3P:/etc/mythtv$ ADDITIONAL_ARGS=-v record
>>> >> The program 'record' is currently not installed. You can install it by
>>> >> typing:
>>> >> sudo apt install xawtv-tools
>>> >> steve at steve-EP45-UD3P:/etc/mythtv$ cat additional.args
>>> >> cat: additional.args: No such file or directory
>>> >>
>>> >> Did you mean cat "ADDITIONAL_ARGS=-v record" > additional.args?
>>> >>
>>> >>
>>> >I just started mythbackend with the -v record option and got:
>>> >
>>> >2020-05-13 16:48:14.026697 I  MainServer: MainServer::ANN Playback
>>> >2020-05-13 16:48:14.026707 I  MainServer: adding:
>>> steve-EP45-UD3P(223c4b0)
>>> >as a client (events: 0)
>>> >2020-05-13 16:48:14.033902 I  TVRec[2]: Found channel (3_1) on current
>>> >input(2).
>>> >2020-05-13 16:48:14.044957 I  TVRec[2]: Changing from None to
>>> WatchingLiveTV
>>> >2020-05-13 16:48:14.044977 I  TVRec[2]:
>>> >ClearFlags(FrontendReady,CancelNextRecording,) -> RunMainLoop, @
>>> >tv_rec.cpp:1301
>>> >2020-05-13 16:48:14.044991 I  TVRec[2]: HandleTuning Request:
>>> Program(NULL)
>>> >channel() input() flags(LiveTV,)
>>> >2020-05-13 16:48:14.047755 I  TVRec[2]: TuningShutdowns(Program(NULL)
>>> >channel(3_1) input() flags(LiveTV,))
>>> >2020-05-13 16:48:14.048112 I  TVRec[2]: ClearFlags(PENDINGACTIONS,) ->
>>> >RunMainLoop, @ tv_rec.cpp:3663
>>> >2020-05-13 16:48:14.048122 I  TVRec[2]: No recorder yet, calling
>>> >TuningFrequency
>>> >2020-05-13 16:48:14.048129 I  TVRec[2]: TuningFrequency
>>> >2020-05-13 16:48:14.050975 E  DTVMux: ParseTuningParams -- Unknown tuner
>>> >type = 0xffffffff80000000
>>> >2020-05-13 16:48:14.051000 E  DTVChan[2](10668BF0-0):
>>> >SetChannelByString(3_1): Failed to initialize multiplex options
>>> >2020-05-13 16:48:14.051010 E  TVRec[2]: Failed to set channel to 3_1.
>>> >Reverting to kState_None
>>> >2020-05-13 16:48:14.051028 I  TVRec[2]: Changing from WatchingLiveTV to
>>> None
>>> >2020-05-13 16:48:14.051209 I  TVRec[2]:
>>> >ClearFlags(FrontendReady,CancelNextRecording,) -> RunMainLoop, @
>>> >tv_rec.cpp:1301
>>> >2020-05-13 16:48:14.051224 I  TVRec[2]: HandleTuning Request:
>>> Program(NULL)
>>> >channel() input() flags(KillRec,KillRingBuffer,)
>>> >2020-05-13 16:48:14.051236 I  TVRec[2]: TuningShutdowns(Program(NULL)
>>> >channel() input() flags(KillRec,KillRingBuffer,))
>>> >2020-05-13 16:48:14.051258 I  TVRec[2]: ClearFlags(PENDINGACTIONS,) ->
>>> >RunMainLoop, @ tv_rec.cpp:3663
>>> >2020-05-13 16:48:14.051291 I  TVRec[2]: SetFlags(CancelNextRecording,)
>>> ->
>>> >RunMainLoop,CancelNextRecording, @ tv_rec.cpp:2667
>>> >2020-05-13 16:48:14.051989 I  Playback sock(223c4b0) 'steve-EP45-UD3P'
>>> >disconnected
>>> >2020-05-13 16:48:32.395051 I  BackendContext: Frontend 'steve-EP45-UD3P'
>>> >disconnected.
>>> >2020-05-13 16:48:32.395070 I  Playback sock(224ec00) 'steve-EP45-UD3P'
>>> >disconnected
>>> >2020-05-13 16:48:32.395299 I  Monitor sock(1fdca30) 'steve-EP45-UD3P'
>>> >disconnected
>>>
>>> Two things:
>>>
>>> 1) In the prior log, I noticed that the tuning timeout was 3000 ms.
>>> That is too short these days.  It was the default value a long time
>>> ago, and anyone who has upgraded MythTV over the years will still have
>>> that, but the default these days I think is 10000 ms.  I know I had to
>>> change my settings to 10000 several versions of MythTV ago, as we have
>>> one DVB-T channel here in New Zealand ("Three") that normally takes
>>> over 7 seconds to tune.
>>>
>>> 2) I do not have any HDHRs, so I do not know exactly what messages
>>> should be seen when tuning one, but looking at the above log, I can
>>> not see anything that says mythbackend was actually ever receiving a
>>> reply from the HDHR.  So if it was my system, I would now be running
>>> Wireshark using a capture filter setting of "host <ip address of
>>> HDHR>" and seeing what the traffic was.  Was mythbackend sending
>>> messages to the right IP address?  Was the HDHR replying?  And also
>>> see what happens when VLC talks to the HDHR.
>>>
>>
> I suggest to start with mythtv-setup and check if the HDHomeRun is
> recognized and configured correct. For inspiration see
> https://www.mythtv.org/wiki/Channel_Scanning#Scanning_with_HDHomeRun_tuners
> .
> When the HDHomeRun is recognized it appears in the "Card Type" page with
> the device ID and the IP address. If that is OK then try a channel scan. If
> this does not work you can try increasing the timeouts as described in
> https://www.mythtv.org/wiki/Channel_Scanning#Signal_timeout_.28ms.29 although
> the defaults are correct for my HDHomeRun tuner collection.
> If the card is configured OK you should be able to do a channel scan and
> find all channels.
> When mythtv-setup can tune and scan then the settings are also correct for
> mythbackend.
>
> Klaas.
>
> OK I officially feel stupid.  Here's the process by which I discovered my
stupidity in case it will help anyone else.  Searching around on the error
message "DTVMux: ParseTuningParams -- Unknown tuner type =
0xffffffff80000000" led me to a page that looks useful for others having
HDHR problems (
http://gedakc.users.sourceforge.net/display-doc.php?name=pvr-hdhomerun-not-recording)
which suggested running hdhomerun_config discover. That said no devices
found; however I could ping the IP address of the HDHR. Thinking about what
could explain a working ping but a blocked connection, I remembered that right
before these problems started happening, I had set up some firewall rules
with UFW to allow me to SSH into the backend machine.  It should have
occurred to me that this could hose the HDHR connection, but it did not.

Entering sudo ufw allow from 192.168.1.100 set up the proper rule and now
it works.  There is also some stuff out there about a problem where the
backend starts before the network connections have stabilized.  This may
explain the very first log errors I posted--i.e. where HDHR doesn't work
after reboot, but does work after backend restart. We shall see if that
remains a problem.

Thanks for all the advice/input, guys.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200514/e2c0e3da/attachment-0001.htm>


More information about the mythtv-users mailing list