Detect barcode scanner with PointOfService on Windows 10

0

I would like to use a barcode scanner with Windows 10 (Build 15063) via the Windows.Devices.PointOfService namespace. The scanner is a Datalogic Quickscan QD2430 and I tried with all RS-232 and Keyboard mode.

I used the official sample application https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BarcodeScanner with no luck. It can detect a device but it's definitely the in-built webcam (HP laptop).

I tried to modify the source, the DeviceHelpers's GetFirstDeviceAsync function https://github.com/Microsoft/Windows-universal-samples/blob/master/SharedContent/cs/DeviceHelpers.cs.

The DeviceInformation.FindAllAsync also returns only the camera's info as result.

string selector = BarcodeScanner.GetDeviceSelector(PosConnectionTypes.All);
DeviceInformation.FindAllAsync(selector);

It returns nothing.

DeviceInformation.FindAllAsync(DeviceClass.ImageScanner);

It returns every connected and I think the previously connected but currently offline devices too. I tried to filter the scanner by name. There was a lot filterd result too, but the convertAsync function returned null for all excepts one, it thrown an Exception "A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)".

DeviceInformationCollection infos = await DeviceInformation.FindAllAsync(DeviceClass.All);
foreach(DeviceInformation info in infos)
{
    if (info.Name.ToUpper().Contains("BARCODE"))
    {
        T scanner = await convertAsync(info.Id);
        if (scanner != null)
        {
            return scanner;
        }
    }
}
c#
uwp
barcode-scanner
asked on Stack Overflow Mar 29, 2018 by Dávid Kalmár

1 Answer

0

Datalogic Quickscan QD2430 is not in the list of devices supported by Windows.Devices.PointOfService.

Ask Datalogic to provide a device driver that supports Windows.Devices.PointOfService, or change the scanner to the one described in the supported list.

Alternatively, create your own device driver according to the Point of Service (POS) of Windows Driver Kit.

answered on Stack Overflow Mar 29, 2018 by kunif

User contributions licensed under CC BY-SA 3.0