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.DeviceEnabled = True << Exception occurred here!!
myScanner.DataEventEnabled = True
myScanner.DecodeData = True
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..
Device Config File I created – see http://msdn2.microsoft.com/en-us/library/bb428988.aspx for definitions.
<ServiceObject Type=”Scanner” Name=”Example Scanner” Override=”yes”>
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:-
- MSDN Channel9 WEPOS Pos for .NET Video: https://channel9.msdn.com/ShowPost.aspx?PostID=170597#170597
- Windows Embedded For Point of Service/POS for .NET – by Sean D. Liming – see http://www.seanliming.com/books.html
- Sean Liming’s web site – particularly http://www.seanliming.com/WEPOS.html
- POS for .NET team Blog http://blogs.msdn.com/pointofservice/
- POS.NET 1.11 SDK is available at http://www.microsoft.com/downloads/details.aspx?FamilyID=8f06b072-06c1-4a4a-a128-83b8a651a25a&DisplayLang=en
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