-1

I made a Windows Form Application in order to be able to read barcodes, but when some multiple scanners are connected to the same PC and they scan something in the same time, the output values are mixed.

The idea is that every scanned barcode have to be added in an Excel file, but if the characters are mixed I cannot add the correct values. I use the KeyPress event of the form because it's a Keyboard Wedge Emulator.

The scanner is an LS2208 by Motorola Symbols. I understand that Microsoft Point of Service library won't work with this scanner model. Do you have any idea on this matter?

Community
  • 1
  • 1
  • Why do you have multiple scanners connected to one machine, entering their input as keypresses? – CodeCaster Jan 25 '21 at 11:21
  • @CodeCaster because I didn't knew that they will use multiple scanners .. And now i'm trying to find a solution without KeyPress event – Roli Fanfareţ Jan 25 '21 at 11:25
  • 1
    You cannot use multiple barcode scanners on one machine like that if they register as keyboard devices. That's just like connecting multiple keyboards to a machine and expect multiple people to work with them. Of course the input gets mixed up. – EricSchaefer Jan 25 '21 at 11:32
  • @EricSchaefer yeah but maybe there is an event by a library that would help me to show the data of a particular scanner. – Roli Fanfareţ Jan 25 '21 at 11:48
  • 2
    There is an easy solution: Tell 'them' that this won't work. – TaW Jan 25 '21 at 11:51
  • These articles are likely to be helpful. [How to distinguish between multiple input devices in C#](https://stackoverflow.com/q/587840/9014308), [Using Raw Input from C# to handle multiple keyboards](https://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard) – kunif Jan 25 '21 at 11:54

1 Answers1

0

The LS2208 does not support Windows.Devices.PointOfService, but it does support OPOS.
And the fact that it supports OPOS can also be used with POS for.NET.
If you are developing your application in C# and are looking for a way other than the Keyboard Wedge Emulator, you can use these.

Windows.Devices.PointOfService: LS2208 unsupported
Supported Point of Service Peripherals


This mode is similar to connecting with a serial port.

SYMBOL LS2208 GENERAL PURPOSE BARCODE SCANNER SUPPORT
LS2208 Product Reference Guide (en)
Please refer Page 35 USB Device Type -> OPOS(IBM Hand-held with Full Disable)

OPOS:
OPOS DRIVER
SCANNER SDK FOR WINDOWS

POS for.NET:
POS for .NET v1.14.1 SDK Documentation
Microsoft Point of Service for .NET v1.14.1 (POS for.NET)


Or if you don't want to use the above library, you can connect with a serial port and control it directly.
Please refer Product Reference Guide Page 36 -> USB CDC Host

USB CDC DRIVER FOR WINDOWS

kunif
  • 4,060
  • 2
  • 10
  • 30
  • Thank you! That's everything I needed. One more thing: Could u explain me what's the difference between the USB CDC Host and the Simple COM Port Emulation? – Roli Fanfareţ Jan 27 '21 at 14:49
  • Excuse me. I don't know, so ask the vendor for more details. Perhaps the specifications of the control commands (enable/disable, etc.) are different. – kunif Jan 27 '21 at 14:53
  • I've just found out they bought some new scanners.. CSL Aplic Wireless 2.4ghz . Output modes of the scanners in the manual are: Version,Keyboard Wedge and Serial. There is no POS or OPOS there so I don't think I can use that library. If I use the "serial" mode, should I install the USB CDC Driver or I need another tool ? Thank you ! Here is the manual: https://ftp.csl-computer.com/pub/manuals/Barcode-Scanner/301781-Barcode_Scanner/ – Roli Fanfareţ Jan 27 '21 at 15:04
  • If the vendor does not have OPOS, you will need to get a serial port device driver and control it directly. – kunif Jan 27 '21 at 15:12
  • Controling it directly through the serial port class,right? And by serial port device driver u mean any driver or a special driver for this type of scanner? Sorry but I'm new in this – Roli Fanfareţ Jan 27 '21 at 15:27
  • The serial port device driver is not a special one and has the functions specified in the Win32 API. Microsoft device drivers may be available on recent Windows 10. But you will still need the .INF file for that device. – kunif Jan 27 '21 at 15:40