[FEATURE] CI menu support for TvServer (DE, KNC1, Technotrend, TwinHan...) (1 Viewer)

Status
Not open for further replies.

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #51
    Hi once more,

    I start now to integrate CI menu handling for Twinhan (and compatible?) cards. The code is nearly complete and I need someone who can test my work :p

    Please tell me wo loves the risk to test brand new stuff ;)

    Morpheus
     

    Curry

    MP Donator
  • Premium Supporter
  • May 4, 2009
    39
    1
    Eindhoven
    Home Country
    Netherlands Netherlands
    Currently downloading the test build to testdrive my WinTV HVR-900H + WinTV CI setup :)

    Update: good news is it didn't crash as it used to with 1.0.1 and 1.0.2. Bad news is that it hangs like a brick, hogging 50% resources (being 1 core in a dual core system) and made the whole system grind to a halt up to the point of cold reboot....

    Logs at time of scanning, first 4 frequences 'No Signal', then this:
    Code:
    2009-06-22 00:57:26.937500 [6]: dvbt:  Tune:DVBT:tv:  Freq:212500 ONID:-1 TSID:-1 SID:-1 PMT:0xFFFFFFFF FTA:False LCN:10000 BandWidth:8
    2009-06-22 00:57:26.937500 [6]: dvbt: tune: Assigning oldChannel
    2009-06-22 00:57:26.937500 [6]: dvbt: tune: Current channel is null
    2009-06-22 00:57:26.937500 [6]: dvbt: tune: Building graph
    2009-06-22 00:57:26.937500 [6]: BuildGraph
    2009-06-22 00:57:26.937500 [6]: dvb:AddNetworkProviderFilter
    2009-06-22 00:57:26.937500 [6]: dvb:Add DVBTNetworkProvider
    2009-06-22 00:57:26.953125 [6]: CreateTuningSpace()
    2009-06-22 00:57:26.953125 [6]: Found tuningspace Cable
    2009-06-22 00:57:26.953125 [6]: Found tuningspace Antenna
    2009-06-22 00:57:26.953125 [6]: Found tuningspace ATSC
    2009-06-22 00:57:26.953125 [6]: Found tuningspace Digital Cable
    2009-06-22 00:57:26.953125 [6]: Found tuningspace AuxIn1
    2009-06-22 00:57:26.953125 [6]: Found tuningspace FM Radio
    2009-06-22 00:57:26.953125 [6]: Found tuningspace DVB-T
    2009-06-22 00:57:26.953125 [6]: Found tuningspace DVBT TuningSpace
    2009-06-22 00:57:26.953125 [6]: Found correct tuningspace DVBT TuningSpace
    2009-06-22 00:57:26.953125 [6]: dvb:AddAndConnectBDABoardFilters
    2009-06-22 00:57:26.953125 [6]: dvb: find bda tuner
    2009-06-22 00:57:26.968750 [6]: dvb:  using [Tuner]: WinTV HVR-900H BDA Tuner
    2009-06-22 00:57:26.968750 [6]: dvb:  Render [Network provider]->[Tuner] OK
    2009-06-22 00:57:26.968750 [6]: dvb:  Find BDA receiver
    2009-06-22 00:57:26.968750 [6]: dvb:  match Capture by Tuner device path
    2009-06-22 00:57:26.968750 [6]: dvb:  -WinTV HVR-900H BDA Capture
    2009-06-22 00:57:26.968750 [6]: dvb:  Render [Tuner]->[Capture] AOK
    2009-06-22 00:57:26.968750 [6]: dvb:  WinTv CI module detected
    2009-06-22 00:57:26.968750 [6]: dvb:  Adding WinTv CI to graph
    Hangs like a brick there :(
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    CI Menu not working

    I tried this feature on a floppydtv card with the 1.1.0 alpha release. While watching tv i do not have a CI menu and it also states: CI menu supported: false. The CiMenu in the tv server is not working either. See the log below (although supported states true).

    2009-06-26 21:36:57.279568 [14]: CiMenuSupported called cardid 2
    2009-06-26 21:36:57.282568 [14]: FireDTV:GetCAMStatus() finished
    2009-06-26 21:36:57.283568 [14]: FireDTV:cam is inserted
    2009-06-26 21:36:57.283568 [14]: FireDTV:cam is valid
    2009-06-26 21:36:57.284568 [14]: FireDTV:cam is ready
    2009-06-26 21:36:57.285568 [14]: FireDTV:cam is able to descramble
    2009-06-26 21:36:57.285568 [14]: CiMenuSupported card FireDTV BDA Tuner DVBC supported: True
    2009-06-26 21:36:57.289568 [14]: FireDTV:GetCAMStatus() finished
    2009-06-26 21:36:57.290568 [14]: FireDTV:cam is inserted
    2009-06-26 21:36:57.290568 [14]: FireDTV:cam is valid
    2009-06-26 21:36:57.291568 [14]: FireDTV:cam is ready
    2009-06-26 21:36:57.291568 [14]: FireDTV:cam is able to descramble
    2009-06-26 21:36:57.294568 [14]: TvController: EnableCiMenuHandler called
    2009-06-26 21:36:57.295568 [14]: FireDTV: registering ci callbacks
    2009-06-26 21:36:57.296568 [14]: FireDTV: Starting new CI handler thread
    2009-06-26 21:36:57.297568 [14]: TvController: SetCiMenuHandler: result True
    2009-06-26 21:36:57.298568 [FireDTV CiMenuHandler]: FireDTV: CI handler thread start polling status
    2009-06-26 21:36:57.299568 [14]: EnterCiMenu called
    2009-06-26 21:36:57.300568 [14]: FireDTV: Enter CI Menu
    2009-06-26 21:36:57.302568 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST, CI_MMI_REQUEST
    2009-06-26 21:36:57.303568 [FireDTV CiMenuHandler]: FireDTV: CI menu object available!
    2009-06-26 21:36:57.309568 [14]: FireDTV: Enter CI Menu successful
    2009-06-26 21:36:57.418568 [FireDTV CiMenuHandler]: FireDTV: MMITag:CLOSE, MMIObjectLength: 2 (02), mmiOffset: 4
    2009-06-26 21:36:57.419568 [FireDTV CiMenuHandler]: FireDTV: OnCiClose()
    2009-06-26 21:36:57.464568 [FireDTV CiMenuHandler]: FireDTV: error in CiMenuHandler thread
    System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
    bij TvService.TVController.OnCiCloseDisplay(Int32 nDelay)
    bij TvLibrary.Implementations.DVB.DVB_MMI_Handler.HandleMMI(Byte[] MMI, Int32 MMI_length)
    bij TvLibrary.Implementations.DVB.DigitalEverywhere.CiMenuHandler()
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #54
    thank you for posting feedback :)

    the functions has already been checked by some team members and where working. so question for me is what maybe is the issue here....

    did you do a clean install? everything removed before? did you have DE tray tool (ci menu) running when using tvserver?
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    Yes i did a clean install of mediaportal.
    I have only one traytool of firedtv running: RC (Remote Control) no idea what that is for.

    I have two floppydtv's in my system, neither is working.

    Some more version info:

    2009-06-26 19:21:50.304360 [6]: Check for Digital Everywhere
    2009-06-26 19:21:50.309359 [6]: FireDTV:GetCAMStatus() finished
    2009-06-26 19:21:50.310359 [6]: FireDTV cam detected: True
    2009-06-26 19:21:50.316358 [6]: FireDTV cam manufacturer_code=8266, application_manufacturer=8266
    2009-06-26 19:21:50.316358 [6]: FireDTV cam name: "AlphaCrypt"
    2009-06-26 19:21:50.317358 [6]: FireDTV driver version: 4.8.0.....
    2009-06-26 19:21:50.322358 [6]: FireDTV HW: 01.26.02, FW: 02.04.04 build 61030
    2009-06-26 19:21:50.323358 [6]: Digital Everywhere card detected
    2009-06-26 19:21:50.326357 [6]: FireDTV:GetCAMStatus() finished
    2009-06-26 19:21:50.327357 [6]: FireDTV:cam is inserted
    2009-06-26 19:21:50.328357 [6]: FireDTV:cam is valid
    2009-06-26 19:21:50.328357 [6]: FireDTV:cam is ready
    2009-06-26 19:21:50.329357 [6]: FireDTV:cam is able to descramble
    2009-06-26 19:21:50.329357 [6]: Digital Everywhere registering CI menu capabilities

    If i can find the time i will try to debug the code, but i don't know if i will find something
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #56
    I think I found the problem :)

    Please try attached TvControl.dll and give feedback...
     

    Attachments

    • TvControl.zip
      30.6 KB

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    The error does not appear anymore, but still things go wrong here. I hope i can supply you enough info.

    I renamed the old dll to TvControl.olddll and put your dll in place. I restarted the tvservice and I opened the setup tool. I picked the first card (the second one listed) and chose open menu. THis is what happened:

    2009-06-27 09:26:02.360274 [SetupTv]: ---- SetupTv v1.0.3.23090 is starting up on Windows Vista ( Service Pack 1 ) [6.0.6001.65536] ----
    2009-06-27 09:26:02.365274 [SetupTv]: ---- check connection with database ----
    2009-06-27 09:26:04.947274 [SetupTv]: SetupDatabaseForm: Added dependency for TvService - MySQL
    2009-06-27 09:26:04.949274 [SetupTv]: ---- check if database needs to be updated/created ----
    2009-06-27 09:26:07.209274 [SetupTv]: ---- upgrade database schema ----
    2009-06-27 09:26:07.211274 [SetupTv]: ---- check if tvservice is running ----
    2009-06-27 09:26:07.215274 [SetupTv]: RemoteControl: RegisterChannel first called in Domain SetupTv.exe for thread SetupTv with id 1
    2009-06-27 09:26:11.345274 [4]: CiMenu: registered client event for callback
    2009-06-27 09:26:11.356274 [4]: CiMenu: registered client event for callback
    2009-06-27 09:26:12.674274 [SetupTv]: Util: Version of installed Psisdecd.dll: 6.6.1000.18299 Path: C:\Windows\System32\PsisDecd.dll
    2009-06-27 09:26:12.676274 [SetupTv]: Util: Version of installed Psisdecd.dll: 6.6.1000.18299 Path: C:\Windows\System32\psisdecd.dll
    2009-06-27 09:26:13.166274 [4]: Controller: epg stop
    2009-06-27 09:26:17.338274 [4]: Controller: epg stop
    2009-06-27 09:26:19.570274 [4]: Controller: epg stop
    2009-06-27 09:26:21.013274 [4]: Controller: epg stop
    2009-06-27 09:26:23.490274 [4]: CiMenuSupported called cardid 3
    2009-06-27 09:26:23.494274 [4]: FireDTV:GetCAMStatus() finished
    2009-06-27 09:26:23.494274 [4]: FireDTV:cam is inserted
    2009-06-27 09:26:23.495274 [4]: FireDTV:cam is valid
    2009-06-27 09:26:23.495274 [4]: FireDTV:cam is ready
    2009-06-27 09:26:23.496274 [4]: FireDTV:cam is able to descramble
    2009-06-27 09:26:23.497274 [4]: CiMenuSupported card FireDTV BDA Tuner DVBC supported: True
    2009-06-27 09:26:23.500274 [4]: FireDTV:GetCAMStatus() finished
    2009-06-27 09:26:23.501274 [4]: FireDTV:cam is inserted
    2009-06-27 09:26:23.501274 [4]: FireDTV:cam is valid
    2009-06-27 09:26:23.502274 [4]: FireDTV:cam is ready
    2009-06-27 09:26:23.503274 [4]: FireDTV:cam is able to descramble
    2009-06-27 09:26:23.504274 [4]: TvController: EnableCiMenuHandler called
    2009-06-27 09:26:23.505274 [4]: FireDTV: registering ci callbacks
    2009-06-27 09:26:23.505274 [4]: TvController: SetCiMenuHandler: result True
    2009-06-27 09:26:23.507274 [4]: EnterCiMenu called
    2009-06-27 09:26:23.507274 [4]: FireDTV: Enter CI Menu
    2009-06-27 09:26:23.511274 [4]: FireDTV: Enter CI Menu successful

    Nothing to see in the setuptool.

    Then i picked the second card and chose ci menu:

    2009-06-27 09:29:16.815274 [10]: EnterCiMenu called
    2009-06-27 09:29:16.816274 [10]: FireDTV: Enter CI Menu
    2009-06-27 09:29:16.818274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST, CI_MMI_REQUEST
    2009-06-27 09:29:16.819274 [FireDTV CiMenuHandler]: FireDTV: CI menu object available!
    2009-06-27 09:29:16.822274 [10]: FireDTV: Enter CI Menu successful
    2009-06-27 09:29:16.929274 [FireDTV CiMenuHandler]: FireDTV: MMITag:MENU_LAST, MMIObjectLength: 176 (B0), mmiOffset: 6
    2009-06-27 09:29:16.930274 [FireDTV CiMenuHandler]: FireDTV: MMI Parse: Got MENU_LAST, skipped to next block on index: 7; new Tag TEXT_LAST
    2009-06-27 09:29:16.937274 [4]: Callback from tvserver –AlphaCrypt 3.19 (c) Mascom GmbH
    2009-06-27 09:29:17.469274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:29:17.972274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:29:18.475274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:29:18.978274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:29:19.481274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST

    Still nothing too see in the setup tool.

    But when i switch back to the first card i see the ci menu (Of which card???).

    i can choose an option, but nothing happens:

    2009-06-27 09:31:44.380274 [15]: SelectCiMenu called
    2009-06-27 09:31:44.381274 [15]: FireDTV: Select CI Menu entry 2
    2009-06-27 09:31:44.384274 [15]: FireDTV: Close CI Menu successful
    2009-06-27 09:31:44.734274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:31:45.237274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:31:45.740274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST
    2009-06-27 09:31:46.243274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST

    Then i switched back again to the second card and got the following:

    2009-06-27 09:32:37.849274 [15]: EnterCiMenu called
    2009-06-27 09:32:37.849274 [15]: FireDTV: Enter CI Menu
    2009-06-27 09:32:37.853274 [15]: FireDTV: Enter CI Menu successful
    2009-06-27 09:32:38.025274 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST, CI_MMI_REQUEST
    2009-06-27 09:32:38.026274 [FireDTV CiMenuHandler]: FireDTV: CI menu object available!
    2009-06-27 09:32:38.033274 [FireDTV CiMenuHandler]: FireDTV: MMITag:MENU_LAST, MMIObjectLength: 176 (B0), mmiOffset: 6
    2009-06-27 09:32:38.033274 [FireDTV CiMenuHandler]: FireDTV: MMI Parse: Got MENU_LAST, skipped to next block on index: 7; new Tag TEXT_LAST
    2009-06-27 09:32:38.090274 [FireDTV CiMenuHandler]: FireDTV: error in CiMenuHandler thread
    System.Runtime.Remoting.RemotingException: De verbinding met object /8e1a3f5b_573a_4235_a206_5d770f0067d1/plsrbyr2ytstyrbier1jmxcy_2.rem is verbroken of het object bestaat niet op de server.

    Server stack trace:
    bij System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
    bij System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)

    Exception rethrown at [0]:
    bij System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    bij System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    bij TvLibrary.Interfaces.CiMenuCallbackSink.FireCiMenuCallback(CiMenu Menu)
    bij TvService.TVController.CheckForCallback()
    bij TvService.TVController.OnCiMenuChoice(Int32 nChoice, String lpszText)
    bij TvLibrary.Implementations.DVB.DVB_MMI_Handler.HandleMMI(Byte[] MMI, Int32 MMI_length)
    bij TvLibrary.Implementations.DVB.DigitalEverywhere.CiMenuHandler()

    And at somepoint i managed to get this (don't know how):

    2009-06-26 21:56:07.752568 [20]: EnterCiMenu called
    2009-06-26 21:56:07.753568 [20]: FireDTV: Enter CI Menu
    2009-06-26 21:56:07.755568 [FireDTV CiMenuHandler]: FireDTV: CI iStatus:CI_MODULE_INIT_READY, CI_MODULE_IS_DVB, CI_MODULE_PRESENT, CI_APP_INFO_AVAILABLE, CI_DATE_TIME_REQEST, CI_MMI_REQUEST
    2009-06-26 21:56:07.756568 [FireDTV CiMenuHandler]: FireDTV: CI menu object available!
    2009-06-26 21:56:07.758568 [20]: FireDTV: Enter CI Menu successful
    2009-06-26 21:56:07.863568 [FireDTV CiMenuHandler]: FireDTV: MMITag:CLOSE, MMIObjectLength: 2 (02), mmiOffset: 4
    2009-06-26 21:56:07.864568 [FireDTV CiMenuHandler]: FireDTV: OnCiClose()
    2009-06-26 21:56:07.865568 [FireDTV CiMenuHandler]: FireDTV: error in CiMenuHandler thread
    System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
    bij TvService.TVController.OnCiCloseDisplay(Int32 nDelay)
    bij TvLibrary.Implementations.DVB.DVB_MMI_Handler.HandleMMI(Byte[] MMI, Int32 MMI_length)
    bij TvLibrary.Implementations.DVB.DigitalEverywhere.CiMenuHandler()
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    • Thread starter
    • Moderator
    • #58
    ok, I understand the situation. Main cause is that there is only one global callback handler.

    in your case it leads to some conflict in setuptv when both card-section want to register itself as callback handler. I will try to limit it to one.

    But could you try the ci menu from inside TvFullscreen? (without runnning setuptv in background!)

    This one should work fine now ;)

    PS: Please fill out your system specs, I need some more details on your system
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    I would love to, if tv would work. It is completely broken (not only with your dll) i don't see any channels or what so ever in mediaportal :(
     

    elevation1

    Portal Pro
    May 15, 2008
    51
    0
    Hi, i have terratec CI and doesn't works with mediaportal 1.1 alpha on windows7... thank a lot for your help!!!
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom