Gaurang-7269 avatar image
0 Votes"
Gaurang-7269 asked Gaurang-7269 commented

C# ClaimedBarcodeScanner events not firing in Windows 10 Build 19043.1645


our company develops Kiosk Applications using Windows 10 IoT Enterprise LTSC.

We are developing a new stack using WinUI3 and Windows App SDK v1.0 for our application. Unfortunately, on our development machines which run Windows 10 Pro Build Version 19043.1645, the DataReceived and other Events are not fired at all! The same application when run on the Windows 10 IoT Enterprise LTSC machines (Build 1809) works flawlessly with the same Barcode Scanner (same configuration as well, in HID POS mode). There seems to be a bug here somewhere and we would like it to be fixed asap. as it affects us drastically.

More Information:

  1. The UWP Barcode Scanner example project (C#) has the same issues as well, so it is not dependent on our code.

  2. The UWP Barcode Scanner example project (C++) works without any issues, so the problem seems to be somewhere in the C# API.

Best Regards,
Gaurang Ingale

HelloGuest Solutions GmbH

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have some questions here. Are you running the UWP sample on a normal windows 10 device or you are running it on a windows 10 IoT device? When you are using the C# sample, does the GetFirstBarcodeScannerAsync method return the correct barcode scanner?

0 Votes 0 ·

The UWP sample was run by me on a normal Windows 10 device (a Thinkpad Laptop). Yes, GetFirstBarcodeScannerAsync returns the correct barcode scanner and the claiming process goes through flawlessly as well. Just that there are no events being fired, like for example, DataReceived.

0 Votes 0 ·

@Gaurang-7269 That's interesting. Do you have other barcode scanner that could used for a test? Is this behavior related to specific barcode scanner?

0 Votes 0 ·
Show more comments

1 Answer

LimitlessTechnology-2700 avatar image
1 Vote"
LimitlessTechnology-2700 answered Gaurang-7269 edited

Hi there,

As it is evident that the code is not firing only on Windows 10 Pro Build Version 19043.1645 it as advised to raise a ticket or submit the feedback to the Windows development team who would review and release subsequent patches to sort this out.

Also check the Event that is raised when the ClaimedBarcodeScanner is closed. When an application is suspended, all ClaimedBarcodeScanner objects are closed. This event can be useful to determine when barcode scanner connections need to be re-established.

Below threads discusses the same issue and you can look into it for some insights.
UWP Barcodescanner DataReceived Event not firing

--If the reply is helpful, please Upvote and Accept it as an answer–

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @LimitlessTechnology-2700,

thanks for your input on this topic. To circumvent this problem altogether, as it was hindering our development progress, I upgraded to Windows 11 Build 22000.613.

Now, I am able to get the events to trigger, but as soon as the application is closed (the app we are developing) and reopened, the same problem as on the previous Build Version occurs again. And this, inspite of resetting all event handlers as well as calling the Dispose method on both the BarcodeScanner and the ClaimedBarcodeScanner objects before the application is closed, to make sure that the device is free to be used by any other currently active or future process. So no, this issue is not Build Version specific.

By the way, on Windows 11 Build 22000.613, I can make the events trigger again after closing and reopening my application by restarting the Windows Device Association Service in services.msc, so the bug could be either in this service or the underlying HID Driver.

0 Votes 0 ·