POS for .NET and Symbol LS 2208 Scanners and Possibly Others


Well I cant say life gets boring, I’ve been working on WEPOS and specifically with the Microsoft Point of Service (POS) for .NET v1.11 SDK, which is the .NET implementation of the UPOS (UnifiedPOS ) Retail Specification.  I plugged in my shiny new Symbol LS 2208 Bar Code Scanner, fired up Visual Studio 2008 (Visual Studio 2005 is fine too), typed in the 8 lines of code, yes it really is that simple, plugged in the scanner and then bang, an exception – grrrrr!!


 


Private Sub myExplorer_DeviceAddedEvent(ByVal sender As Object, ByVal e As Microsoft.PointOfService.DeviceChangedEventArgs) Handles myExplorer.DeviceAddedEvent
    If (e.Device.Type = DeviceType.Scanner) Then
        myScanner = myExplorer.CreateInstance(e.Device)
        myScanner.Open()
        myScanner.Claim(1000)
        myScanner.DeviceEnabled = True  << Exception occurred here!!
        myScanner.DataEventEnabled = True
        myScanner.DecodeData = True
    End If
End Sub

Well about a day later and with much searching of the net and internal user groups I found the answer:)


By default the Symbol LS 2008 Scanner is configured as a USB “HID Keyboard Interface”, precisely what you don’t want for POS.NET.  You need to open the manual (yup, the innocuous manual you set aside when eagerly checking out the device), skip to the back section, there you will see a number of device configuration bar codes, I scanned the reset “Set Defaults” code then you must scan the “IBM HAND-HELD USB” code – this will magically turn the device in to a pure “USB HID” device and life will be good again, phew and no exception!!


The device will reconfigure itself in the device manager – from there you’ll need the Hardware ID to create device XML Config file – see below..


 


image


Device Config File I created – see http://msdn2.microsoft.com/en-us/library/bb428988.aspx for definitions.


<PointOfServiceConfig Version=”1.0″>
    <ServiceObject Type=”Scanner” Name=”Example Scanner” Override=”yes”>
        <HardwareId From=”HID\VID_05E0&amp;PID_1300″
        To=”HID\VID_05E0&amp;PID_1300″/>
        <HardwareId From=”HID\VID_05E0&amp;PID_1300&amp;REV_0201″
        To=”HID\VID_05E0&amp;PID_1300&amp;REV_0201″/>
    </ServiceObject>
</PointOfServiceConfig>

 


If you are contemplating building a retail application then do check out POS for .NET, it really does go a long way to simplifying the process and will give you a high degree of retail peripheral independence…


btw, POS .NET was tested on Windows 32bit and 64bit, I’ve got it all running on a Lenovo T61p, 4gig ram, hybrid disk, Windows Vista Ultimate 64bit and Visual Studio 2008 – yup it flies, guess it bloody well should!!


Great references include:-



Cheers and hopefully we’ll see you at the Microsoft Retail Conference next week in Sydney and Melbourne – see http://www.microsoft.com/australia/business/wepos/event/default.mspx


Dave

Comments (0)

Skip to main content