LennardKittner / HyperXCloudIIWireless

A CLI and tray application to monitor HyperX Cloud II Wireless headset battery level.
MIT License
16 stars 4 forks source link

support for the older version of HyperX Cloud II #1

Open tottoszsolt opened 1 year ago

tottoszsolt commented 1 year ago

I have installed the dependencies, but when I try to launch it, I get broken pipes error, both the cli and the hyperx app, please help. Thank you!

LennardKittner commented 1 year ago

Strange the two apps use the same code to interact with the device. I will look into it.

LennardKittner commented 1 year ago

Sorry for the late response. Yes, both applications use the same backend code; the only difference is that the cli application sends the battery request just once. Does the tray application crash immediately, or does it show the battery level and then crash at some point? If you execute the cli app multiple times, do you get the correct response every time?

miikeyjay commented 1 year ago

when i run the tray app it waits a second and give the error message, image the cli app doesnt work every time, since the last 5 days it worked around 2 times only. image

LennardKittner commented 1 year ago

Interesting @tottoszsolt reports similar behavior. It seems like the packet sent to the headset only works once per power cycle. I think this is because the headset is waiting for a specific answer but does not get one and thus shuts down the conversation. Could you maybe look again with Wire Shark to see if you find any additional packets that are regularly sent between the host and headset, or vice versa? You could also send me a dump of the traffic, and I'll take a look.

miikeyjay commented 11 months ago

sorry for the delay, life happened, i tried to dump all the packets from the headset, if you need any other info on it feel free to ask. only cloud ii.zip

LennardKittner commented 11 months ago

Thank you, I will look into it :)

LennardKittner commented 10 months ago

Hi, sorry for the late response. I checked the log, and the packet I sent matches the packet sent in the log. However, it seems like the host also sends some interrupts to the device; maybe these are the key? I don't see an option to send interrupts with the HID library I used in the project. I will try to find another HID library or to decompile the Windows app and look into what actually happens. Decompiling the Windows app is a bit annoying because, as far as I can tell, it is only available through the Windows Store.

miikeyjay commented 10 months ago

No problem, if you need anything that i can provide to help just ping me and i will try.

LennardKittner commented 10 months ago

Hey, thank you for the offer. If you want you could look into how to disassemble the hyperx windows app or haw to get the hyperx windows app without using the windows store (if that is even possible).

miikeyjay commented 8 months ago

after a while i started to search for information on this and found this python app that works with my headset (https://github.com/Agustin-Jerusalinsky/hyperx-cloud-II-battery) the battery.py returns the right %

LennardKittner commented 8 months ago

Yes, I would expect that. The first packet that was tested here, https://github.com/LennardKittner/HyperXCloudIIWireless/issues/1#issuecomment-1692048386 is actually from that repository. However, I just noticed it does one thing different before the request for the battery level, it also sends a report request. I could also try that. Does battery.py work every time, or only on the first try?

miikeyjay commented 8 months ago

yes, it is working every time, and the panel is working too

LennardKittner commented 8 months ago

Cool. I think the only difference is that it sends the report. I will try to do the same in my code.

LennardKittner commented 8 months ago

As far as I can tell, the library I use to interface with the headset has no get_input_report function. I could try to do something similar, but first I would like to know if this is really the issue. Could you please run the battery.py again, but with lines 13 and 26 commented out?

miikeyjay commented 8 months ago

commenting both freezes my terminal, commenting only 13 still freezes my terminal, commenting only 26 gives the result every time i tested. 13-and-26-commented 13-commented 26-commented

LennardKittner commented 8 months ago

Thank you. I would have guessed that line 13 alone does not send anything to the device because of the "write" in line 26. But apparently, that is not the case.

Jason-THL commented 5 months ago

Hello, is it possible to add a battery icon for the HyperX Cloud 3 Wireless as well?

LennardKittner commented 5 months ago

Hi, as you can see, supporting the old wireless 2 is already quite challenging / not possible. Therefore, I can't promise anything. However, if you provide me with the packets that have to be sent to the headset and its product id I can try to add support for it. Also, could you please create a new issue regarding the wireless 3?