DVB S/S2 cards on legacy PCI interface. | Page 6

Discussion in 'TV-Cards' started by Kotik, September 22, 2016.

  1. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,541
    Likes Received:
    4,752
    Ratings:
    +8,220 / 17
    Home Country:
    New Zealand New Zealand
    Hope you saw my edit. For example, I'm aware (because somebody told me directly) that Digital Devices - whose products are much more expensive than TBS products - auto-detect the modulation (DVB-S vs. DVB-S2)... and probably more. My point is: what you're seeing here could be normal in the world of tuner drivers/hardware. The fact that TBS products have this behaviour is not necessarily indicative of a poor product.


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Kotik
    • Premium Supporter

    Kotik MP Donator

    Joined:
    March 19, 2009
    Messages:
    699
    Likes Received:
    337
    Gender:
    Male
    Location:
    Athens
    Ratings:
    +555 / 2
    Home Country:
    Greece Greece
    Show System Specs
    Well I added some more info into my report, lets see what they answer.

    And no I was not angry, a bit frustrated maybe.

    I will be honest with you, I am more disappointed than mad.
    --- Post updated ---
    @mm1352000

    Are u willing in implementing a simple tune delay after a GoToX commad as a patch file?

    I am not familiar with MP code and generally not familiar with any code, I am afraid that it will take me days before I even understand what I have to add and where.

    A simple static delay, preferably adjustable from some kind of debug settings would spare me from lots of trouble. That is if of course your are in the mood to work on it and got the time fore it.

    EDIT: It could be in ur TBS patch if it is easier for u, and in order not to break anything the default value could remain as is, with a debug option somewhere to adjust it.
     
  4. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,312
    Likes Received:
    6,256
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,290 / 9
    Home Country:
    France France
    Show System Specs
    Maybe i could try to make a patch for helping just need to point to the correct code :)
     
  5. Kotik
    • Premium Supporter

    Kotik MP Donator

    Joined:
    March 19, 2009
    Messages:
    699
    Likes Received:
    337
    Gender:
    Male
    Location:
    Athens
    Ratings:
    +555 / 2
    Home Country:
    Greece Greece
    Show System Specs
    Good morning @Sebastiii

    The part that needs editing is DiSEqCMotor.cs and specifically the lines 445 & 448 System.Threading.Thread.Sleep(100);
    If possible replace 100 with 1000 in both lines, no need for debug option for now, I just want to troubleshoot, if I see something positive I will inform u.
    I am still trying to think out a way of making sure we are never getting a Lock On at the wrong frequency. Adding 1000ms is of course an ugly solution but lets see if it work.

    Thanx in advance.
     
    • Thank You! Thank You! x 1
  6. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,312
    Likes Received:
    6,256
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,290 / 9
    Home Country:
    France France
    Show System Specs
    Good morning too :)
    Will look that, what MP/TV version did you use to build on the correct one ?
     
  7. Kotik
    • Premium Supporter

    Kotik MP Donator

    Joined:
    March 19, 2009
    Messages:
    699
    Likes Received:
    337
    Gender:
    Male
    Location:
    Athens
    Ratings:
    +555 / 2
    Home Country:
    Greece Greece
    Show System Specs
    I didnt use any version, or what do u mean? The patch should be based on Master.


    Sent from my GT-I9100 using Tapatalk
     
    • Like Like x 1
  8. Kotik
    • Premium Supporter

    Kotik MP Donator

    Joined:
    March 19, 2009
    Messages:
    699
    Likes Received:
    337
    Gender:
    Male
    Location:
    Athens
    Ratings:
    +555 / 2
    Home Country:
    Greece Greece
    Show System Specs
    Got news from TBS,

    This is what he says:

    "Hi Kotik

    Thanks for your detail feedback ,the problem still the DVB soft .

    As our card just a device we just accpet command why DVBDream works this is because when you use goto Diseqc command
    it do not send lock message to our driver it wait your dish finished the move then send command to lock .

    for other soft once send the diseqc to move the dish then send command to lock our card will lock it immediately .

    Thanks

    Kind Regards

    steven"

    As you can see as per TBS it is a DVB application issue and I cannot blame them, lets be honest, the most compatible way for any DVB card would be to 1st stop the channel, then send the GoToX command, then calculate a delay based on satellite position distance and only after this delay issue a lock command to the tuner. This would solve the issues I am having for both SkyStarHD2 and TBS 6902. So I got two options left:

    1. Add a static delay after the GoToX command.

    2. Implement a hardware relay switch that would turn off the LNB during motor movement.

    I like the second solution more cause keep in mind that channel switching will be much faster than with the first solution. But it requires from me to disassemble my motor, something that I have done in the past with an older motor that I had but it is a difficult task and it also requires to fine tune the dish again after I am done with the modification. I am also afraid regarding the LNB On/Off power switching, it is something untested and as so has its own risks. But it is by far the best solution regarding TBS 6902 (this solution would not work for SkyStart HD2 since SkyStar HD2 would still time out while trying to Lock On).

    The second solution is universal, but in its basic and static form of xxx amounts of delay between motor movement command and tune lock commands it will require a high amount of delay if u want to be able to switch between satellites that are far apart. In any case I would love to try the 2nd solution since this will save me from spending time at my roof, it is getting cold here :).

    @mm1352000

    I got a couple of questions:

    1. Do we send a STOP tune command to the tuner before we initiate motor movement? I am asking cause if we don't send one and delay the next tune command then as u can imagine we will run into the same issue but with different frequencies this time, the result will be the tuner trying to re-lock to the previous channel while the dish is moving and we still didn't instruct new tuning details.

    2. How would u suggest implementing dynamic delays based on position distances? What I mean here is that if I always Store 19.2E to position 1 and 13.0E to position 2 and I know that I need 2 seconds to move from 1 to 2 and vice versa where in the code would I have to input these delays? Is it at the same code that u pointed me to?

    Thanx in advance.
     
  9. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,312
    Likes Received:
    6,256
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,290 / 9
    Home Country:
    France France
    Show System Specs
    Here we go :) based on current master :p added 1000 in both line.
     
    Last edited: October 19, 2016
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,312
    Likes Received:
    6,256
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,290 / 9
    Home Country:
    France France
    Show System Specs
    Maybe we can invert code ?

    Code (Text):
    1. //set the DisEqC parameters
    2.         if (_conditionalAccess != null)
    3.         {
    4.           //int hr2 = ((IMediaControl)_graphBuilder).Pause();
    5.           _diseqCsucceded = _conditionalAccess.SendDiseqcCommand(_parameters, dvbsChannel);
    6.           //hr2 = ((IMediaControl)_graphBuilder).Run();
    7.  
    8.           //move diseqc motor to correct satellite
    9.           if (dvbsChannel != null && dvbsChannel.SatelliteIndex > 0 && _conditionalAccess.DiSEqCMotor != null)
    10.           {
    11.             _conditionalAccess.DiSEqCMotor.GotoPosition((byte)dvbsChannel.SatelliteIndex);
    12.           }
    13.         }
    14.  
    to

    Code (Text):
    1. //set the DisEqC parameters
    2.         if (_conditionalAccess != null)
    3.         {
    4.           //move diseqc motor to correct satellite
    5.           if (dvbsChannel != null && dvbsChannel.SatelliteIndex > 0 && _conditionalAccess.DiSEqCMotor != null)
    6.           {
    7.             _conditionalAccess.DiSEqCMotor.GotoPosition((byte)dvbsChannel.SatelliteIndex);
    8.           }
    9.  
    10.           //int hr2 = ((IMediaControl)_graphBuilder).Pause();
    11.           _diseqCsucceded = _conditionalAccess.SendDiseqcCommand(_parameters, dvbsChannel);
    12.           //hr2 = ((IMediaControl)_graphBuilder).Run();
    13.         }
    Move first the motor and then continue.
    Maybe we need to have a return value on _conditionalAccess.DiSEqCMotor.GotoPosition((byte)dvbsChannel.SatelliteIndex); when motor has finished to move and then continue the rest of the code.

    Maybe implement the 'bool ReadDiSEqCCommand(out byte[] reply);' in 'public void GotoPosition(byte position)'

    something like that :

    Code (Text):
    1. while (_controller.ReadDiSEqCCommand(cmd))
    2.       {
    3.         System.Threading.Thread.Sleep(100);
    4.       }
    The code will not compil but i think you'll get the idea :)
     
  11. Kotik
    • Premium Supporter

    Kotik MP Donator

    Joined:
    March 19, 2009
    Messages:
    699
    Likes Received:
    337
    Gender:
    Male
    Location:
    Athens
    Ratings:
    +555 / 2
    Home Country:
    Greece Greece
    Show System Specs
    With 2000ms delays these are the results:

    [2016-10-19 22:12:41,562] [Log ] [18 ] [INFO ] - DiSEqC: goto position 2
    [2016-10-19 22:12:41,655] [Log ] [18 ] [INFO ] - ProfRed: setdiseqc returned:0
    [2016-10-19 22:12:42,765] [Log ] [18 ] [INFO ] - ProfRed: setdiseqc returned:0
    [2016-10-19 22:12:43,781] [Log ] [18 ] [INFO ] - dvb:confused:ubmiting tunerequest Channel:THT subChannel:0
    [2016-10-19 22:12:43,781] [Log ] [18 ] [INFO ] - dvb:using existing subchannel:0
    [2016-10-19 22:12:43,781] [Log ] [18 ] [INFO ] - dvb:confused:ubmit tunerequest size:1 new:0
    [2016-10-19 22:12:43,781] [Log ] [18 ] [INFO ] - subch:0 OnBeforeTune
    [2016-10-19 22:12:43,781] [Log ] [18 ] [INFO ] - dvb:confused:ubmit tunerequest calling put_TuneRequest
    [2016-10-19 22:12:44,515] [Log ] [18 ] [INFO ] - dvb:confused:ubmit tunerequest done calling put_TuneRequest
    [2016-10-19 22:12:44,515] [Log ] [18 ] [INFO ] - subch:0 OnAfterTune
    [2016-10-19 22:12:44,515] [Log ] [18 ] [INFO ] - RunGraph
    [2016-10-19 22:12:44,515] [Log ] [18 ] [INFO ] - subch:0 OnGraphStart
    [2016-10-19 22:12:44,515] [Log ] [18 ] [INFO ] - dvb: RunGraph
    [2016-10-19 22:12:46,437] [Log ] [18 ] [INFO ] - dvb: LockInOnSignal ok
    [2016-10-19 22:12:46,437] [Log ] [18 ] [INFO ] - subch:0 OnGraphStarted
    [2016-10-19 22:12:46,437] [Log ] [18 ] [INFO ] - subch:0 SetupPmtGrabber:pid 12C sid:6A7
    [2016-10-19 22:12:46,453] [Log ] [18 ] [INFO ] - subch:0 set pmt grabber pmt:12C sid:6A7
    [2016-10-19 22:12:46,453] [Log ] [18 ] [DEBUG] - TimeShifter.OnAfterTune: resetting audio/video time
    [2016-10-19 22:12:46,453] [Log ] [18 ] [DEBUG] - WaitForPMT: Waiting for PMT 12C
    [2016-10-19 22:12:46,500] [Log ] [16 ] [INFO ] - subch:0 OnPMTReceived() pmt:12C ran:True dynamic:False
    [2016-10-19 22:12:46,515] [Log ] [18 ] [DEBUG] - WaitForPMT: Found PMT after 0.0625058 seconds.
    [2016-10-19 22:12:46,515] [Log ] [18 ] [INFO ] - subch:0 SendPmt:6A7 6A7 FFFFFFFF 1

    As u can see there is approx. 2 seconds delay before two commands and we get a positive result the result is not consistent, meaning that I calculated the time my dish needs to travel from 19.2E to 13.0E, my motor specs state that the motor can move 1.9 degrees / per second under 12 volts (so for channels with Vertical polarization) and 2.5 degrees / per second under 18 volts (so for channel with Horizontal polarization), 19.2 - 13 = 6.2 degrees since the channel I am tunning to has vertical polarization it will use 12 volts, so 6.2 / 1.9 = 3.2 seconds, as u can see I need 3.2 seconds for s complete move.

    Now we delay 2000ms which is a bit shorter but if we add tuner delays and some other added up delays I think we are around 2.5 seconds which is still shorter than 3.2. What I want to know is why we are sending DiseqC commands twice? and how exactly does it work? are we sending them both at the same time? @mm1352000 I need ur wisdom here.

    Another part that we have to make sure is applied is a stop tune command, we really need to instruct the tuner to stop whatever it is doing BEFORE we start moving the dish.I will try to explain the reason without confusing u even more :)

    I will talk only about TBS and specifically only about TBS 6902, I got no idea how other cards are working but lets try for now see how exactly TBS 6902 is working.

    Things we know for a fact:
    1. It ignores tuning parameters, it will respect the frequency parameter but can ignore polarization, fec rate, symbol rate and modulation. As far as I understand this is something that more cards might be doing as well.
    2. It will always try to re-lock on a signal loss, the time out for this one is unknown to me, but after testing I would say it is huge. The card will keep trying even after 20 seconds. Unless it is instructed different tuning parameters.

    As per TBS the proper way of using this card (not sure about the rest as I was instructed specifically for this one) with a motor is the following. 1st move the motor and then supply tune parameters.
    I would add here another major step, BEFORE moving the motor send a stop tune command to the card, this is very important and I will explain why, the problem is that TBS 6902 and any other card that is using the same aggressive locking mechanism will try to re lock automatically on signal lost, this means that if the dish is moving and a similar frequency is found during the movement it will lock on it and report success. By adding a delay in submitting tuning parameters we make sure the card wont lock on any similar frequency of the NEXT channel but we are not making sure that the card will not re-lock on any similar frequency of the PREVIOUS channel.

    Ideally the steps should look like that:

    STOP ------->MOVE(add delay here)------>SEND TUNE PARAMETERS------->START and this logic should be applied always ONLY IF the dish has to move.

    I hope I didn't confuse anyone.
     
    • Thank You! Thank You! x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!