WBF driver for USB isochronous device

We have an USB device which sends data using isochronous endpoint and our customer would like to have WBF (Windows Biometric Framework) driver for it. I have written several WBF drivers using UMDF 1 and 2 but has no experience with isochronous USB devices and AFAIK UMDF doesn’t support it. Our WBF driver has to be UMDF as we use a big library for image processing which can’t be run in kernel.

So I wonder how to perform this task. It seems WinUsb supports isochronous endpoints since Win 8.1 version and WinUsb was originally used as I/O target for UMDF drivers. However, I don’t see necessary UMDF function to utilize this functionality. Am I missing something?

As the next possibility docs state “UMDF with a custom KMDF filter on WinUsb or custom KMDF I/O target”. Here I’m surely missing something because I don’t quite understand why there should be KMDF filter on WinUsb. Can somebody elaborate? Seems I forgot a lot of things and need to refresh…

Ideas welcome. TIA

Nobody? OK, something simpler. Is it possible install WinUsb driver for an USB device and layer UMDF driver over it so it can call WinUSB APIs via IOCTLs? I guess it is but how exactly? Is there any similar sample available?

UMDF 2 is very similar to KMDF. You might as well just do your own KMDF driver to handle the USB instead of using WinUSB.

I can’t. The driver has to use a big user mode library for image processing which can’t be ported to kernel. WBF driver has to process sensor output itself as its main interface IOCTL returns images. The processing is non-trivial and usually needs a lot of heap and stack.

I don’t resist on using WinUsb but currently it seems as the best option because it seems to do everything I need.

OK, thinking about it… Can I in an UMDF 2 driver EvtDevicePrepareHardware() callback just open WinUsb device and make all necessary preparation using WinUsb API? I mean instead of WdfUsbTargetDeviceCreate() and all other stuff.

The other part is installation. I guess WinUsb could be installed as LowerFilter as it was for UMDF 1 but how to get the right device instance?

Sorry for possibly dumb questions, I’m trying to solve the original problem described in the first post :slight_smile:

Can you do the image processing in a UM service and use an inverted call with KMDF? This is a common pattern when ‘complex’ processing of raw data is required. It performs well in most environments, and it is much easier to debug and maintain a UM service than complex logic embedded in any driver

It is possible but isn’t it exactly what is UMDF driver for and what is basically doing? I see it as unnecessary complication and parallel design to UMDF.

We have a pattern for WBF drivers. I write a skeleton which handles USB communication at lower end and and WBF IOCTLs at upper end and others devs give me a library for data/image processing which I feed with data. In this particular case the only problem is UMDF doesn’t support isochronous endpoints for reasons I don’t understand.

So I’m looking for a way how to avoid this UMDF limitation and direct calls to WinUsb seem like a way. Why to write yet another kernel driver when this one does everything I need (and Microsoft is responsible for possible BSODs? ;-)).

I’m just not sure if it is possible and I expected somebody here knows an answer. Nobody did something like this?

Isochronous is quite rare outside of audio and video, and the standard drivers handle those.

@Tim_Roberts said:
Isochronous is quite rare outside of audio and video, and the standard drivers handle those.

Indeed. I just checked libfprint2 (mainly for Linux) and it does not seem to support isochronous transfer either. It is using libgusb/libusb (user space) as the underlying library for USB finger print sensors.
https://fprint.freedesktop.org/libfprint-dev/libfprint-2-USB-transfer-helpers.html

Sorry but I do not know much about WBF (Windows Biometric Framework). Is it possible to just use WinUSB driver for the device and write everything under user space?

Isochronous is quite rare outside of audio and video, and the standard drivers handle those.

Yes but when they added isochronous support to WinUsb, it could be added to UMDF as well. I looked to WBF sources and it seems it should be possible the same way as other USB APIs.

In our case it is rather old optic sensor which was probably mentioned to use as a camera through UVC protocol but our customer would like to have a WBF driver for it. So I’m looking for a way how to achieve it (if even possible).

Sorry but I do not know much about WBF (Windows Biometric Framework). Is it possible to just use WinUSB driver for the device and write everything under user space?

That’s what I want. The problem is user mode part has to be UMDF driver because it exposes IOCTL interface.

@Michal_Vodicka said:

Sorry but I do not know much about WBF (Windows Biometric Framework). Is it possible to just use WinUSB driver for the device and write everything under user space?

That’s what I want. The problem is user mode part has to be UMDF driver because it exposes IOCTL interface.

I am actually suggesting to use WinUSB API only and not using the WBF (Windows Biometric Framework) at all. But I am not so sure if this is feasible or not.

Unfortunetely not. WBF is the requirement (it has conseqeunces as integration to Windows Hello).

Actually, it is the only requirement here and if it can’t be done, the project won’t start. That’s why I’m asking if it is possible and how :slight_smile: