0
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.PointOfService;
    using System.Collections;

    namespace ScalePOS
    {
        class ScalePOS
        {





            static void Main(string[] args)
            {

                // Create a new instance of PosExplorer and use it to 
                // collect device information.
                PosExplorer explorer = new PosExplorer();
                DeviceCollection devices = explorer.GetDevices();

                // Search all connected devices for an Scale, print its service object name



                foreach (DeviceInfo device in devices)
                {
                    if (device == null)
                    {
                        Console.WriteLine("device is null");
                    }

                   Console.WriteLine(device.ServiceObjectName);
                   Console.WriteLine(device.Type);
                   Console.WriteLine(device.HardwareId);
                   Console.ReadLine();


                            // It is important that applications close all open

                }
            }  
        }
    }

I am trying to interface with a USB Scale and PosExplorer seems to not pick it up. When I run this code I get a bunch of Microsoft MSR,Scanner,Keylock simulators, but my scale is not picked up. Does anyone here know why not?

Josh Anderson
  • 438
  • 3
  • 7
BurntCandy
  • 55
  • 1
  • 9
  • Based on some [other](http://stackoverflow.com/questions/11411745/pos-explorer-is-not-finding-any-device-connected-to-the-system-in-c-sharp) - [posts](http://stackoverflow.com/questions/3481436/opos-posexplorer-getdevice-returns-null-when-executed-in-windows-service) here it is either hardware or security related. – Mike Perrenoud Feb 21 '14 at 19:07
  • Do you have the OPOS drivers or service objects installed for your scale? – Josh Anderson Feb 21 '14 at 19:10
  • @JAnderson I am not sure? How would I go about doing this? – BurntCandy Feb 21 '14 at 19:15
  • @BurntCandy it depends on your scale, you can try looking on the manufacturers website for any OPOS drivers or service objects. – Josh Anderson Feb 21 '14 at 19:17
  • @JAnderson Got in touch with the manufacturer and they told me that they did not have any OPOS drivers for the scale. Does this mean that it is incompatible with pointOfService? – BurntCandy Feb 24 '14 at 14:20

2 Answers2

1

You can check for installed Service Objects through Visual Studio by opening the Server Explorer (View menu, then Server Explorer).

Once in the Server Explorer (which is presented as a tree), expand the "Servers" node, then your computer name node, then you can check for your particular device in either the "LogicalDevice", "POSDevice" or "ServiceObject" nodes.

I'd start with the "ServiceObject" node first!

Fooksie
  • 480
  • 7
  • 25
1

Figured out what the issue was, I needed an OPOS Driver or a service object associated with the scale. As the manufacturer did not provide one I needed to create my own.

BurntCandy
  • 55
  • 1
  • 9