Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hid_write return -1 on linux #451

Open
lio800206 opened this issue Jan 7, 2020 · 1 comment
Open

hid_write return -1 on linux #451

lio800206 opened this issue Jan 7, 2020 · 1 comment

Comments

@lio800206
Copy link

Hi
I am using the hidlib to make a project both on windows and linux

int res;
unsigned char buf[65];
buf[0] = 0x00;
buf[1] = COMMAND MODE; //0xcc
state->signature = SIGNATURE;
memcpy(buf+2, state, sizeof(STATE));
res = hid_write(handle, buf, 65);
if(res == -1)
{
    return -1;
}

when I try on windows everything is work,but on linux "res" return -1.

@Youw
Copy link

Youw commented Jan 7, 2020

Please see #373

Megamouse pushed a commit to RPCS3/hidapi that referenced this issue May 23, 2023
- native implementations for hidraw/libusb/macOS;
- HID Report Descriptor reconstruction from HIDP_PREPARSED_DATA on Windows;
- unit-tests for some known devices for `hid_winapi_descriptor_reconstruct_pp_data`;
- support for ASAN builds (mainly to check the `hid_winapi_descriptor_reconstruct_pp_data`/its unit-tests;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants