PORTS Forum
Ports and Interfaces => USB => Topic started by: yindengxie on August 10, 2020, 05:55:47 am
-
Hello Sirs,
I request your help:
1) How to get Device Descriptor, Configuration Descriptor, Interface Descriptor from Host PC?
2) Can we use ReadFile(ReadHandle,InputReport,Capabilities.InputReportByteLength,&NumberOfBytesRead,(LPOVERLAPPED) &HIDOverlapped); to get Device Descriptor, Configuration Descriptor, Interface Descriptor from Host PC?
THANKS for your help and supports!
-
See the USBView source code:
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/usbview
-
Hello Jan,
Thanks for your help!
I have the following questions to request your help.
1) What is the difference between Input Report and Input Feature Report?
2) I am working on Joystick . Can the all data of Joystick be read by
ReadFile(ReadHandle,InputReport,Capabilities.InputReportByteLength,&NumberOfBytesRead,(LPOVERLAPPED) &HIDOverlapped); ?
THANKS for your support!
-
Input reports can use interrupt or control transfers. Feature reports only use control transfers.
A joystick filter driver on the host might capture the Input report data and prevent reading it using Readfile. I'm not sure offhand.
-
Hello Jan,
Thanks for your help!
1) How to get the Joystick Data on Host PC for calibrating the system?
2) May we use DirectX Input to read Joystick data?
THANKS for your support.
-
Hello Jan,
Thanks for your help!
1) How to get the USB Joystick Data from Host PC ?
2) May we use DirectX Input to get the USB Joystick data?
THANKS for your support.
-
This might help
https://stackoverflow.com/questions/41077324/how-do-i-access-the-joystick-on-windows-in-a-non-deprecated-way
-
Hello Jan,
Thank you very much for your link info.
OK! XInput and DirectInput can be used to get data from Joystick.
Is it possible to use Windows USB Host API to get the data from Joystick?
THANKS for your supports!
-
A joystick filter driver on the host might capture the Input report data and prevent reading it using Readfile. I'm not sure offhand.
-
You can get data in way you want.
If you set up a joystick as a HID or Xinput, its available in DX or SDL. You can also get the raw data from the USB report itself. You can even set up a control transfer to read and write to a device and get it that way. All all depends on that Implementation you use PC side. DX for HIS, newer DX for xinput, HIDAPI for control transfers, and WINUSB for raw read. We'd need more info about how you are attempting to read the device.
-
Many THANKS ulao for your help and Info!
Best Regards!