TBS: CI/CAM support and other improvements (1 Viewer)

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Video, even on encrypted channels is working like a charm, but i have problems with accessing CI Menu text returned by CAM, which must be in ukrainian cyrillic is unreadable. something like
    one question: Is in only in the logs garbage or is it inside SetupTv garbage, too?
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Here is a patch, didn't tried it because I have other tests running on my test machine (based on MP 1.5 pre release :) )
     

    Attachments

    • Release.rar
      198.2 KB

    doctor64

    Portal Member
    December 6, 2009
    40
    9
    50
    Home Country
    Ukraine Ukraine
    Here is a patch, didn't tried it because I have other tests running on my test machine (based on MP 1.5 pre release :) )
    Sorry, still garbage.
    [Turbosight MMI handler] [DEBUG] - Turbosight: application information
    [Turbosight MMI handler] [DEBUG] - type = ConditionalAccess
    [Turbosight MMI handler] [DEBUG] - manufacturer = 0xb0
    [Turbosight MMI handler] [DEBUG] - code = 0x801
    [Turbosight MMI handler] [DEBUG] - menu title = Conax CSP CIPLUS CAM
    [Turbosight MMI handler] [DEBUG] - Turbosight: sending message CaInfo
    [Turbosight MMI handler] [DEBUG] - Turbosight: received MMI response CaInfo to message CaInfo
    [Turbosight MMI handler] [DEBUG] - Turbosight: response length = 3
    [Turbosight MMI handler] [DEBUG] - Turbosight: conditional access information
    [Turbosight MMI handler] [DEBUG] - # CAS IDs = 1
    [Turbosight MMI handler] [DEBUG] - 1 = 0x0b00
    [Turbosight MMI handler] [DEBUG] - Turbosight: sending message EnterMenu
    [Turbosight MMI handler] [DEBUG] - Turbosight: sending message GetMmi
    [Turbosight MMI handler] [DEBUG] - Turbosight: received MMI response Menu to message GetMmi
    [Turbosight MMI handler] [DEBUG] - Turbosight: response length = 112
    [Turbosight MMI handler] [DEBUG] - Turbosight: menu
    [Turbosight MMI handler] [DEBUG] - title = ☺??U?OYO UOYi
    [Turbosight MMI handler] [DEBUG] - sub-title = ☺
    [Turbosight MMI handler] [DEBUG] - footer = ☺??aOaYoai ?? - OONa?aO, Exit - OOUaO
    [Turbosight MMI handler] [DEBUG] - # entries = 4
    [Turbosight MMI handler] [DEBUG] - entry 1 = ☺¦Ya?aU??oi
    [Turbosight MMI handler] [DEBUG] - entry 2 = ☺Aaa?Y?OUOYYi
    [Turbosight MMI handler] [DEBUG] - entry 3 = ☺·?U?OUOYYi ?? U?OOUa
    [Turbosight MMI handler] [DEBUG] - entry 4 = ☺??ea?
    [Turbosight MMI handler] [DEBUG] - Turbosight: resuming polling...

    Same in setuptv:
    screen1.png
     

    doctor64

    Portal Member
    December 6, 2009
    40
    9
    50
    Home Country
    Ukraine Ukraine
    Here is a patch, didn't tried it because I have other tests running on my test machine (based on MP 1.5 pre release :) )

    Hello!

    I do some more investigations:
    here is hex-dump of log with garbage string
    5D 20 5B 44 45 42 55 47 │ 5D 20 2D 20 20 20 66 6F ] [DEBUG] - fo
    6F 74 65 72 20 20 20 20 │ 3D 20 01 3F 3F 61 4F 61 oter = ☺??aOa
    59 6F 61 69 20 3F 3F 20 │ 2D 20 4F 4F 4E 61 3F 61 Yoai ?? - OONa?a
    4F 2C 20 45 78 69 74 20 │ 2D 20 4F 4F 55 61 4F 20 O, Exit - OOUaO

    Accordingly to http://www.dvb.org/technology/standards/R206-001.V1.pdf 0x01 on beginning of string mean what string presented in ISO8859-5 Latin/Cyrillic coding, but cyrillic letters should have codes >0xa0. Does your code have some character translation?
    Please, can you dump raw, unprocessed string to log? I wish to check is this CAM really provide some readable strings. In my (rather old) Samsung TV this CAM also have garbaged string in CI menu.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Here is a new build.
    The log doesn't support UTF-8 yet, this will change with the next release..
    I hope it works, I'm not a professional dev, as you see I'm in the Test Group :p
    Can you also provide a screenshot from SetupTv again? I now used Unicode as the encoding...

    In the logs you should find: "Content [doctor64]"
     

    Attachments

    • Release.rar
      198.1 KB

    doctor64

    Portal Member
    December 6, 2009
    40
    9
    50
    Home Country
    Ukraine Ukraine
    Here is a new build.
    In the logs you should find: "Content [doctor64]"
    No problem at all, i work as developer and fully understand difficulties of remote debugging ;)

    Sorry, same problem.
    [2013-08-10 17:20:27,760] [Log ] [7 ] [DEBUG] - CiMenuSupported called cardid 2
    [2013-08-10 17:20:27,761] [Log ] [7 ] [DEBUG] - Turbosight: is CAM ready
    [2013-08-10 17:20:27,761] [Log ] [7 ] [DEBUG] - Turbosight: result = True
    [2013-08-10 17:20:27,761] [Log ] [7 ] [DEBUG] - CiMenuSupported card TBS 6618 BDA DVBC Tuner supported: True
    [2013-08-10 17:20:27,761] [Log ] [7 ] [DEBUG] - Turbosight: is CAM ready
    [2013-08-10 17:20:27,761] [Log ] [7 ] [DEBUG] - Turbosight: result = True
    [2013-08-10 17:20:27,762] [Log ] [7 ] [DEBUG] - TvController: EnableCiMenuHandler called
    [2013-08-10 17:20:27,764] [Log ] [7 ] [DEBUG] - Turbosight: starting new MMI handler thread
    [2013-08-10 17:20:27,765] [Log ] [7 ] [DEBUG] - TvController: SetCiMenuHandler: result True
    [2013-08-10 17:20:27,766] [Log ] [7 ] [DEBUG] - EnterCiMenu called
    [2013-08-10 17:20:27,766] [Log ] [7 ] [DEBUG] - Turbosight: enter menu
    [2013-08-10 17:20:27,769] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: MMI handler thread start polling
    [2013-08-10 17:20:27,769] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: sending message CloseMmi
    [2013-08-10 17:20:27,770] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: sending message ApplicationInfo
    [2013-08-10 17:20:35,770] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: received MMI response ApplicationInfo to message ApplicationInfo
    [2013-08-10 17:20:35,770] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: response length = 26
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: application information
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - Content [doctor64] = System.Byte[]
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - type = ConditionalAccess
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - manufacturer = 0xb0
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - code = 0x801
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - menu title = ???????????
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: sending message CaInfo
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: received MMI response CaInfo to message CaInfo
    [2013-08-10 17:20:35,771] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: response length = 3
    [2013-08-10 17:20:35,772] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: conditional access information
    [2013-08-10 17:20:35,772] [Log ] [Turbosight MMI handler] [DEBUG] - # CAS IDs = 1
    [2013-08-10 17:20:35,772] [Log ] [Turbosight MMI handler] [DEBUG] - 1 = 0x0b00
    [2013-08-10 17:20:35,772] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: sending message EnterMenu
    [2013-08-10 17:20:35,772] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: sending message GetMmi
    [2013-08-10 17:20:37,772] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: received MMI response Menu to message GetMmi
    [2013-08-10 17:20:37,772] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: response length = 112
    [2013-08-10 17:20:37,775] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: menu
    [2013-08-10 17:20:37,775] [Log ] [Turbosight MMI handler] [DEBUG] - title = ??U?OYO UOYi
    [2013-08-10 17:20:37,775] [Log ] [Turbosight MMI handler] [DEBUG] - sub-title = 
    [2013-08-10 17:20:37,775] [Log ] [Turbosight MMI handler] [DEBUG] - footer = ??aOaYoai ?? - OONa?aO, Exit - OOUaO
    [2013-08-10 17:20:37,775] [Log ] [Turbosight MMI handler] [DEBUG] - # entries = 4
    [2013-08-10 17:20:37,777] [Log ] [Turbosight MMI handler] [DEBUG] - entry 1 = ¦Ya?aU??oi
    [2013-08-10 17:20:37,777] [Log ] [Turbosight MMI handler] [DEBUG] - entry 2 = Aaa?Y?OUOYYi
    [2013-08-10 17:20:37,777] [Log ] [Turbosight MMI handler] [DEBUG] - entry 3 = ·?U?OUOYYi ?? U?OOUa
    [2013-08-10 17:20:37,777] [Log ] [Turbosight MMI handler] [DEBUG] - entry 4 = ??ea?
    [2013-08-10 17:20:37,801] [Log ] [Turbosight MMI handler] [DEBUG] - Turbosight: resuming polling...

    screen2.png
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    @FreakyJ
    Here is a hint that may or may not be helpful (I don't know the solution for sure)... :)
    You may need to use the DvbTextConverter class in the TVLibrary to read this content. I only anticipated ANSI when I originally wrote the code, because the encoding of text received from the TBS interface was not clear. Now I see it is probably passed straight through from the CAM. This issue could easily apply for some of the other custom device plugins where it is not 100% clear whether the tuner driver has parsed and changed the encoding of the CAM response.
     
    Last edited:

    doctor64

    Portal Member
    December 6, 2009
    40
    9
    50
    Home Country
    Ukraine Ukraine
    Here is a new build."

    I try older patch, for MP 1.3 (MediaPortal_TBSPatch_Binary.zip) and here from log I finally able decode some :) strings
    Log:
    [Turbosight MMI handler(14)]: Turbosight: sending message EnterMenu
    [Turbosight MMI handler(14)]: Turbosight: sending message GetMmi
    [Turbosight MMI handler(14)]: Turbosight: received MMI response Menu to message GetMmi
    [Turbosight MMI handler(14)]: Turbosight: response length = 112
    [Turbosight MMI handler(14)]: Turbosight: menu
    [Turbosight MMI handler(14)]: title = ☺³ÞÛÞÒÝÕ ÜÕÝî
    [Turbosight MMI handler(14)]: sub-title = ☺
    [Turbosight MMI handler(14)]: footer = ☺½ÐâØáÝöâì ВѕВє - ÒØÑà ÐâØ, Exit - ÒØÙâØ
    [Turbosight MMI handler(14)]: # entries = 4
    [Turbosight MMI handler(14)]: entry 1 = ☺¦ÝäÞà ÜÐæöï
    [Turbosight MMI handler(14)]: entry 2 = ☺ÃáâÐÝÞÒÛÕÝÝï
    [Turbosight MMI handler(14)]: entry 3 = ☺·ÐÜÞÒÛÕÝÝï ГџГћ ÜÞÔÕÜã
    [Turbosight MMI handler(14)]: entry 4 = ☺ВїГћГЁГўГђ
    [(4)]: Callback from tvserver ☺³ÞÛÞÒÝÕ ÜÕÝî
    [Turbosight MMI handler(14)]: Turbosight: resuming polling...

    hex dump of some string:
    72 28 31 34 29 5D 3A 20 │ 20 20 74 69 74 6C 65 20 r(14)]: title
    20 20 20 20 3D 20 01 C2 │ B3 C3 9E C3 9B C3 9E C3 = ☺³ÞÛÞГ
    92 C3 9D C3 95 20 C3 9C │ C3 95 C3 9D C3 AE 20 0D ’ГќГ• ÜÕÝî ♪
    changing 0xC3 to 0xD0 (first byte of UTF-8 Cyrillic)
    20 20 20 20 3D 20 01 C2 │ B3 D0 9E D0 9B D0 9E D0
    92 D0 9D D0 95 20 D0 9C │ D0 95 D0 9D D0 AE 20 0D
    decoding as UTF-8 ( http://software.hixie.ch/utilities/cgi/unicode-decoder/utf8-decoder ) i got
    = ”tОЛОВНЕ МtЕНЮ
    which is almost ;) readable Ukrainian "ГОЛОВНЕ МЕНЮ", translated as "Main Menu"

    Hope this help.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Thanks mm for the hint, here is the try^^

    No problem at all, i work as developer and fully understand difficulties of remote debugging
    maybe you should take a look at the src your self xDD

    we have something liek this ins the src:
    String text = System.Text.Encoding.Unicode.GetString(content, 2, length - 2);
    Unicode is in the original version ASCII, the var content is of the type byte[]

    Anyway, here is a new build. I couldn't find any usage of this function in relation to ci menus so it is a wild guess what I did...
    The Documentation is also not that good:
    /// <summary>
    /// Convert DVB string to Unicode according to provided language
    /// </summary>


    decoding as UTF-8
    my first build I send to you there was the result treated as unicode :/
     

    Attachments

    • Release.rar
      198.4 KB

    Users who are viewing this thread

    Top Bottom