Barcode scanner not found with Sample UWP app

妖精的绣舞 提交于 2019-12-08 06:54:45

问题


I have a Honeywell Voyager 9520 (Model - Mk5145-31A38-I) which i am trying to make it work with the Sample UWP. I have tried all the modes in the scanner but nothing works. The app doesnt find the barcode at all. I am on Windows 10 and VS2015 professional. I dont understand what is USB HID mode for this scanner. I am new to barcode scanner stuff. Any pointers in making it work would be highly appreciated.

I have downloaded the drivers from the "Software" tab from this Honeywell link

USBSerial.jpg is when i use USB Serial Emulation. USBKey.jpg is when i use USB Keyboard emulation.

USBKey.jpg VS Code

BarCode Manual

USB Serial


回答1:


This GitHub sample uses the USB POS HID Scanner specification. From Device Manager screen capture it looks like this scanner doesn't support this.

In addition to the devices listed, you can use barcode scanners from various manufacturers that adhere to the USB HID POS Scanner specification.

However the scanner does emulate a USB input device (keyboard), so you could use a normal TextBox to capture the scanner input for example.




回答2:


I ran into the same issue but with a completely different cause. I'm using a webcam for barcode detection, which works quite well. However, after moving code from the sample app to a new project, I couldn't get it to work. The scanner object could not be created.

Turns out that the Package.appxmanifest Visual Studio 2015 UI does not show the necessary capability in the UI. It's simply not listed. I had to show Code for the Package.appxmanifest and then make sure DeviceCapability pointOfService was added, like so:

  <Capabilities>
    <Capability Name="internetClient" />
    <DeviceCapability Name="webcam" />
    <DeviceCapability Name="microphone" />
    <DeviceCapability Name="pointOfService" /> <-- this one
  </Capabilities>

I got here through comparing the differences between the sample and my fresh project setup, and it took me a few hours (:sad face:) so I hope I can save someone else the effort by sharing this here.



来源:https://stackoverflow.com/questions/33074253/barcode-scanner-not-found-with-sample-uwp-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!