MSI-mystic-light-tool icon indicating copy to clipboard operation
MSI-mystic-light-tool copied to clipboard

small code fix to avoid timeout in GetDeviceInfo() call

Open erkr opened this issue 4 years ago • 16 comments

This line seems to intermittently cause a timeout in my code: status = ml.getDevInfo(&(devices.m_psa), &(ledCount.m_psa)); //the function will modify the pointer to the descriptor .m_psa, which is itself a pointer to the actual safearray better seems to be: SAFEARRAY *psad = NULL, *psal = NULL; status = _GetDeviceInfo(&(psad), &(psal)); if (status == MLAPI_OK) { devices.Attach(psad); ledCount.Attach(psal); // do your stuff }

erkr avatar Jun 18 '20 12:06 erkr

I have tried looking through all the documentation and comments in here, but I still have the GetDeviceInfo timeout issue.

I got it to initialize, which puzzles me. Tried both 32-bit and 64-bit versions, boiled the code down as much as possible, ran as admin with and without Dragon Center open, no success. I also don't have any success with the MSIRGB code either.

Running on an MSI Z390 Gaming Pro Carbon AC, newest BIOS, Dragon Center and Mystic Light. Mystic Light 3 I believe.

RBMDragon avatar Aug 30 '20 20:08 RBMDragon

I don't know how to help you man, initially I made this repo as a boilerplate to show mystic light's capabilities but it soon turned into a demostration of bad the software engineering from MSI is. I suggest you look into MSIRGB which interfaces directly to the hardware instead of going through this hell of sdk

SimoDax avatar Sep 05 '20 18:09 SimoDax

It really is too bad that their SDK is so badly documented. I like their hardware. I've tried the MSIRGB, but without success. Do I have to uninstall Mystic Light in order to get it working, or even Dragon Center?

I could the interface open, but no connection to the lights.

RBMDragon avatar Sep 05 '20 18:09 RBMDragon

Yeah I think uninstalling them is worth a shot

SimoDax avatar Sep 06 '20 14:09 SimoDax

Hi, I never got the SDK working reliable! Have had a ticket exchange with MSI, no intelligence encountered there :-( BUT, if you know what _GetDeviceInfo returns, you can skip the call. That works (but it remains unreliable) If you try MSIRGB (I did), just uninstalling MysticLight in Dragon Center is enough.

erkr avatar Sep 06 '20 18:09 erkr

Hey erkr. I did not have any luck with MSIRGB after uninstalling MysticLight, but perhaps it is dependent on a reboot? Cannot remember if I did that.

I have had success before with JackNet RGB Sync, but the synchronization was still out of whack between the GPU and MB.

RBMDragon avatar Sep 06 '20 19:09 RBMDragon

Hi I tried msirgb half a year ago. Had to patch the code to support my MB with some success (inverted colors). I’m following this project. More promising, but less mature yet;

https://gitlab.com/CalcProgrammer1/OpenRGB

Have a nice day

Sent from my mobile

On 6 Sep 2020, at 21:41, RBMDragon [email protected] wrote:

 Hey erkr. I did not have any luck with MSIRGB after uninstalling MysticLight, but perhaps it is dependent on a reboot? Cannot remember if I did that.

I have had success before with JackNet RGB Sync, but the synchronization was still out of whack between the GPU and MB.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/SimoDax/MSI-mystic-light-tool/issues/13#issuecomment-687881541", "url": "https://github.com/SimoDax/MSI-mystic-light-tool/issues/13#issuecomment-687881541", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

erkr avatar Sep 06 '20 20:09 erkr

Hi Which part of the code did you patch?

Specifically which file?

Have a nice day too.

RBMDragon avatar Sep 06 '20 21:09 RBMDragon

I will check later

Sent from my mobile

On 6 Sep 2020, at 23:41, RBMDragon [email protected] wrote:

 Hi Which part of the code did you patch?

Specifically which file?

Have a nice day too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/SimoDax/MSI-mystic-light-tool/issues/13#issuecomment-687909155", "url": "https://github.com/SimoDax/MSI-mystic-light-tool/issues/13#issuecomment-687909155", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

erkr avatar Sep 07 '20 08:09 erkr

Project: https://github.com/ixjf/MSIRGB File: MSIRGB/MSIRGB.DLL/logic/Lighting.cpp Method: Lighting::MbCompatError Lighting::check_supported_mb() There I added the code for my MB. Nowadays, you can even specify inversion :-)

erkr avatar Sep 07 '20 15:09 erkr

Hi

Unfortunately, it didn't seem to solve the problem. Thank you for the help though.

RBMDragon avatar Sep 07 '20 19:09 RBMDragon

Hi I also noticed the MSIRGB version I used ( February) was not always able to properly initialize the io chip. So I had to configure default mode in mystic light before uninstall mystic light. I hope this is of any help

Sent from my mobile

On 7 Sep 2020, at 21:47, RBMDragon [email protected] wrote:

 Hi

Unfortunately, it didn't seem to solve the problem. Thank you for the help though.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/SimoDax/MSI-mystic-light-tool/issues/13#issuecomment-688489376", "url": "https://github.com/SimoDax/MSI-mystic-light-tool/issues/13#issuecomment-688489376", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

erkr avatar Sep 07 '20 20:09 erkr

Hi

I've gotten some feedback from MSI and have so far been successful in getting feedback from getDevInfo (MLAPI_GetDeviceInfo). They have uploaded a new version of the SDK (DLL files have been updated).

RBMDragon avatar Sep 11 '20 09:09 RBMDragon

Nice of them, if you make a pr with the correct DLL I'll merge it

SimoDax avatar Sep 11 '20 12:09 SimoDax

Can feel I'm still a bit new to GitHub. How do I make a pull request and merge the new files in?

RBMDragon avatar Sep 11 '20 17:09 RBMDragon

I merged the new SDK into my private project as well. getDevInfo seems to work, but lets see (it worked intermittently in the past) Another issue is definitely not solved. Every time I update LED color settings, the LEDS briefly switch off.

erkr avatar Sep 13 '20 10:09 erkr