DVB S/S2 cards on legacy PCI interface. (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    ...or ignore my findings and lose a customer.
    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.
     

    Kotik

    MP Donator
  • Premium Supporter
  • March 19, 2009
    699
    485
    Athens
    Home Country
    Greece Greece
    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.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Maybe i could try to make a patch for helping just need to point to the correct code :)
     

    Kotik

    MP Donator
  • Premium Supporter
  • March 19, 2009
    699
    485
    Athens
    Home Country
    Greece Greece
    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.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Good morning too :)
    Will look that, what MP/TV version did you use to build on the correct one ?
     

    Kotik

    MP Donator
  • Premium Supporter
  • March 19, 2009
    699
    485
    Athens
    Home Country
    Greece Greece
    I didnt use any version, or what do u mean? The patch should be based on Master.


    Sent from my GT-I9100 using Tapatalk
     

    Kotik

    MP Donator
  • Premium Supporter
  • March 19, 2009
    699
    485
    Athens
    Home Country
    Greece Greece
    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.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    I didnt use any version, or what do u mean? The patch should be based on Master.


    Sent from my GT-I9100 using Tapatalk

    Here we go :) based on current master :p added 1000 in both line.
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Maybe we can invert code ?

    Code:
    //set the DisEqC parameters
            if (_conditionalAccess != null)
            {
              //int hr2 = ((IMediaControl)_graphBuilder).Pause();
              _diseqCsucceded = _conditionalAccess.SendDiseqcCommand(_parameters, dvbsChannel);
              //hr2 = ((IMediaControl)_graphBuilder).Run();
    
              //move diseqc motor to correct satellite
              if (dvbsChannel != null && dvbsChannel.SatelliteIndex > 0 && _conditionalAccess.DiSEqCMotor != null)
              {
                _conditionalAccess.DiSEqCMotor.GotoPosition((byte)dvbsChannel.SatelliteIndex);
              }
            }

    to

    Code:
    //set the DisEqC parameters
            if (_conditionalAccess != null)
            {
              //move diseqc motor to correct satellite
              if (dvbsChannel != null && dvbsChannel.SatelliteIndex > 0 && _conditionalAccess.DiSEqCMotor != null)
              {
                _conditionalAccess.DiSEqCMotor.GotoPosition((byte)dvbsChannel.SatelliteIndex);
              }
    
              //int hr2 = ((IMediaControl)_graphBuilder).Pause();
              _diseqCsucceded = _conditionalAccess.SendDiseqcCommand(_parameters, dvbsChannel);
              //hr2 = ((IMediaControl)_graphBuilder).Run();
            }

    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:
    while (_controller.ReadDiSEqCCommand(cmd))
          {
            System.Threading.Thread.Sleep(100);
          }

    The code will not compil but i think you'll get the idea :)
     

    Kotik

    MP Donator
  • Premium Supporter
  • March 19, 2009
    699
    485
    Athens
    Home Country
    Greece Greece
    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.
     

    Users who are viewing this thread

    Top Bottom