Does an HID device need libusbx Windows backend driver on Windows 7? - libusb

Current status:
I have developed some USB based device and have developed a driver on Linux using libusb. I am now porting the driver to Windows 7.
Device details
My device is a touch screen with two interfaces, one for the OS to communicate with the touch screen and the other for some vendor communication.
Old Stack Overflow post:
libusb_open returns 'LIBUSB_ERROR_NOT_SUPPORTED' on Windows 7
Here I was stuck with a problem that my libusb_open returned with an error. I learnt that I need Windows backend drivers. But I also learnt that it is for devices which are not recognised by the operating system.
Action taken
I tried installing a driver for my device using the Zadig tool, but I am not able to override the driver used by the OS with the new driver.
Do i really need a libusbx Windows backend driver for a device which has been identified and working well on windows 7? (The touch screen works perfect as a multitouch device)
What is the way forward as the device just can't be opened?

If you really use libusbx then you should be able to at least open the device for sure.
Make sure you did not mess the default HID driver for your device while playing with Zadig tool. Go to Control Panel/Device Manager/Hid section (is your device listed there?), search your device and remove the driver. Then try again.

Related

ESXi 7.0.3 USB Device not show up after setting configuration

In ESXi console I can see my device with lsusb list
And in vm settings I add new USB Device and select my usb from dropdown list, and save settings.
But after that, I could neither see my device in windows server nor in vm configuration!
And when I try to add new device it doesn't show up in dropdown list anymore.
But still can see my device in lsusb list.
This is because the device in question is a USB storage device, specifically a flash drive. A quick Google has this hit: "S102 Pro Advanced USB 3.2 Flash Drive | Buy Now". AFAIK there is no workaround. Gory details follow in the next paragraph. Peruse at your own risk.
In vSphere ESXi 6.5 and earlier releases of ESXi the USB driver stack was a "vmklinux" driver stack with individual drivers for each device type, including USB host controllers. Thus if your installation was on a SCSI disk or PXE booted over the network you didn't need the USB storage driver at all and you could unload it and then pass the device through to a VM. Unloading the driver wasn't offically supported but could be done at the esxcli command line or if you wanted to be really daring you could delete it from your bootbank image. Note that "deleting" was only theoretical as you would really be replacing the driver module with a file of size 0 in the last loaded tar image (the only one that is customer configurable) and could thus be undone, but I digress.
The new USB native driver stack that debuted in vSphere ESXi 6.7 is a monolithic driver which means that it is not possible to unload only the storage driver. You could unload or clobber the entire USB stack but then you'd lose the keyboard and perhaps other things plus the ability to pass any USB device through to a VM. The disadvantages of monolithic USB drivers are well known and are the reason that Linus himself got involved in the redesign of the long gone Linux monolithic USB driver from over a decade ago, but I again digress. As to why VMware "improved" things by replacing a USB stack with half a dozen or more USB drivers with a monolithic stack with all the attendant disadvantages, you'd have to ask them. Feel free to request that they break the driver up into constituent modules as they know how to do this.

How to use a custom USB device (WinUSB) on Microsoft HoloLens 2?

I made a custom USB sensor device that runs on a Windows 8.1 / 10 desktop computer using the WinUSB driver (I implemented Microsoft extended USB descriptors in device firmware to automatically install the driver when the device connected).
Can I use a WinUSB device on HoloLens2? Or, if there is no WinUSB support on HoloLens2, how can I use my USB device with a “custom USB device class”?
At the moment, I do not have a hololens2, but I need to understand how the USB works on it.
Edit: I found this link: https://learn.microsoft.com/en-us/hololens/hololens-connect-devices#hololens-2-connect-usb-c-devices
It says that hololens2 supports the following device classes:
Mass storage devices (such as thumb drives)
Ethernet adapters (including ethernet plus charging)
USB-C-to-3.5mm digital audio adapters
USB-C digital audio headsets (including headset adapters plus charging)
Wired mouse
Wired keyboard
Combination PD hubs (USB A plus PD charging)
My device does not implement any of these classes (custom class). Is there a chance to make it work on hololens2?
I finally tested my code and USB device on real Hololens 2. The USB device works great there because Hololens2 supports WinUSB! The WinUSB driver was installed automatically (my device has WinUSB descriptors).
According to the documentation you referred, all classes HoloLens2 supports have been listed, and unlisted classes are not supported.
Could you provide more information about your business request and submit a feature request via feedback hub on new feature request to be considered in future releases of HoloLens OS and devices?
If it’s a hot impacted feature, it will be possible to be given priority to jump in the development schedule. Actually, the existing classed on HoloLens 2 are also based on user’s feedback in such way.
For how to post feedback request, you can follow this doc: Send feedback to Microsoft with the Feedback Hub app.

