Fail to correctly record 2 channels on same tuner (1 Viewer)

melstig

Portal Pro
July 16, 2006
129
12
Umea
Home Country
Sweden Sweden
In the first try the error occured, so the logs will be really clean :)

1. Started MP Client.
2. Went into TV-Section, TV3 was tuned previusly so MP tried to start TV3.
3. TV GUI comes up, TV is *not* running even though I have configured MP to start live TV in full screen. No error messages at all.
4. Tried to manually start TV in the GUI, "No audio or video found" came up.
5. Tried again to manually start TV in the GUI, this time it worked and TV3 started to play!
6. Exited and collected logs.

melstig
 

melstig

Portal Pro
July 16, 2006
129
12
Umea
Home Country
Sweden Sweden
Started MP again and this time TV3 started to play the first time. Same logs as before but with another succesful TV3 start.
melstig
 

mm1352000

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

    Too many things at once, I'm getting overwhelmed and confused :confused:

    So this is what I understand:

    -------------------------------------------------------------------------------------------
    1. You have a problem with resume from standby where the tuners appear as "unknown". TV Server has to be restarted before they work.

    I asked you to test something (the delayed start). Have you done that?
    In answer to your question about the difference between a powerscheduler "reinitialise" and a TV Server "restart": I don't think there is any difference, but I don't use power scheduler for a number of reasons. Maybe the biggest is that sleeping/hibernating can cause driver issues. Tuner cards are *especially* bad for this! If setting to not "reinitialise" on resume fixes this problem then do that. If it doesn't, then please tell me so we can try specific things *one at a time*.

    -------------------------------------------------------------------------------------------
    2. You have a problem with restarting TV automatically when you go into the TV section of MediaPortal. Sometimes it works and sometimes it doesn't...

    I have looked at your logs and the TV Server successfully tuned to TV3 on both test (when TV started, and when TV didn't start). The reason TV3 failed on the second attempt of the first test is that the TV Server thought TV3 was already timeshifting so it just tried to read the file. This failed, probably for similar reasons to what we have already talked about in relation to viewing a recording. When it failed, it stopped the tuner from timeshifting. The third attempt worked because timeshifting started fresh...

    I don't know why the second test worked and the first didn't. This could be a bug in MediaPortal, an issue with "joining" an existing stream, or an H7 descrambling issue. I think we still haven't confirmed that you can reliably record/view multiple scrambled channels at once.

    -------------------------------------------------------------------------------------------
    3. I am still waiting for the log of TV Service starting and the first H7 tune.

    I am trying to discover what features your tuner supports but your tuner is returning "garbage" information. We can't go any further until you get these to me. *Please* do this as soon as you can. It should only take a minute, and it is *very* important to me (like multi-channel decryption is for you).

    -------------------------------------------------------------------------------------------

    Okay, to summarise:
    1. Please tell me if issue 1 is already fixed by not asking Powerscheduler to reinitialise TV Server after resume.
    2. Please tell me if issue 1 and issue 2 also happen when you use the unmodified (original TV Server 1.1.2) TVLibrary.dll. Logs probably won't help for this.
    3. Please do the testing for issue 3 and post logs.
     

    melstig

    Portal Pro
    July 16, 2006
    129
    12
    Umea
    Home Country
    Sweden Sweden
    Hi,
    First I would like to say how glad I am that You are trying so hard to help me, thank you very much. :)

    1. I have been doing this since I woke up today. :)
    The problem is that a short suspend seems to work but not a "longer" over night. I tried to prolonging the waiting in detecting the cards to 90s, and also 10s and waiting for a half an hour or so, but after that it did still work. But, with a 2s delay as I had before also works after a 30 min standby. In the last try, after 1h standby and 2s delay, the tuners was lost.

    I saw one thing in the logs that sticks out, namely that after the init the server is using IP-address 127.0.0.1 and after a restart of the service it is using 192.168.0.20. Perhaps this messes up TVServer because in the configuration 192.168.0.20 is used, and if the server thinks it is only using localhost, it might be problems?!?

    After the init of service efter resume whe cards are lost (from first log):
    2010-12-31 11:44:39.001429 [PowerEventThread(8)]: Controller: started at HTPCW7
    2010-12-31 11:44:39.002429 [PowerEventThread(8)]: Controller: local ip address:127.0.0.1

    After restart of service (from second log):
    2010-12-31 11:48:20.552255 [TVService(4)]: Controller: started at HTPCW7
    2010-12-31 11:48:20.552255 [TVService(4)]: Controller: local ip address:192.168.0.20
    2010-12-31 11:48:20.630255 [TVService(4)]: Controller: server running on 192.168.0.20

    I will of course also verify more if disabling the init of the tuners works "out of the box" so we can focus on the multiple channels issue. From post #50 it worked this morning so I will configure it so.

    2. This behaviour happened with the original dll also, fail to start schrambled channels directly on the start of MP. The failure of viewing live TV when changing from FTA on T5 to a scrambled channel on H7 also happened before. Perhaps it is a player issue in MP and not a server tuning problem, for me it is hard to tell. The way to get it to work is to tune the same channel a couple of times as you have seen or go to another channel and back again. It is the same for both situations.

    3. I thougt I sent these in post #51.
    What exactly would you like me to do? I think I have misunderstood you regarding the info you need :)

    br
    melstig
     

    mm1352000

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

    Thank you for that post Melstig. It helped me to understand things a lot better :)

    Hi,
    1. I have been doing this since I woke up today. :)
    The problem is that a short suspend seems to work but not a "longer" over night. I tried to prolonging the waiting in detecting the cards to 90s, and also 10s and waiting for a half an hour or so, but after that it did still work. But, with a 2s delay as I had before also works after a 30 min standby. In the last try, after 1h standby and 2s delay, the tuners was lost.

    I saw one thing in the logs that sticks out, namely that after the init the server is using IP-address 127.0.0.1 and after a restart of the service it is using 192.168.0.20. Perhaps this messes up TVServer because in the configuration 192.168.0.20 is used, and if the server thinks it is only using localhost, it might be problems?!?
    Good spotting :)
    Yes, it could well be the problem.

    What you're seeing could be caused by what they call a "race condition". You have three critical things that have to load after resume:
    1. Network driver
    2. TV Server
    3. Tuner drivers

    The network driver must load before TV Server so that the static IP address is ready for TV Server to connect to again. If TV Server doesn't wait long enough for the network driver to load then the network driver may not have applied the static IP address yet.
    The tuner drivers must also load before TV Server so that TV Server can detect and use the tuners again. If TV Server doesn't wait long enough then the tuners may not be detected, or they may appear as "unknown".
    There is no guarantee of the order in which these processes will load or how long they will take. I don't think 2 seconds is long enough though. On a fast computer, I'd guess that 15 seconds would be a minimum. Anything below that and you may find that sometimes it works and sometimes it doesn't, depending on the order in which the OS chooses to do things (which is why it is called a "race" condition).

    I'm pretty sure that delaying the startup of TV Server should fix this, however you should also be aware that some tuner drivers don't handle going into resume or hibernate well. Tuners with problems often "disappear" (ie. they're not in device manager) or don't function properly after hibernate/sleep. The only solution for that is to restart. If the H7 is one of those tuners then there is nothing we can do except disable sleep and hibernate, however I don't think it is the problem here. We'll see what happens...

    I will of course also verify more if disabling the init of the tuners works "out of the box" so we can focus on the multiple channels issue. From post #50 it worked this morning so I will configure it so.
    Please do. Like you say, once you find something that works then we can focus on the things that I can help with ;)

    2. This behaviour happened with the original dll also, fail to start schrambled channels directly on the start of MP. The failure of viewing live TV when changing from FTA on T5 to a scrambled channel on H7 also happened before. Perhaps it is a player issue in MP and not a server tuning problem, for me it is hard to tell. The way to get it to work is to tune the same channel a couple of times as you have seen or go to another channel and back again. It is the same for both situations.
    Interesting. It is good to know that the issue probably wasn't caused by what I've been doing, but we certainly want to solve this if possible. It *appears* like it is not a TV Server issue so I will ask some other team members for their opinions...

    3. I thougt I sent these in post #51.
    What exactly would you like me to do? I think I have misunderstood you regarding the info you need :)
    Your logs from your last post show what I was looking for 3 times :p

    Code:
    2010-12-31 08:59:40.197063 [(14)]: debug: get device info ps is *not* null
    2010-12-31 08:59:40.197063 [(14)]: debug: name = Ä
    2010-12-31 08:59:40.198063 [(14)]: debug: type = -1
    2010-12-31 08:59:40.198063 [(14)]: debug: speed = -1
    2010-12-31 08:59:40.199063 [(14)]: debug: MAC address = ÿÿÿÿÿ
    2010-12-31 08:59:40.199063 [(14)]: debug: CI support = -1
    2010-12-31 08:59:40.200063 [(14)]: debug: TS packet length = -1
    2010-12-31 08:59:40.200063 [(14)]: debug: PID filter present = 255
    2010-12-31 08:59:40.201063 [(14)]: debug: PID filter bypass supported = 255
    2010-12-31 08:59:40.201063 [(14)]: debug: get driver info ps is *not* null
    2010-12-31 08:59:40.202063 [(14)]: debug: driver major version = C4
    2010-12-31 08:59:40.202063 [(14)]: debug: driver minor version = 0
    2010-12-31 08:59:40.203063 [(14)]: debug: firmware major version = 49
    2010-12-31 08:59:40.203063 [(14)]: debug: firmware minor version = 0
    2010-12-31 08:59:40.204063 [(14)]: debug: date = `–ºÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    2010-12-31 08:59:40.204063 [(14)]: debug: company = ÿÿÿÿÿÿÿ
    2010-12-31 08:59:40.204063 [(14)]: debug: hardware info = ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    2010-12-31 08:59:40.205063 [(14)]: debug: CI flags = FF
    
    2010-12-31 09:31:32.001878 [(24)]: debug: get device info ps is *not* null
    2010-12-31 09:31:32.001878 [(24)]: debug: name = p¼H
    2010-12-31 09:31:32.002879 [(24)]: debug: type = -1
    2010-12-31 09:31:32.002879 [(24)]: debug: speed = -1
    2010-12-31 09:31:32.003879 [(24)]: debug: MAC address = ÿÿÿÿÿ
    2010-12-31 09:31:32.003879 [(24)]: debug: CI support = -1
    2010-12-31 09:31:32.004879 [(24)]: debug: TS packet length = -1
    2010-12-31 09:31:32.004879 [(24)]: debug: PID filter present = 255
    2010-12-31 09:31:32.005879 [(24)]: debug: PID filter bypass supported = 255
    2010-12-31 09:31:32.005879 [(24)]: debug: get driver info ps is *not* null
    2010-12-31 09:31:32.006879 [(24)]: debug: driver major version = 70
    2010-12-31 09:31:32.006879 [(24)]: debug: driver minor version = 6
    2010-12-31 09:31:32.007879 [(24)]: debug: firmware major version = BC
    2010-12-31 09:31:32.007879 [(24)]: debug: firmware minor version = 8
    2010-12-31 09:31:32.008879 [(24)]: debug: date = H
    2010-12-31 09:31:32.008879 [(24)]: debug: company = ÿÿÿÿÿÿÿ
    2010-12-31 09:31:32.009879 [(24)]: debug: hardware info = ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    2010-12-31 09:31:32.009879 [(24)]: debug: CI flags = FF
    
    2010-12-31 10:44:01.608563 [(31)]: debug: get device info ps is *not* null
    2010-12-31 10:44:01.609564 [(31)]: debug: name = x¾ૼÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    2010-12-31 10:44:01.609564 [(31)]: debug: type = -1
    2010-12-31 10:44:01.610564 [(31)]: debug: speed = -1
    2010-12-31 10:44:01.611564 [(31)]: debug: MAC address = ÿÿÿÿÿ
    2010-12-31 10:44:01.611564 [(31)]: debug: CI support = -1
    2010-12-31 10:44:01.612564 [(31)]: debug: TS packet length = -1
    2010-12-31 10:44:01.613564 [(31)]: debug: PID filter present = 255
    2010-12-31 10:44:01.613564 [(31)]: debug: PID filter bypass supported = 255
    2010-12-31 10:44:01.614564 [(31)]: debug: get driver info ps is *not* null
    2010-12-31 10:44:01.614564 [(31)]: debug: driver major version = 78
    2010-12-31 10:44:01.615564 [(31)]: debug: driver minor version = 17
    2010-12-31 10:44:01.616564 [(31)]: debug: firmware major version = BE
    2010-12-31 10:44:01.616564 [(31)]: debug: firmware minor version = 8
    2010-12-31 10:44:01.617564 [(31)]: debug: date = ૼÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    2010-12-31 10:44:01.618564 [(31)]: debug: company = ÿÿÿÿÿÿÿ
    2010-12-31 10:44:01.618564 [(31)]: debug: hardware info = ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    2010-12-31 10:44:01.619564 [(31)]: debug: CI flags = FF

    The tuner information is still rubbish as you can see. I'm going to look at the code again tomorrow and see if I've made some mistakes. It is important for you to know what to do since we're going to have to do this again several times...

    Firstly, the information only shows when the H7 is loaded. The process is:

    1. TV Server starts and initialises.
    2. Your H5s are preloaded.
    3. You tune to a channel that uses the H7 => H7 loaded ===> information I want gets put in the logs

    I hope that makes sense :)
     

    melstig

    Portal Pro
    July 16, 2006
    129
    12
    Umea
    Home Country
    Sweden Sweden
    Hi again,
    The decryption of multiple channels do only work with the Red VIACCESSS CAM P/N 904240 Rev 1.0. When using the newer Dilog Viaccess CAM with 99025 printed on the front, the H7 can only decrypt one channel. A message pops up stating that the second channel is encrypted. The log are from these tests.

    The old Red VIACCESSS CAM cannot be bought anymore so it would be great if You could find the cause of this. :)
    I will try to buy/borrow a brand new Dilog CAM to see if there is a difference.

    br
    melstig

    [Edit: I tried to roll back the driver to an earlier version for the H7 to see if the "rubbish" changed, but there was no improvements so I installed the latest driver again. ]
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Happy new year melstig!!! :D

    The decryption of multiple channels do only work with the Red VIACCESSS CAM P/N 904240 Rev 1.0. When using the newer Dilog Viaccess CAM with 99025 printed on the front, the H7 can only decrypt one channel. A message pops up stating that the second channel is encrypted. The log are from these tests.

    The old Red VIACCESSS CAM cannot be bought anymore so it would be great if You could find the cause of this. :)

    Did you try the original TV Server DLL with the Dilog CAM? I suggest you do that first.
    If that doesn't work then I think it is likely that the Dilog CAM doesn't support decrypting multiple channels at once. There is certainly nothing more that I can think of right now that I could do to try and make it work. Unfortunately I'm not a magician; if the CAM hardware or firmware doesn't support multiple decryption then there is nothing that I can do that would make multiple decryption work. You may want to start hoarding the Red VIACCESS CAMs ;)

    I will try to buy/borrow a brand new Dilog CAM to see if there is a difference.

    Did you manage to get a CAM for testing?

    [Edit: I tried to roll back the driver to an earlier version for the H7 to see if the "rubbish" changed, but there was no improvements so I installed the latest driver again. ]

    Thank you for trying the older driver. I haven't had a lot of time to work on this issue in the last week or so, however today I managed to make some progress by testing with a damaged OEM Twinhan tuner that I had in my cupboard. Can you please try the attached patch to see if it fixes the garbage.

    Thanks in advance :)
     

    Attachments

    • TVLibrary(v1.05)[Twinhan_improvements_1.1.2].zip
      152.3 KB

    mm1352000

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

    I guess you must be busy with other things at the moment. I have also been busy, but with related work. We're trying to get CI menus working for Terratec tuners...

    Today I've had some time to work on the multiple decryption issue that we've talked about. I have a new version for you to test that does things in a completely different way to what I did before. If you have some time can you please test this?

    Thanks in advance :D
     

    Attachments

    • TVLibrary(v1.4)[Twinhan_improvements_1.1.2].zip
      153 KB

    melstig

    Portal Pro
    July 16, 2006
    129
    12
    Umea
    Home Country
    Sweden Sweden
    Hi mm1352000,

    Hi again Melstig

    I guess you must be busy with other things at the moment. I have also been busy, but with related work. We're trying to get CI menus working for Terratec tuners...

    Today I've had some time to work on the multiple decryption issue that we've talked about. I have a new version for you to test that does things in a completely different way to what I did before. If you have some time can you please test this?

    Thanks in advance :D

    Glad to now that you're not just being lazy! I've been rather busy with other things not related to HTPC. :)

    This last version is not working at all for me with scrambled channels, I can not tune in a single channel. See attached logs.

    br
    melstig
     

    melstig

    Portal Pro
    July 16, 2006
    129
    12
    Umea
    Home Country
    Sweden Sweden
    mm1352000. Happy New year to you too! :)

    Did you try the original TV Server DLL with the Dilog CAM? I suggest you do that first.
    Yes, erarlier with the original dll with the same bad result as the VIACCESS CAM.

    Did you manage to get a CAM for testing?
    No, not yet.

    Thank you for trying the older driver. I haven't had a lot of time to work on this issue in the last week or so, however today I managed to make some progress by testing with a damaged OEM Twinhan tuner that I had in my cupboard. Can you please try the attached patch to see if it fixes the garbage.

    Thanks in advance :)
    It seems to be working better now. Good work! See attached logs.

    2011-01-09 14:11:21.208190 [(6)]: debug: driver major version = 1.0
    2011-01-09 14:11:21.208190 [(6)]: debug: driver minor version = 6.7
    2011-01-09 14:11:21.209190 [(6)]: debug: firmware major version = 0.0
    2011-01-09 14:11:21.210190 [(6)]: debug: firmware minor version = 0.3
    2011-01-09 14:11:21.211190 [(6)]: debug: date = Oct 25 2010 16:41:18
    2011-01-09 14:11:21.211190 [(6)]: debug: company = TWINHAN
    2011-01-09 14:11:21.212190 [(6)]: debug: hardware info = 6007 Usb DVB-T/C TVBox
    2011-01-09 14:11:21.212190 [(6)]: debug: CI event mode supported
    .

    br
    melstig
     

    Users who are viewing this thread

    Top Bottom