FireDTV Remote does not work (1 Viewer)

audioPitheco

MP Donator
  • Premium Supporter
  • February 2, 2009
    68
    2
    furlan
    Home Country
    Italy Italy
    FireDTV Remote does not work on VISTA x64

    maybe this dll doesn't like to be loaded in a x64
    env.

    Mhhh... I think that Digital Everywhere itself loads the FiresatApi.dll
    inside its FireDTVViewer.exe (why duplicating code, in fact) and the
    FireDTV Remote control works fine with the FireDTVViewer.exe in my
    system (64 bit environment).

    So, there must be something else.

    I had a look to the Mediaportal source code and I found something interesting:

    - first:
    this was my first log pointed out by chemelli:
    2009-02-04 00.21.43.451544 [Info.][Config Main]: FireDTV: FiresatApi.dll could not be found on your system!
    2009-02-04 00.21.43.451544 [ERROR][Config Main]: FireDTV: FiresatApi.dll could not be found on your system!

    I found that the following code (FireSATControl.cs at Ln64)
    Code:
    // First try in MediaPortal's base directory
    string fullDllPath = Config.GetFile(Config.Dir.Base, "FiresatApi.dll");
    if (File.Exists(fullDllPath))
    {
      Log.Info("FireDTV: Using FiresatApi.dll located in MediaPortal's base dir {0}", fullDllPath);
    }
    else
    {
      // Look for Digital Everywhere's software which uses a hardcoded path
      fullDllPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
                                 @"FireDTV\Tools\FiresatApi.dll");
      if (File.Exists(fullDllPath))
      {
        Log.Info("FireDTV: Using FiresatApi.dll located in FireDTV's install path {0}", fullDllPath);
      }
      else
      {
        Log.Error("FireDTV: FiresatApi.dll could not be found on your system!");
        return;
      }
    }

    in Vista 64 bit fails because the FireDTV 5.3 beta drivers install themselves under the
    default "C:\Program Files" directory (default for every 64 bit full compatible software)
    while Mediaportal installs itself under the default "C:\Program Files (x86)" dir.

    In fact after having copied the FiresatAPI.dll in the Mediaportal install dir my log
    changed as follows:

    Code:
    2009-02-08 23.45.02.446822 [Info.][Config Main]: FireDTV: Using FiresatApi.dll located in MediaPortal's base dir C:\Program Files (x86)\Team MediaPortal\MediaPortal\FiresatApi.dll
    2009-02-08 23.45.02.462422 [Info.][Config Main]: FireDTV: error initializing Tentativo di caricare un programma con un formato non corretto. (Eccezione da HRESULT: 0x8007000B)
    2009-02-08 23.45.02.462422 [ERROR][Config Main]: FireDTV: error initializing Tentativo di caricare un programma con un formato non corretto. (Eccezione da HRESULT: 0x8007000B)

    Other issue but the dll has been found.

    Last observation, the FiresatAPI.dll original dir is also provided in the path environment variable.

    - second:
    Spying the FiresatAPI.dll functions entry points and comparing them (the decorations of their names)
    with them used in the "DLLImport" calls in FireSATDefines.cs, I found differences.

    I.e:
    - FireSATDefines.cs:
    EntryPoint = "?FS_RegisterGeneralNotifications@@YAKPAUHWND__@@@Z"
    - FiresatAPI.dll:
    EntryPoint = "?FS_RegisterGeneralNotifications@@YAKPEAUHWND__@@@Z"

    Many others differs by many more characters.
    Is this perhaps due to the fact that I have the latest FiresatAPI.dll (FireDTV 5.3 beta drivers)
    installed while the FireSATDefines.cs code refers to a previous dll version?

    Anyway, by now I could not go ahead with deeper test because of my development
    environment (I guess): I installed Visual Studio 2008 in my Vista 64 bit (I have only
    VS 2008 and 2003 to install, not 2005) and downloaded the latest codes with svn. The problem
    is that in the same machine I also have the original installation of MP and TVserver so
    the exe that I compile with VS 2008 crashed due to a dll version conflict problem
    (i.e. bass.dll version).

    Under VS in debugging mode (F5) the run time goes but I cannot (I donno why yet)
    step into some code (set active breackpoints) to see what really happens (need more time to tune the system up).

    Anyway I hope my feedback will be useful to point out the right holes.

    Bye
     

    xcvb

    Portal Member
    November 13, 2008
    5
    0
    Home Country
    Austria Austria
    maybe this dll doesn't like to be loaded in a x64 env.

    Simone

    I did a fresh install of vista 64bit just to check and the remote works. It doesn't work with FiresatApi.dll version 1.11.2226.0 (which is included in the newest driver), but when I put the older 1.10.1.0 version in the mediaportal folder it's working.
    So its definetly not up to the 64bit os.

    No one got a idea what causes this error?
    2009-02-03 17:40:09.365000 [ERROR][MPMain]: FireDTVRemote: SourceFilter Not Found
     

    audioPitheco

    MP Donator
  • Premium Supporter
  • February 2, 2009
    68
    2
    furlan
    Home Country
    Italy Italy
    I did a fresh install of vista 64bit just to check and the remote works. It doesn't work with FiresatApi.dll version 1.11.2226.0 (which is included in the newest driver), but when I put the older 1.10.1.0 version in the mediaportal folder it's working.
    So its definetly not up to the 64bit os.

    Good feedback xcvb!
    In fact as You can observe from my last post, I've watched inside the Mediaportal code and found the reason why it crashes with the new dll version (but perhaps if You are not a programmer what I've written before means nothing). Anyway in simple word the actual version of Mediaportal calls the API (the Application Programming Interface are functions collected in a file, often a dll, provided by a producer, in this case Digital Everywhere, to which other programmers can access, in this case the Mediaportal Programmers Team) of the 1.10.1.0 dll version that is a tiny bit different from that of the new 1.11.2226.0 dll version as I pointed out before:
    I.e:
    - FireSATDefines.cs (Mediaportal code file):
    EntryPoint = "?FS_RegisterGeneralNotifications@@YAKPAUHWND__@@@ Z"
    - FiresatAPI.dll (1.11.2226.0):
    EntryPoint = "?FS_RegisterGeneralNotifications@@YAKPEAUHWND__@@ @Z"

    What I found watching the code I did not try in practice because I had only the new 1.11.2226.0 dll version... but after the xcvb's feedback I searched with Google the old dll and...

    now the remote works!

    I also verified again with my dll entry point spy (dllexp) that in this case the entry points are aligned:
    - FireSATDefines.cs (Mediaportal code file):
    EntryPoint = "?FS_RegisterGeneralNotifications@@YAKPAUHWND__@@@ Z"
    - FiresatAPI.dll (1.10.1.0):
    EntryPoint = "?FS_RegisterGeneralNotifications@@YAKPAUHWND__@@@ Z"

    This error is due to Digital Everywhere's programmers that have violated the first rule of the API programmer: never change the entry point decoration to preserve the compatibility of old softwares!

    Now the Mediaportal programmers (chemelli or others) have to align the code to the new dll.

    No one got a idea what causes this error?
    2009-02-03 17:40:09.365000 [ERROR][MPMain]: FireDTVRemote: SourceFilter Not Found

    mhh... I've had a look to the code and found that this error is handled in the FireDTVRemote class when trying to initialize the FireSATSourceFilterInfo... I think is something due to the driver...

    The problem is this:

    - The FireDTV Integrated Driver and Software Setup 4.5.N contains the 1.10.1.0 dll version compatible with the latest Mediaportal version but has NO compatible drivers with VISTA 64 bit (see what Digital Everywhere says:
    digital everywhere - Integrated Driver Setup );

    - The FireDTV Integrated Driver and Software Setup 5.3.N (Beta), instead, contains the 1.11.2226.0 dll version NOT compatible with latest Mediaportal version but has compatible drivers with VISTA 64 bit.

    So I think You have to install the Setup 5.3.N (Beta) and manually copying the old 1.10.1.0 dll version inside the Mediaportal folder.

    Hope this will help.

    aP
     

    xcvb

    Portal Member
    November 13, 2008
    5
    0
    Home Country
    Austria Austria
    So I think You have to install the Setup 5.3.N (Beta) and manually copying the old 1.10.1.0 dll version inside the Mediaportal folder.

    Yes this works on the fresh vista but not on my current system. So I think I'll have to reinstall.

    -Eric
     

    audioPitheco

    MP Donator
  • Premium Supporter
  • February 2, 2009
    68
    2
    furlan
    Home Country
    Italy Italy
    So I think You have to install the Setup 5.3.N (Beta) and manually copying the old 1.10.1.0 dll version inside the Mediaportal folder.
    Yes this works on the fresh vista but not on my current system. So I think I'll have to reinstall.

    Maybe because to remove the previous driver package it's not sufficient uninstalling the package from Control Panel > Programs and Features, but You have also to remove the drivers manually from Control Panel > System > Device Manager section. Then You can install the 5.3.N setup. I guess.

    bye
    aP
     

    Users who are viewing this thread

    Top Bottom