AtmoWakeHelper - 1.00 - Solution for auto COM reconnect on sleep/resume (1 Viewer)

Rick164

MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Uploaded new version, it adds the option disable Atmowin startup after resume which might help with Atmolight handling that itself.

    Yeah, 2nd resume shows indeed a similar issue. I toggle the LEDs on >> Error with SetAtmoEffect! >> Reconnect is done >> 2nd manual toggle just turned the LEDs on.
    But still, It finds the connection back, and the LEDs are working :D :p

    Can't reproduce this problem myself but let me know if this new option helps at all.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    Can't reproduce this problem myself but let me know if this new option helps at all.
    This might only be reproducible after a longer S3 time (1 hour++), but will let you know how it goes.
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Yeah, 2nd resume shows indeed a similar issue. I toggle the LEDs on >> Error with SetAtmoEffect! >> Reconnect is done >> 2nd manual toggle just turned the LEDs on.
    But still, It finds the connection back, and the LEDs are working :D :p
    Thanks, will have a look at it.

    Prefer to solve this in the Atmowin as well but we need something that reconnects a COM port at the lower level as this problem isn't with Atmowin itself but in Windows handling the COM device improperly (lost connect to device on resume), what we could do is built the AtmoWakeHelper function (line 129-174) into AtmoWin and/or AtmoLight.
    Yeah, but AtmoWin is the nearest point to the problem. Maybe it is possible to fix this problem directly? Im guessing AtmoWin does not close the COM port connection when it goes to sleep/hibernate, and does not make a new one on resume, but just keeps the connection. And this then results in problems. Wouldnt it be possible to "simply" close the com port connection on sleep/hibernate and reestablish it on resume? Again im just guessing. If this is not possible, then yeah the best solution i think would be to integrate your work into AtmoWin, so it can restart the com port after a resume.

    And if i have some guts, i ask for moving the delay option from Atmolight to Atmowin also
    :p
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Problem is most likely that Windows doesn't wake the COM device correctly after sleep so even if Atmowin would close the COM port correctly it still wouldn't work, only thing that worked for me was to use an external solution to re-attach the COM device (usbdeview.exe).

    Will take a look at the Atmowin code today and see if the same can be done in C++, only problem might be that we need a clean way to let Atmowin re-connect the COM device and with the vanilla code there wasn't any.

    /Edit: in C++ there's WM_POWERBROADCAST:

    http://msdn.microsoft.com/en-us/library/aa373247(v=vs.85).aspx

    Atmowin fails to compile here because I need to get new external libs for it, gonna take a bit of effort to get the environment working.
     
    Last edited:

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Small update (beta5) and got permission from NirSoft to include usbdeview as well so it's also on Github in the External Resource folder.

    /edit: added additional error handling for Atmowin kill process and made debug mode for easy testing, Beta 6 is up
     
    Last edited:

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,952
    5,623
    France - IDF
    Home Country
    France France
    hello Rick, i have an small issue with this one,
    i try it on my productive system now,
    i have repaired my system, but i attached as low cost with scotch ( and after 2 days is down behind the TV )
    ... back to the post lol

    i use MP as shell replacement, and don't see Windows on background. ( explorer.exe not started )

    Start MP from shutdown, start the tool, but when i resume the system from sleep, i have the message
    " make sure, you have copied the folder "includes" from archives, because USBdeview can't be found"
    i have try to test, with explorer as shell, and MP started after. none problem, the resume work fine.
    can you look ? this issue. please
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Hi,

    That sounds like the same problem @Lightning303 was having a while back although that happened randomly on resume, if it occurs on every standby resume it might be that you're indeed missing the includes folder which contains the USBDeview.exe for the USB reconnection.

    Did make a new version which has a delay of 2.5s added for when the disks are starting and everything isn't up yet (like Atmowin or the standby handler), attached that one in the first post (BETA 7).
    Let me know if that one works better :)
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,952
    5,623
    France - IDF
    Home Country
    France France
    Did make a new version which has a delay of 2.5s added for when the disks are starting and everything isn't up yet (like Atmowin or the standby handler), attached that one in the first post (BETA 7).
    i don't have the issue when i use windows explorer as shell
    and i use SSD
     

    Users who are viewing this thread

    Top Bottom