TBS: CI/CAM support and other improvements (2 Viewers)

Mark Lejeune

Portal Member
May 15, 2019
6
3
45
Home Country
Netherlands Netherlands
@Mark Lejeune
I suspect your TV Server log level is set to info rather than debug because log entries are missing.
Please try setting TV Server log level to debug, restarting the TV service, then collecting new log files.

Actually it was set to Debug but I 'decluttered' a bit to keep the overview.
Fresh log snippet:

[2019-05-16 09:41:13,250] [Log ] [15 ] [INFO ] - dvb: find bda tuner
[2019-05-16 09:41:13,267] [Log ] [15 ] [INFO ] - dvb: using [Tuner]: TBS 6290 DVBC Tuner B
[2019-05-16 09:41:13,268] [Log ] [15 ] [INFO ] - dvb: Render [Network provider]->[Tuner] OK
[2019-05-16 09:41:13,268] [Log ] [15 ] [INFO ] - dvb: Setting lastFilter to Tuner filter
[2019-05-16 09:41:13,273] [Log ] [15 ] [INFO ] - dvb: Find BDA receiver
[2019-05-16 09:41:13,274] [Log ] [15 ] [INFO ] - dvb: match Capture by Tuner device path
[2019-05-16 09:41:13,276] [Log ] [15 ] [INFO ] - dvb: -TBS 6290 DVBC Capture A
[2019-05-16 09:41:13,357] [Log ] [15 ] [INFO ] - dvb: Looking for another bda receiver...
[2019-05-16 09:41:13,358] [Log ] [15 ] [INFO ] - dvb: -TBS 6290 DVBC Capture B
[2019-05-16 09:41:13,361] [Log ] [15 ] [INFO ] - dvb: Render [Tuner]->[Capture] AOK
[2019-05-16 09:41:13,361] [Log ] [15 ] [INFO ] - dvb: Setting lastFilter to Capture device
[2019-05-16 09:41:13,368] [Log ] [15 ] [INFO ] - dvb: WinTv CI module not detected.
[2019-05-16 09:41:13,373] [Log ] [15 ] [INFO ] - dvb:add Inf Tee filter
[2019-05-16 09:41:13,374] [Log ] [15 ] [INFO ] - dvb: Render ...->[inftee]
[2019-05-16 09:41:13,376] [Log ] [15 ] [INFO ] - dvb: Setting lastFilter to Inf Tee
[2019-05-16 09:41:13,377] [Log ] [15 ] [INFO ] - dvb: Render [inftee]->[demux]
[2019-05-16 09:41:13,379] [Log ] [15 ] [INFO ] - dvb: AddTransportStreamFiltersToGraph
[2019-05-16 09:41:13,380] [Log ] [15 ] [INFO ] - add BDA MPEG2 Transport Information Filter filter
[2019-05-16 09:41:13,383] [Log ] [15 ] [INFO ] - pinTif:name:IB Input [3/0] Direction:Input Connected:False
[2019-05-16 09:41:13,384] [Log ] [15 ] [INFO ] - Connect tif and mpeg2 sections and tables
[2019-05-16 09:41:13,384] [Log ] [15 ] [INFO ] - dvb:try tif:name:001 [5/0] Direction:Output Connected:False
[2019-05-16 09:41:13,387] [Log ] [15 ] [INFO ] - tif connected
[2019-05-16 09:41:13,388] [Log ] [15 ] [INFO ] - dvb: Render ..->[TsWriter]
[2019-05-16 09:41:13,389] [Log ] [15 ] [INFO ] - dvb: Checking for hardware specific extensions
[2019-05-16 09:41:13,393] [Log ] [15 ] [INFO ] - CAM is Default model
[2019-05-16 09:41:13,393] [Log ] [15 ] [INFO ] - Check for TBS
[2019-05-16 09:41:13,404] [Log ] [15 ] [INFO ] - Check for KNC
[2019-05-16 09:41:13,407] [Log ] [15 ] [INFO ] - KNC: IsKNC False
[2019-05-16 09:41:13,407] [Log ] [15 ] [DEBUG] - KNC: Disable CI
[2019-05-16 09:41:13,421] [Log ] [15 ] [DEBUG] - KNC: Disposing CI handler
[2019-05-16 09:41:13,422] [Log ] [15 ] [INFO ] - Check for Digital Everywhere
[2019-05-16 09:41:13,423] [Log ] [15 ] [INFO ] - Check for Twinhan
[2019-05-16 09:41:13,425] [Log ] [15 ] [INFO ] - Twinhan: CI detection finished
[2019-05-16 09:41:13,425] [Log ] [15 ] [INFO ] - Check for TechnoTrend
[2019-05-16 09:41:13,427] [Log ] [15 ] [DEBUG] - TechnoTrend: Closing hardware
[2019-05-16 09:41:13,443] [Log ] [15 ] [INFO ] - Check for Hauppauge
[2019-05-16 09:41:13,444] [Log ] [15 ] [DEBUG] - Hauppauge: DVB-S card NOT found!
[2019-05-16 09:41:13,445] [Log ] [15 ] [INFO ] - Check for ProfRed
[2019-05-16 09:41:13,446] [Log ] [15 ] [INFO ] - Check for TeVii
[2019-05-16 09:41:13,480] [Log ] [15 ] [DEBUG] - GenericBDAS:DiSEqC capable card found!
[2019-05-16 09:41:13,481] [Log ] [15 ] [INFO ] - Check for Conexant based card
[2019-05-16 09:41:13,482] [Log ] [15 ] [DEBUG] - Conexant BDA: DVB-S card NOT found!
[2019-05-16 09:41:13,483] [Log ] [15 ] [INFO ] - Check for GenPix BDA based card
[2019-05-16 09:41:13,484] [Log ] [15 ] [DEBUG] - GenPix tuner filter name: TBS 6290 DVBC Tuner B
[2019-05-16 09:41:13,485] [Log ] [15 ] [DEBUG] - GenPix tuner filter pin name: MPEG2 Transport
[2019-05-16 09:41:13,485] [Log ] [15 ] [DEBUG] - GenPix BDA: DVB-S card NOT found!
[2019-05-16 09:41:13,486] [Log ] [15 ] [INFO ] - Check for Generic DVB-S card
[2019-05-16 09:41:13,487] [Log ] [15 ] [DEBUG] - GenericBDAS:DiSEqC capable card found!
[2019-05-16 09:41:13,488] [Log ] [15 ] [INFO ] - Generic BDA card detected

