1

I have to interface my web application (RoR) with a barcode scanner, a Motorola DS3578 scanner, running in batch mode.

The way I see this is that each PC (Windows) connected with such a scanner (with craddle), runs a small program (.Net ?) that grabs the barcodes from the scanner when it's inserted into its craddle, then "dumps" these barcodes into my web application using a webservice I still have to develop.

I'm capable of writing this webservice. I haven't worked with .Net programs interfacing directly with scanners though, so that's why my question: how could I write an easy, short, .Net program doing just the communication between the scanner and the web service, preferably without any user interface. (transparent in the background) Or alternatively, does such a tool exist, ready of the shelve?

asked Apr 25, 2014 at 14:34
4
  • Hi Danny - you should change the tags here. Someone who writes software for Windows desktop will be more suited to help you, but because of tags a lot of RoR / web people will look at this question (like me ;) ) - it's very unlikely to find someone familiar with barcodes scanner hardware / port interface among us. Commented Apr 27, 2014 at 17:24
  • Good remark Krzystof! Commented Apr 27, 2014 at 17:26
  • Interacting with hardware peripherals is mostly out of my realm, so this may not matter, but are you connecting via serial port, keyboard wedge, or USB? Commented May 2, 2014 at 14:08
  • Here's some info that may help to get started if you can't find an off-the-shelf product: How to get the data from a USB port in VB.NET here at SO and Controlling a Barcode Reader with POS for .NET at CodeProject Commented May 2, 2014 at 14:10

2 Answers 2

1
+100

From the documentation, the Motorola scanner SDK seems to be very simple. And the API is available for C#, C++ and Java. A good C# API conforms to some guidelines that make it usable from any .NET language - I didn't check though. With C# it is also quite simple to use web services. I wouldn't bother to search for an off-the-shelf solution when building it yourself is so easy. With the SDK it is possible to listen to events from the scanner, thereby avoiding an additional manual interaction. You can run a .NET program as a Windows service. Samples available from the MSDN.

answered May 2, 2014 at 16:57
Sign up to request clarification or add additional context in comments.

Comments

1

My first idea is to write a simple application that run in background and use a FileSystemWatcher class to start a process (i.e.: send data to your webservice) when a directory (or files in a directory) changes.

I don't think this method will work directly with files on your scanner (user add/modify these files before connect the scanner to cradle, so these changes cannot be "listened" by FileSystemWatcher) but you can create a simple batch file that copy these files in a local folder on user PC.

So the user must execute only 2 steps:

  1. connect barcode scanner to cradle
  2. click on a batch file

Then FileSystemWatcher class and your webservice will complete the job.

answered May 2, 2014 at 14:24

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.