QuiNz0r / Logitech-Battery-LED

Small app to change RGB LED on Logitech Wireless Mice within Logitech G Hub according to battery charge
4 stars 0 forks source link

Not working #1

Open hasantahsindagli opened 3 years ago

hasantahsindagli commented 3 years ago

Hello, I have g502 lightspeed and I installed this app for i can see on percentage of the battery status on taskbar. However, app doesn't work. Only show 0%. What should i do? (lghub 2020.12.6465) And also, i use Rainmeter. Can i see battery level on rainmeter skins? I hope you can help me. Have a nice day.

QuiNz0r commented 3 years ago

Hi, make sure you're using the g hub software version in the description. Newer versions most likely changed the memory offset of the battery percentage value.

I might update the value in the future not sure though since I don't use a Logitech mouse anymore.

There is no rainmeter integration but should be fairly easy to add.

hasantahsindagli commented 3 years ago

I understand. I tried to find memory offset on cheat engine yesterday but i didn't. Anyways, thank you. Have a nice day.

QuiNz0r commented 3 years ago

I did it with cheat engine too, search for your current battery charge value as float (yes it's a float for some reason) then turn off your mouse and search for 0. repeat 2-3 times and you should have it

hasantahsindagli commented 3 years ago

Thank you very much. I found it.
I hadn't thought of turning the device on and off and also search with float value. I found only one address. "22F4ECC4B24" However, i couldnt find base address offset with pointer scan... Because pointer scan not working. found results 0!

uk0 commented 3 years ago

Hello, can you send the video of your search address to youtube? Or you can give me some steps for your search, I am searching according to your description but it has no effect, I don’t know if the battery type has changed, I hope you can help me thank you, I don’t know what I said Can you understand my English? I really need your help. pls help me

yaniv382 commented 3 years ago

Hi, is there any way to contact you?

spreedated commented 7 months ago

As of Version (2024.1.515200) the pointers are:

0x023D1D68, [0x20, 0x20, 0x18, 0x158, 0x358, 0x3F8, 0x20, 0x0, 0x8, 0x50]
0x06B43C50, [0x8, 0x8, 0xC0, 0x34, 0x450, 0x3F8, 0x20, 0x0, 0x8, 0x50]
0x023D1D68, [0x20, 0x20, 0x18, 0x110, 0x2E0, 0x3F8, 0x28, 0x0, 0x8, 0x50]
0x023D1D68, [0x20, 0x20, 0x18, 0x180, 0x2E0, 0x3F8, 0x28, 0x0, 0x8, 0x50]

At least for G915 Keyboard.


The main issue you're facing when reading out the memory to receive the information is, that it changes with every version. Also you cannot determine for sure that all keyboards will have this addresses or only the primary. The best way would be to hang on an api for the Logitech G-Hub software, but as far as I know, there's none.

However, I'm monitoring my G915 & G935 (Headset) in my own application; at the time the Version of G-Hub changes I gotta investigate the new pointers.

spreedated commented 7 months ago

For everyone who's looking for a how to, well, there's a bit of luck involved and a big portion of patience.

Starting with CheatEngine, you point down the Value of the current charge to exactly one address. Generate a pointermap for this address, save it.

To get quickly through it you can switch the device on & off, attach & deattach the loading cable or just wait for a charge or discharge.

Next you kill the process lghub_agent & restart it by opening the main-hub-application, attach CT to it and repeat the first step. Now with two pointermaps saved, you pointer scan for the latest address, click on the checkbox use saved pointermap, be sure to select the correct one(!), checkbox on compare results with other pointermaps, load and select the previous address. Be lucky(!), if your result comes to no addresses, try to increase the level, for me a max level of 10 works. You should be left with some thousand addresses, like 6000 or so, now be lucky again, add a good portion (like 20-30) of them into the codelist, be sure to scroll around a lot.

For the last step, kill the agent process once again, reopen and attach CT to it, now, you should see some addresses with points to the correct value and others who points to different values or into nothing.

Congratulations, you have some pointers now.