As I currently understand a 'generic CAM' is used by default and then a check is done on hardware specific implementations?
After the Check for TBS I wouldn't expect to see the other checks since conditionalaccess returns if a valid TBS card is found (it would never execute the 'check for KNC'?
[2019-05-16 09:41:13,393] [Log ] [15 ] [INFO ] - Check for TBS
[2019-05-16 09:41:13,404] [Log ] [15 ] [INFO ] - Check for KNC
 

mm1352000

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

    As I currently understand a 'generic CAM' is used by default and then a check is done on hardware specific implementations?
    Sort of. There's no generic CAM support on Windows. Everything is hardware specific. We try to match the tuner with one of the hardware specific implementations we know about. Channel decryption and CAM menu access will only work if we find a match.

    After the Check for TBS I wouldn't expect to see the other checks since conditionalaccess returns if a valid TBS card is found (it would never execute the 'check for KNC'?
    Yes, that's right. (y)

    It does indeed look like we need more information in order to detect and/or support the tuner you're using. I've reached out to my contact at TBS. Let's see what they say.

    For now, can you please confirm:
    1. You're using a TBS 6290, not TBS 6290 SE.
    2. You're using the latest version of the driver for your tuner (1.0.0.2 for DVB-T/T2 or 1.0.0.3 for DVB-C or 1.0.0.2 for MCNS [whatever that is!]).
     

    Mark Lejeune

    Portal Member
    May 15, 2019
    6
    3
    45
    Home Country
    Netherlands Netherlands
    For now, can you please confirm:
    1. You're using a TBS 6290, not TBS 6290 SE.
    2. You're using the latest version of the driver for your tuner (1.0.0.2 for DVB-T/T2 or 1.0.0.3 for DVB-C or 1.0.0.2 for MCNS [whatever that is!]).

    I'm using a TBS 6290 SE could that explain the behaviour?

    As an experiment I tried using the 'non SE' drivers but that didn't work at all so the difference is bigger than just 2 letters ;)

    I've had a Teamviewer session already with TBS support so they are aware of the issue.

    I come from Anysee USB receivers with MDAPI+ and ACAMD. completely removed everything but I do see this in the log:

    OnPMTReceived: MDAPI disabled. Possible reasons are _mdplugs=null or provider not listed

    Not sure if that hints at 'leftovers' or always happens when there is no hardware CI module.

    Thanks for the responses!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I'm using a TBS 6290 SE could that explain the behaviour?
    Not that I'm aware of. Up until this point my assumption was that all TBS tuners were supported by our existing code.

    As an experiment I tried using the 'non SE' drivers but that didn't work at all so the difference is bigger than just 2 letters ;)
    Yeah, no - that won't work. The 2 cards have completely different PCIe bridge chips (6290 = NXP SAA7160; 6290SE = Lattice).

    I've had a Teamviewer session already with TBS support so they are aware of the issue.
    First response received. TBS are following up with further information for me.

    Not sure if that hints at 'leftovers' or always happens when there is no hardware CI module.
    That's always there.
     

    Mark Lejeune

    Portal Member
    May 15, 2019
    6
    3
    45
    Home Country
    Netherlands Netherlands
    Not that I'm aware of. Up until this point my assumption was that all TBS tuners were supported by our existing code.

    Hi mm1352000,

    Found the problem.
    In the TurboSight constructor the following check evaluates as FALSE:
    (this._propertySet.QuerySupported(BdaExtensionPropertySet, 0x15, out support)

    I removed that condition, built a test library and it works!
    CI menu works as well.

    If this works for all other TBS PCI(e) cards this indeed could point at an inconsistency in the implementation of the TBS6290SE drivers.

    I did another log capture and noticed that, even though I'm using DVB-C drivers there seems to be some DVB-S references in the log.

    [2019-05-17 01:05:00,535] [Log ] [13 ] [INFO ] - dvb: Checking for hardware specific extensions
    [2019-05-17 01:05:00,539] [Log ] [13 ] [INFO ] - CAM is Default model
    [2019-05-17 01:05:00,540] [Log ] [13 ] [INFO ] - Check for TBS
    [2019-05-17 01:05:00,545] [Log ] [13 ] [DEBUG] - TBS6290SE: Removed this._propertySet.QuerySupported(BdaExtensionPropertySet, 0x15, out support)
    [2019-05-17 01:05:00,546] [Log ] [13 ] [DEBUG] - Turbosight: supported tuner detected (PCIe/PCI interface)
    [2019-05-17 01:05:00,547] [Log ] [13 ] [DEBUG] - Turbosight: open conditional access interface
    [2019-05-17 01:05:00,548] [Log ] [13 ] [DEBUG] - Turbosight: is CI slot present
    [2019-05-17 01:05:00,549] [Log ] [13 ] [DEBUG] - Turbosight: device does have a CI slot
    [2019-05-17 01:05:00,549] [Log ] [13 ] [DEBUG] - Turbosight: open conditional access interface
    [2019-05-17 01:05:00,571] [Log ] [13 ] [DEBUG] - Turbosight: interface handle 106233856
    [2019-05-17 01:05:00,572] [Log ] [13 ] [DEBUG] - Turbosight: interface opened successfully
    [2019-05-17 01:05:00,573] [Log ] [13 ] [DEBUG] - Turbosight: is CAM present
    [2019-05-17 01:05:00,574] [Log ] [13 ] [DEBUG] - Turbosight: result = True
    [2019-05-17 01:05:00,575] [Log ] [13 ] [DEBUG] - Turbosight: is CAM ready
    [2019-05-17 01:05:00,576] [Log ] [13 ] [DEBUG] - Turbosight: result = True
    [2019-05-17 01:05:00,577] [Log ] [13 ] [DEBUG] - Turbosight: set power state, on = True
    [2019-05-17 01:05:00,580] [Log ] [13 ] [DEBUG] - Turbosight: result = failure, hr = 0x80070490 (ERROR_NOT_FOUND)
    [2019-05-17 01:05:00,581] [Log ] [13 ] [DEBUG] - DiSEqCMotor: dish Config: file not found, C:\ProgramData\Team MediaPortal\MediaPortal TV Server\dish.xml
    [2019-05-17 01:05:00,583] [Log ] [13 ] [INFO ] - DiSEqCMotor: dish Config: SatCount 0, CurrentMovingDish 100, FirstTuneWait 200
    [2019-05-17 01:05:00,597] [Log ] [13 ] [INFO ] - dvb: GetTunerSignalStatistics()

    I will inform my contact at TBS.

    For now thanks for guiding me in the right direction!!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thanks Mark. That's useful info to have.

    Since you are obviously able to compile the code, can you please try a couple of different replacements for 0x15 in that crucial QuerySupported() condition and let me know what happens:
    • 0x12
    • 0x16
    Thanks in advance. :)
     

    Mark Lejeune

    Portal Member
    May 15, 2019
    6
    3
    45
    Home Country
    Netherlands Netherlands
    Thanks Mark. That's useful info to have.

    Since you are obviously able to compile the code, can you please try a couple of different replacements for 0x15 in that crucial QuerySupported() condition and let me know what happens:
    • 0x12
    • 0x16
    Thanks in advance. :)

    Sure!

    0x12: Works!
    0x16: Not found....

    Out of curiosity: Is this a property of the driver that indicates if there is a CI slot on board?

    >>
    [2019-05-17 09:14:22,163] [Log ] [16 ] [INFO ] - CAM is Default model
    [2019-05-17 09:14:22,164] [Log ] [16 ] [INFO ] - Check for TBS
    [2019-05-17 09:14:22,169] [Log ] [16 ] [DEBUG] - TEST: QuerySupported: 0x12
    [2019-05-17 09:14:22,170] [Log ] [16 ] [DEBUG] - Turbosight: supported tuner detected (PCIe/PCI interface)
    [2019-05-17 09:14:22,171] [Log ] [16 ] [DEBUG] - Turbosight: open conditional access interface
    [2019-05-17 09:14:22,172] [Log ] [16 ] [DEBUG] - Turbosight: is CI slot present
    [2019-05-17 09:14:22,173] [Log ] [16 ] [DEBUG] - Turbosight: device does have a CI slot
    [2019-05-17 09:14:22,173] [Log ] [16 ] [DEBUG] - Turbosight: open conditional access interface
    [2019-05-17 09:14:22,193] [Log ] [16 ] [DEBUG] - Turbosight: interface handle 86376448
    [2019-05-17 09:14:22,194] [Log ] [16 ] [DEBUG] - Turbosight: interface opened successfully
    [2019-05-17 09:14:22,195] [Log ] [16 ] [DEBUG] - Turbosight: is CAM present
    [2019-05-17 09:14:22,196] [Log ] [16 ] [DEBUG] - Turbosight: result = True
    [2019-05-17 09:14:22,197] [Log ] [16 ] [DEBUG] - Turbosight: is CAM ready
    [2019-05-17 09:14:22,198] [Log ] [16 ] [DEBUG] - Turbosight: result = True
    [2019-05-17 09:14:22,199] [Log ] [16 ] [DEBUG] - Turbosight: set power state, on = True
    [2019-05-17 09:14:22,201] [Log ] [16 ] [DEBUG] - Turbosight: result = failure, hr = 0x80070490 (ERROR_NOT_FOUND)
    [2019-05-17 09:14:22,202] [Log ] [16 ] [DEBUG] - DiSEqCMotor: dish Config: file not found, C:\ProgramData\Team MediaPortal\MediaPortal TV Server\dish.xml
    [2019-05-17 09:14:22,204] [Log ] [16 ] [INFO ] - DiSEqCMotor: dish Config: SatCount 0, CurrentMovingDish 100, FirstTuneWait 200
    [2019-05-17 09:14:22,220] [Log ] [16 ] [INFO ] - dvb: GetTunerSignalStatistics()
    <<

    >>
    [2019-05-17 09:27:44,326] [Log ] [17 ] [INFO ] - dvb: Checking for hardware specific extensions
    [2019-05-17 09:27:44,332] [Log ] [17 ] [INFO ] - CAM is Default model
    [2019-05-17 09:27:44,332] [Log ] [17 ] [INFO ] - Check for TBS
    [2019-05-17 09:27:44,337] [Log ] [17 ] [DEBUG] - TEST: QuerySupported: 0x16
    [2019-05-17 09:27:44,338] [Log ] [17 ] [INFO ] - Check for KNC
    [2019-05-17 09:27:44,340] [Log ] [17 ] [INFO ] - KNC: IsKNC False
    [2019-05-17 09:27:44,341] [Log ] [17 ] [DEBUG] - KNC: Disable CI
    [2019-05-17 09:27:44,346] [Log ] [17 ] [DEBUG] - KNC: Disposing CI handler
    [2019-05-17 09:27:44,347] [Log ] [17 ] [INFO ] - Check for Digital Everywhere
    [2019-05-17 09:27:44,348] [Log ] [17 ] [INFO ] - Check for Twinhan
    [2019-05-17 09:27:44,350] [Log ] [17 ] [INFO ] - Twinhan: CI detection finished
    [2019-05-17 09:27:44,351] [Log ] [17 ] [INFO ] - Check for TechnoTrend
    [2019-05-17 09:27:44,352] [Log ] [17 ] [DEBUG] - TechnoTrend: Closing hardware
    [2019-05-17 09:27:44,353] [Log ] [17 ] [INFO ] - Check for Hauppauge
    [2019-05-17 09:27:44,354] [Log ] [17 ] [DEBUG] - Hauppauge: DVB-S card NOT found!
    [2019-05-17 09:27:44,355] [Log ] [17 ] [INFO ] - Check for ProfRed
    [2019-05-17 09:27:44,356] [Log ] [17 ] [INFO ] - Check for TeVii
    [2019-05-17 09:27:44,366] [Log ] [17 ] [DEBUG] - GenericBDAS:DiSEqC capable card found!
    [2019-05-17 09:27:44,367] [Log ] [17 ] [INFO ] - Check for Conexant based card
    [2019-05-17 09:27:44,368] [Log ] [17 ] [DEBUG] - Conexant BDA: DVB-S card NOT found!
    [2019-05-17 09:27:44,369] [Log ] [17 ] [INFO ] - Check for GenPix BDA based card
    [2019-05-17 09:27:44,369] [Log ] [17 ] [DEBUG] - GenPix tuner filter name: TBS 6290 DVBC Tuner B
    [2019-05-17 09:27:44,370] [Log ] [17 ] [DEBUG] - GenPix tuner filter pin name: MPEG2 Transport
    [2019-05-17 09:27:44,370] [Log ] [17 ] [DEBUG] - GenPix BDA: DVB-S card NOT found!
    [2019-05-17 09:27:44,371] [Log ] [17 ] [INFO ] - Check for Generic DVB-S card
    [2019-05-17 09:27:44,371] [Log ] [17 ] [DEBUG] - GenericBDAS:DiSEqC capable card found!
    [2019-05-17 09:27:44,372] [Log ] [17 ] [INFO ] - Generic BDA card detected
    <<
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    0x12: Works!
    0x16: Not found....
    Thanks! (y)

    Out of curiosity: Is this a property of the driver that indicates if there is a CI slot on board?
    Yes, property 0x12 is for CI/CAM access/control.
    Property 0x16 is a for PLP (DVB-C2/T2) query and selection.
    Property 0x18 is a general purpose access/control property, currently only used for DVB-S/S2/S2X tuners.
    All of these are TBS-specific.

    @Owlsroost
    The recommendation from TBS is to check each of the 3 properties (or their equivalents for USB), and if any of them are supported, to treat the tuner as a TBS tuner.
    TVE 3.5's code already does this:
    MediaPortal/MediaPortal-1

    How do you want to proceed?
    P.S. I don't know where the code that was merged came from, but it looks like a reverse-engineered/decompiled version of my original code. Not ideal.
    P.P.S. Also, was tbsCIapi.dll added to the repository when the patch was merged? Doesn't look like it (can't find it in my local checkout). Without that DLL, CI/CAM support can't work.
     
    Last edited:

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    P.S. I don't know where the code that was merged came from, but it looks like a reverse-engineered/decompiled version of my original code. Not ideal.

    It came from FreakyJ's branch here - MediaPortal/MediaPortal-1 (I couldn't find any sources for any later or your versions of the patch).

    P.S. I do slightly resent your suggestion that I would do something underhand like reverse-engineering your code...

    P.P.S. Also, was tbsCIapi.dll added to the repository when the patch was merged? Doesn't look like it (can't find it in my local checkout). Without that DLL, CI/CAM support can't work.

    I wasn't aware of that - is that a TBS supplied dll, and do we have permission to distribute it with MP?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    It came from FreakyJ's branch here - MediaPortal/MediaPortal-1 (I couldn't find any sources for any later or your versions of the patch).
    Okay. For what it's worth, I think the original code is here:
    MediaPortal/MediaPortal-1

    If you include my TVE 3.5 working branch, that would make 3 branches with different advantages/disadvantages. Depending on your/team preference, there may be a choice to be made in relation to this. Again, for what it's worth:
    • FreakyJ
      • in master (presumably tested)
      • needs at least detection change, CI API function update and CI API DLL
      • a little messy, codewise
    • Turbosight:
      • original patch source
      • probably needs a number of functional and compatibility updates (MP and TBS/hardware)
    • TVE 3.5:
      • most functionally complete from TBS/hardware perspective
      • needs backporting, testing
    P.S. I do slightly resent your suggestion that I would do something underhand like reverse-engineering your code...
    Mmmm, I'm sorry. It wasn't my intention to suggest or even imply that. As far as I'm aware/concerned, you did a great job merging the best code you could find in tricky circumstances. My comment was simply an expression of surprise at the difference between the code I remember writing and the code I found in master.

    I wasn't aware of that - is that a TBS supplied dll, and do we have permission to distribute it with MP?
    Yes and yes. We have to be careful to match the version we include with the code we use. There are some subtly different versions of the DLL out there.
     
    Last edited:

    Users who are viewing this thread

    Top Bottom