on windows 7/8, how to read usb device descriptor from a usb camera, and read picture stream with webcam meanwhile

I use webcam-capture(java api) to get video stream from a usb camera, it work fine.
I want read a usb device descriptor(store some private information), i find out that should install WinUSB or libusbk as a driver to the usb devices. and it test ok, read the descriptor success (by libusb_control_transfer api)
the question is:
befor I install WinUSB, the usb camera is a camera device in the windows device management list. the LibUSB work fail, can't open the usb devices, the error number is -5, means entrypoin not find
after I install WinUSB, libUSB api work ok, but the webcam program can't open the usb devices, it is a universal usb device in the windows device management list.
is there some way the webcam work ok, at the same time, i can read the usb device descriptor use libusb or use other something?
i tested on windows 7 and windows 8, have the same problem.
thanks.
Sadly this is not possible because each of your applications needs a different driver. The only way this can work is if you use libusb and build you own capturing api on top which is quite complicated. As long as webcam-capture can not read the data you want to know about the webcam I am afraid this is not possible.

USB device detection problems: using Compact Flash card reader and QNX (Virtual Machine)

First of all, there's a similar thread on OpenQNX posted years ago but the solutions don't really apply for me.
Having said that, I want to create an OS image of QNX 6.6.0 to put on a Compact Flash card. This card is plugged in an USB adapter which is connected to my host pc. I'm running Neutrino in a VM (VMware/VirtualBox) for which I enabled USB support. Generally, the adapter works fine under Win (current host) and Linux.
The (apparently out-dated) tutorial I was following stated to search for devices named umass* or hd* after connecting the USB adapter. But there aren't any (except for hd0).
See also "ls /dev" screenshot.
The processes devb-umass and io-usb are running. So I expect that the adapter is detected automatically.
Any suggestions what went wrong?
OK, it seems that I had to restart the usb driver 'devb-umass' (several times). When the card reader is already plugged-in during the booting the driver will not detect it autoamtically. Thus one has to unplug and plug it in again after the devb-umass was getting re-started. It also might have been that the Host Controller Driver (HCD) was set to 'ohci' instead of 'ehci'.
Everything is working now as expected.
(Thanks Tim from the OpenQNX forum! ;) )

"Unidentified USB Device" on Win CE 6.0

Quite a while I am struggling with a problem regarding the installation of certain USB device driver in Windows CE 6.0.
The device is some kind of Digital and Analog IO device that connects to the USB port.
It is the LabJack U3.
I followed all instruction and put the driver (labjackusb.dll) and coresponding registry entries into the Windows CE image but the device is not detected correctly.
On every boot up a small Message box came up with the Title "Unidentified USB Device"
and the message "Enter the name of the driver for this USB device:"
Whatever name I put into it want work. I tried the name of the dll. Some title in from the registry and so on but never succedes.
The driver does not work nor the device.
The customer support can not help me so I am asking here somebody to help me at least
with a steps to follow to try to find a solution.
Why the OS does not matches the USB device with the corresponding driver?
I checked everything one million times and everything is in place.
There are a load of reasons this might fail. First:
Is the driver definitely a Windows CE driver?
Is it built for CE 6.0 (not 5.0 or something else)?
Is it built for the same processor architecture you have?
The way to really debug this is to hook up KITL, put in a debug version of device.exe and see what the device managet is actually doing when you plug in the device. A way better and way more reliable mechanism than just trying to guess.