-
Notifications
You must be signed in to change notification settings - Fork 35
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
Linux ubuntu crash when trying to open stream #12
Comments
|
HI |
By crash you mean it throws an exception? At which statement exactly? |
It didn't throw an exception, just the OS freeze somewhere inside the the loop. |
Can you elaborate on this? You are trying to send a buffer, that is interpreted as a read request message by this specific HID device? Or are you trying to pass USB control setup packet over the HID endpoint (which is a very bad idea, and you shouldn't be surprised if it doesn't work)? Please send me the (raw if possible) HID report descriptor of this device. You can use this library to get it. If the report descriptor contains report IDs, then you must put the report ID on the first byte of every message you send or receive. In this case 0xc2 seems very off. |
about the device descriptor, it is a device under development in our organization, Just to make sure I understand correctly, |
Yes, correct, the report ID should be put in the first byte, as long as the HID device defines report IDs in its report descriptor. Even if it's not the case, I'd give it a try (in this case just put 0 at the first byte), as it might be that the OS/kernel driver still expects it. |
HI, after deep investigation, I found out that issue was on kernel version, I did found a minor issue that the return value on Linux Get Feature report is different than Windows one. I shifted left all the values in a simple loop, and now all works great on windows and Linux. |
Hi,
I have code uses the library, I successfully located and got the HidDevice instance.
after I tried to open a connection and get the stream object, the machine crushes and reboots.
the line of code which crush is
_stream = device.Open();
I tried to run as root (using sudo su) .
in windows my code works just fine.
NOTE - I compiled it using dotnet publish -f net5.0 -r linux-x64
any idea?
The text was updated successfully, but these errors were encountered: