HDHomeRun Prime Tuner Locked (1 Viewer)

ChairmanMao

New Member
January 21, 2014
35
3
68
Home Country
United States of America United States of America
I'm evaluating MP1.6 as a replacement for SageTV (I'm still wrestling with getting usable program guide data to schedule recordings). I'm running MP under Win8.1 64 bit, using an HDHomeRun Prime as my TV source.

In the course of previewing and/or watching channels I've noticed that MP doesn't appear to be "releasing" the HDHomeRun Prime tuner(s). For example, after successfully watching a TV program opened from the program guide, I'll close the TV window and then close MP, only to find that the "tuner in use" light on the Prime is still active. So far I've noticed that it stays active for at least a couple of hours (at that point I reboot the Prime, which clears the "active" condition).

Has anyone else noticed this? Is there some manual shutdown process I need to use with the Prime before I shut down MP?
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello again :)

    In the course of previewing and/or watching channels I've noticed that MP doesn't appear to be "releasing" the HDHomeRun Prime tuner(s). For example, after successfully watching a TV program opened from the program guide, I'll close the TV window and then close MP, only to find that the "tuner in use" light on the Prime is still active. So far I've noticed that it stays active for at least a couple of hours (at that point I reboot the Prime, which clears the "active" condition).

    Has anyone else noticed this? Is there some manual shutdown process I need to use with the Prime before I shut down MP?
    Nope, no manual shutdown. Just firewall again. As per this recent thread:
    https://forum.team-mediaportal.com/...leasing-deactivating-tuners-when-done.124174/

    mm
     

    ChairmanMao

    New Member
    January 21, 2014
    35
    3
    68
    Home Country
    United States of America United States of America
    Thanx, mm. I've read that thread, and at least as of the time I reviewed it, I'm not clear on what the solution is. What does "Give firewall full access to the Prime" mean in the context of the Windows Firewall, which is what I'm using? I've executed all of the firewall rule modifications specified for the Windows firewall on the relevant MP wiki page already. What else is needed?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    For a start, disable the firewall completely to confirm that the problem is solved when it is out of the loop.

    What does "Give firewall full access to the Prime" mean in the context of the Windows Firewall, which is what I'm using? I've executed all of the firewall rule modifications specified for the Windows firewall on the relevant MP wiki page already. What else is needed?
    It means give the TvService.exe full access to your network. Remove any and all restrictions on it.

    When I deal with firewalls, my approach is not to try and figure out ports and protocols to enable on a per-program basis. I find that to be a waste of my time as firewalls inevitably end up blocking more stuff that shouldn't be than actually protecting me, and this causes problems in other programs.

    For me it is simple: I don't run a firewall, so if I trust a program it gets installed and automatically has full access; I don't install anything I don't trust.

    If you want to run a firewall that is fine. I just can't tell you the specifics of the rules you need to apply or menus you have to go through and changes you have to make to solve this problem.
     

    ChairmanMao

    New Member
    January 21, 2014
    35
    3
    68
    Home Country
    United States of America United States of America
    Fair enough. I do run one, and plan on continuing to do so.

    I checked the Windows Firewall settings. TVService.exe has complete and unfettered inbound connections for all ports for both TCP and UDP connections. It has complete and unfettered outbound connections for all ports and all protocols.

    So I don't think that's the problem with the HDHomeRun Prime tuner being locked up. I'll confirm that in the morning by turning off the firewall completely and accessing the Prime (don't want to risk mucking up some SageTV-controlled recordings taking place right now).
     

    ChairmanMao

    New Member
    January 21, 2014
    35
    3
    68
    Home Country
    United States of America United States of America
    Some more information:

    I did three experiments:
    • doing a scheduled recording with Windows Firewall on
    • watching live TV with Windows Firewall on
    • watching live TV with Windows Firewall off
    In addition to whatever the MP install routine does on its own, Windows Firewall was configured using the command line commands listed in the wiki for configuring it (i.e., I ran all the listed commands after doing a standard install). My hardware setup uses an HDHomeRun Prime as a capture device. I verified that Windows Firewall, after all I did, imposes no port or protocol constraints on TVService.exe for outbound connections. For inbound connections, there are no constraints on either UDP or TCP connections (I presume this means other protocols are constrained).
    • Watching live TV with Windows Firewall turned ON results in a tuner getting locked. You have to power cycle the Prime to clear it.
    • Watching live TV with Windows Firewall turned OFF does not lock a tuner. When you're done watching the live stream, the tuner is properly released.
    • Doing a scheduled recording with Windows Firewall turned ON does not lock a tuner. When the recording is finished, the tuner is properly released.
    This shows that the firewall configuration is an issue. But it also shows that it doesn't have to be an issue, and that apparently tuner release is handled differently when doing a scheduled recording as compared to watching a live TV stream.

    If I get some time I'll install wireshark and see if I can grab & upload some network activity logs.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    This shows that the firewall configuration is an issue.
    Agreed... :)

    But it also shows that it doesn't have to be an issue, and that apparently tuner release is handled differently when doing a scheduled recording as compared to watching a live TV stream.
    The code is exactly the same, so I'm not sure how that is possible. :confused:

    If I get some time I'll install wireshark and see if I can grab & upload some network activity logs.
    Comment directly from Silicondust, July last year:
    What I'm seeing in the logs is that MP sometimes isn't generating RTSP:Teardown messages, and that is what triggers the unlock. Log attached of 2 back to back previews in TVServer Configuration. Channel 7 played, teardown was sent, tuner unlocked immediately. Channel 9 played, but no Teardown was sent, and thus it did not release. The reason it appears to work for some people is that if no firewall is running, when the socket closes, an ICMP reject will be generated, which will stop the stream and release the tuner automatically 30s later. When a firewall is running, it silently drops those packets on the floor, so streaming continues indefinitely.

    AFAIK we do send the Teardown requests every time. I don't have a CableCARD tuner to enable me to prove that though. So, you need to configure the firewall to allow ICMP rejects to be passed through.
     

    ChairmanMao

    New Member
    January 21, 2014
    35
    3
    68
    Home Country
    United States of America United States of America
    Not sure if this will help, but I installed wireshark and had it capture a watch live TV session which, when I ended up, left the HDHomeRun Prime with a locked tuner.

    Even though this was only a brief capture it generated a 40+MB file (gotta love those video streams :)). Rather than upload all of that, I filtered out everything that didn't come from the avt-profile-1 port on the Prime. All of >>those<< packets went to the same port on my server, so I presume they're the video data.

    I've attached the handful of remaining packets to this post. The capture, BTW, was done with the firewall running. You'll have to strip the .txt extension off the upload for Wireshark to recognize the file. The uploader doesn't like .pcapng files.

    You can see the teardown request, followed shortly thereafter by an ICMP packet. But it's a destination port unreachable. I don't know if that means the firewall was killing off the ICMP packet or not.

    If anyone knows what this means I'd be interested in the explanation.
     

    Attachments

    • HDHomeRun Prime Filtered.pcapng.txt
      4.7 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello again

    You can see the teardown request, followed shortly thereafter by an ICMP packet. But it's a destination port unreachable. I don't know if that means the firewall was killing off the ICMP packet or not.

    If anyone knows what this means I'd be interested in the explanation.
    The way I read it, the ICMP message is a response to the previous UDP packet to port 57215. It is telling the PRIME that the packet didn't make it to the intended destination and was simply dropped because the port is unreachable (presumably because TV Server closed it and is no longer listening there).

    The port number looks like a port TV Server might use for streaming. I can't be sure though. I do know that the IPTV filter closes down everything immediately after it sends the TEARDOWN request. It is not interested in receiving any further data.

    Clearly we send a TEARDOWN. To the best of my knowledge the PRIME should unlock after that. If reception of an ICMP is required to unlock then it is possible that your firewall is blocking that packet. I don't know as we can't see what is going out on the other side of the firewall.

    mm
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand

    Users who are viewing this thread

    Top Bottom