Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top