BarcodeScanner found but not possible to connect with Windows.Devices.PointOfService

1.1k Views Asked by At

I have created a watcher to connect to BarcodeScanner using Windows.Devices.PointOfService

var watcher = DeviceInformation.CreateWatcher(BarcodeScanner.GetDeviceSelector());
var id = "";
watcher.Added += async (sender, information) =>
{
    id = information.Id;
    var barcodeScanner = await BarcodeScanner.FromIdAsync(id);
    ...
}

information parameter contains all data releted to my barcodeScanner, but when i try to get it with FromIdAsync is always null. Those are data contained into information

-       information {Windows.Devices.Enumeration.DeviceInformation} Windows.Devices.Enumeration.DeviceInformation
        EnclosureLocation   null    Windows.Devices.Enumeration.EnclosureLocation
        Id  "\\\\?\\HID#VID_0536&PID_02E1&MI_01#c&d907bf5&0&0000#{c243ffbd-3afc-45e9-b3d3-2ba18bc7ebc5}\\POSBarcodeScanner" string
        IsDefault   false   bool
        IsEnabled   true    bool
        Kind    DeviceInterface Windows.Devices.Enumeration.DeviceInformationKind
        Name    "3800G" string
+       Pairing {Windows.Devices.Enumeration.DeviceInformationPairing}  Windows.Devices.Enumeration.DeviceInformationPairing
+       Properties  {System.__ComObject}    System.Collections.Generic.IReadOnlyDictionary<string, object> {System.__ComObject}
+       Native View 0x1d148140 <Information not available, no symbols loaded for Windows.Devices.Enumeration.dll>   IUnknown *

This device is listed as enabled to be accessed with POS.

Where I'm wrong? I have tried also to create the watcher behind a button click, but nothigs change.

2

There are 2 best solutions below

0
On

@Luigi Saggese,

You must first put this scanner into USB HID Barcode Scanner Mode. Please see Page 1-3 of the Honeywell 3800g Users Guide for the programming code to put the scanner into this mode.

Once the scanner is in this mode, you should see a POS Barcode Scanner node in Windows Device Manager. The specific scanner will show up in Device Manager as POS HID Barcode Scanner since it is using an in-box class driver which supports the USB HID POS Scanner protocol. At this point it should work with your Watcher.

Terry Warwick, Microsoft

2
On

If the model name of the scanner you are using is "3800G" as in the question code, it may not be supported by Windows.Devices.PointOfService.

A list of supported models is below.

Supported Point of Service Peripherals

If you want to use it with Windows.Devices.PointOfService, please change it to the model described in this.


In Addition:

Unified POS standard and Windows® Embedded for Point of Service are OPOS/POS for.NET/JavaPOS API. It is not Windows.Devices.PointOfService API.

That model is not listed on Honeywell's site.

And, sales agencies in Japan may be displayed as sales ended. Probably it is an old model. It is better to switch to a new model.


For example, the USB HID Bar code scanner mode setting is described on page 21 of the detailed manual of 1900 series.

If this mode setting description is not in the 3800G manual, you can not use Windows.Devices.PointOfService API on 3800G.

If you can set it, you will be able to use it if you install a device driver corresponding to this mode.