Comments (9)
Hey guys, after playing around with the code, I figured out why it was timing out. You have to run the app as administrator in order for it to work and of course, you do need Mystic Light installed for it to function properly as well.
I'm new to this git thing and dunno how to do a pull request or fork or whatever. So here's a pastebin link containing the modified code. I was also able to map out some of my LEDs.
Also keep in mind, I'm running an MSI X399 board, so the LED integers might not apply to your device.
EDIT:
Here's a screenshot of my console window. And all my LEDs in my tower changed red after I ran it.
https://jugglingcode.com/snapshot/71X3smd1524.png
Another thing I wanted to point out, I don't think LED count is set properly. I think there is an issue in MSI's library, because there are definitely not "19548964" LEDs on my motherboard.
from msi-mystic-light-tool.
Have been trying this evening but whenever I call MLAPI_GetDeviceInfo()
it returns the MLAPI_TIMEOUT
status
from msi-mystic-light-tool.
@battlemoose what's your hardware setup?
from msi-mystic-light-tool.
@SimoDax Using an MSI Z370 SLI PLUS LGA 1151-2 Motherboard with a DeepCool RGB cooler attached to the RGB header. Have Mystic Light 2 installed.
from msi-mystic-light-tool.
Hm, I actually don't know why it fails, the code has no control of what happens inside the dll :(
My best bet is that the library is still buggy.. Anyway you could give it a shot using ml 1 instead of 2
Update: I've tricked the library to initialize despite Mystic Light 2 saying that my platform isn't supported and GetDeviceInfo returns MLAPI_TIMEOUT
here aswell. I've then tried calling GetDeviceInfo(NULL, NULL)
and the result is the same. I guess it fails uncaring of the parameters you pass. I mean, if it had tried to load the info it would have dereferenced a null pointer, so I was expecting either a crash or some other error message.. certainly not a timeout. Not much I can do at this point, maybe contacting MSI could be of some help?
from msi-mystic-light-tool.
Tried with ML1 installed and a system not supported error is returned on initialisation. Agreed that it sounds like an issue with the library and there isn't much that can be done short of contacting MSI.
from msi-mystic-light-tool.
Thank you man! I honestly hadn't thought about administrator rights.
I tried it just now and.. yes, it gets past the initialization! Unluckily my B350 is friends with Mystic Light 1 only, so the sdk fails after that point, but I'm glad it works for people with the newer version
I'll edit the code and the readme accordingly :)
EDIT:
Regarding the led count, what happens if you call GetLedInfo with an index which is not mapped to a real led zone? If it returns something different from MLAPI_OK it could be used to get the proper led count.
(Theoreatically I'd expect MLAPI_DEVICE_NOT_FOUND, but given the current state of the sdk I wouldn't be surprised if the call leads straight up to a segmentation fault)
from msi-mystic-light-tool.
I did a lot of testing, I went all the way up to 50 just to be sure, but my particular motherboard had 6 LED areas. I technically have 7 because I have that little POST code screen and a power/reset button built onto the motherboard, but it just returns "MLAPI_NOT_SUPPORTED". As for any LED that didn't exist, it just returned "DEVICE_NOT_FOUND". Granted I only did this with SetLedColor, but I imagine it'll be the same for the other methods.
from msi-mystic-light-tool.
Another thing I wanted to point out, I don't think LED count is set properly. I think there is an issue in MSI's library, because there are definitely not "19548964" LEDs on my motherboard.
Try to declare ledCount
as array of BSTR
and see if it helps
CComSafeArray<BSTR> ledCount;
You can then convert it to int
:
int count = _wtoi(ledCount.GetAt(0));
from msi-mystic-light-tool.
Related Issues (12)
- GetDeviceName returns an empty array
- How does it works? HOT 1
- For 64 bit, another dll needed
- small code fix to avoid timeout in GetDeviceInfo() call HOT 16
- Linux? HOT 2
- Need help getting it to work HOT 28
- Mysticlight 1 doesnt work HOT 2
- Feel free to use my wrapper for Mystic Light API HOT 4
- LEDs temporarily turn off when changing colours HOT 5
- Mystic light SDK compatible with Mystic Light 3.0 ? (Timeout getDeviceInfo) HOT 9
- The LEDs revert to all white each time I restart or resume the computer from sleep HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msi-mystic-light-tool.