DjGamewon
DjGamewon
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Oh I mixed up people I guess - on github the issue is for the Ajazz devices
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
No, I have it too, fixed on latest hidapi-rs (git), not on crates yet though
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
The issue on github should still stay open though, since serial will be fixed when updating hidapi-rs, and for the firmware version maybe new issue?
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Alright, done!
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Cool, I'd appreciate checking the review for lib.rs lines 698 - I'm not sure if it's good to code the 0x00 byte at the start like that, but that function is only used by Ajazz devices so it's fine, but not sure if it's good style. If it's okay, then I'll push a commit for formatting (mainly to remove the comment)
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
I changed opendeck's cargo.toml to point to the elgato-streamdeck crate with the path option instead of version
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Added a comment on github issues as well, I would really appreciate a second look from someone
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Huh, the Elgato code only works because of that payload[0] != 0 check - since it's report number is 0x02.
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
So I think I get it. The first byte is the report number - as far as I can see, everywhere where it's being used for elgato devices, it is set before calling the write_data function, so it works for both Linux and Windows. For the chinese devices, the report number is coded into the write_data function, so it adds a 0x00 to the beginning. However, this is coded to only happen on Linux for some reason, so it doesn't work on Windows. I do not know if the check for the first byte being 0 - if so, it doesn't add a 0 - is needed.
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Works under linux - I realised that it enters that branch anyways, only time it doesn't is if the first byte is 0, but is that really correct?
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
From hidapi:
/// Write an Output report to a HID device.
///
/// The first byte of `data` must contain the Report ID. For
/// devices which only support a single report, this must be set
/// to 0x0. The remaining bytes contain the report data. Since
/// the Report ID is mandatory, calls to `write()` will always
/// contain one more byte than the report contains. For example,
/// if a hid report is 16 bytes long, 17 bytes must be passed to
/// `write()`, the Report ID (or 0x0, for devices with a
/// single report), followed by the report data (16 bytes). In
/// this example, the length passed in would be 17.
/// `write()` will send the data on the first OUT endpoint, if
/// one exists. If it does not, it will send the data through
/// the Control Endpoint (Endpoint 0).
///
/// If successful, returns the actual number of bytes written.
pub fn write(&self, data: &[u8]) -> HidResult<usize> {
self.inner.write(data)
}
/// Write an Output report to a HID device.
///
/// The first byte of `data` must contain the Report ID. For
/// devices which only support a single report, this must be set
/// to 0x0. The remaining bytes contain the report data. Since
/// the Report ID is mandatory, calls to `write()` will always
/// contain one more byte than the report contains. For example,
/// if a hid report is 16 bytes long, 17 bytes must be passed to
/// `write()`, the Report ID (or 0x0, for devices with a
/// single report), followed by the report data (16 bytes). In
/// this example, the length passed in would be 17.
/// `write()` will send the data on the first OUT endpoint, if
/// one exists. If it does not, it will send the data through
/// the Control Endpoint (Endpoint 0).
///
/// If successful, returns the actual number of bytes written.
pub fn write(&self, data: &[u8]) -> HidResult<usize> {
self.inner.write(data)
}
So it seems normal that we need to add a byte to the start, I'll check on linux in a little bit if it works as intended if I make the change, because imo from the docs it seems like it shouldn't be working either
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
I didn't fix it fully yet, but when writing data just needed to add a 0 byte (or I imagine any value would work). It seems like the code adds a 0 sometimes, but I just currently made it do it everytime
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
No description
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Oh nevermind, now it doesn't react to key presses.. Maybe it reacted because I had the Stream Dock app open
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
Do I understand correctly that by simply removing the firmware line the code continued on, but froze at some line? I changed the hidapi to the latest git version and I'm getting key inputs in the simple example, about to try async. However, OpenDeck couldn't upload/download
123 replies
OOpenDeck
Created by ninjadev64 on 12/28/2024 in #issues
Ajazz devices not functioning properly under Windows
That's me, I have no experience with usb aside from simple serial unfortunately, so it's hard to make sense of it. I'm going to just try adding the newest version to the library and see what happens - getting the firmware version won't work, but maybe other stuff starts working. I managed to get the firmware version with rusb though, but that's a bandaid imo. I read some issues on hidapi that feature_report is a lot more strict on Windows, so some stuff might not work like it does on Linux, but the Mirabox github sample seems to use getInputReport, but it's from a library file, so I can't tell if they've changed anything.
123 replies