Hi,
I'm using the stm32f746g-discovery board with the Keil USB HID example. I can connect to the USB HID device with a UWP app using the HidDevice class.Is it also possible to use the UsbDevice class to connect to the board when using the Keil USB HID example? I want to try to use interruptOut to connect to the board and this is only possible with the UsbDevice class.
The UWP app I made with the UsbDevice class does not seem to connect to the USB of the discovery board (no problem with the HidDevice class UWP app).
Am I trying something that is impossible or am I doing something wrong with the connection?
I'm using the example code from Microsoft to connect:
private async void OpenDevice() { UInt32 vid = 0x045E; UInt32 pid = 0x0611; string aqs = UsbDevice.GetDeviceSelector(vid, pid); var myDevices = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(aqs); try { usbDevice = await UsbDevice.FromIdAsync(myDevices[0].Id); } catch (Exception exception) { ShowStatus(exception.Message.ToString()); } finally { ShowStatus("Opened device for communication."); } }
With the correct vid & pid (works with HidDevice class).
I'm new to USB implementation and trying to learn.
thx
There is an example application named HIDClient for MS Windows which can be used to test USB HID device.If you have Keil MDK then the source code (and executable) is located in the Keil MDK installation in the \ARM\Utilities\HID_Client folder.
Thanks, but the connection with the HidDevice class in c# is no problem.
I want to use the UsbDevice class in c# to connect to the USB of the nucleo board (with the board configurated as a HID device). My question is wether this is possible.
I got the answer somewhere else, apparently it is not possible to connect to a HID device as a USB device with the UsbDevice class.