The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[UWP]LineDisplay Sample app RRS feed

  • Question

  • Trying to use this sample app and assume that the Scenario 1 finds and displays the text presently on the 20x2 CFD.  Is that correct?  Or is there configuration that needs to take place first?

    Hoping someone has used this app and can respond.

    TIA

    Harry


    PS. Is this using the Microsoft Point of Service for .NET v1.14.1 behind the scene or does this replace that with Windows.Devices.PointOfService?
    Wednesday, February 20, 2019 2:12 PM

Answers

  • Harry,

    Yes, that is correct.

    • POS for .NET is .NET Class Library extension for Win32 .NET 4.0 based applications
    • Windows.Devices.PointOfService supports UWP (may be callable from Win32 as well, but this is not fully tested today)

    In addition, it is technically possible to create an application solution that has both UWP and Win32 processes with Desktop Bridge.  This solution is normally used when you are migrating an existing Win32 application to UWP a little at a time.  It can also be used to support point of sale peripherals that are not already supported by the UWP namespace such as a Weight Scale.  Here is a video that provides more context to this:  https://aka.ms/pointofservice.build2017 

    Terry Warwick
    Microsoft

    • Marked as answer by Mimosa Arts Monday, February 25, 2019 6:24 PM
    Saturday, February 23, 2019 3:56 AM
  • As the Pos for .NET app lists and operates with the OPOS service objects for the LineDisplay, then too the UWP sample app should list the HP LM line display as well.  I also do not have that particular line display, but have recently seen other OPOS Pole Displays work.

    1) I have a recent version of Windows 10 working (17763, Version 1809), with an Epson DM-D110 OPOS line display.  What version of Windows 10 are you on?

    2) There is at least one free UWP app in the store which works with Win10 PointOfService compatible peripherals.  If you download BarcodeRW (https://aka.ms/barcoderw) app from the store, it has a small way to check line displays for Win10. Its main purpose is for reading and printing barcode, but the settings has basic diagnostics for all five PointOfService peripherals.  In the App,  Click on its Settings (gear) -> POS Device Setup -> Drop down LineDisplay -> Enable this device.  It should enumerate all connected LineDisplays.  If it too does not show any LineDisplays, then it has the same broken behavior as the sample UWP app.  


    Monday, February 25, 2019 3:56 PM

All replies

  • I've installed the Windows universal samples master LineDisplay sample.  It compiles and starts up.  The app starts up and I see the "1) Selecting a Line Display".  In the window on the right where it asks to "select a Line Display and clear it..."  I see a blank list.  What should I be seeing here? At first I thought it was because there was non CFD on my dev computer.  I deployed the app to a HP Engage One Model 143.  Running the program on this computer I still didn't see anything in the list so basically I'm not understanding how I can communicate with the 20x2 Line Display.

    What should I be seeing and how can I simulate using this control to sample the LineDisplay sample?

    TIA

    Harry

    Wednesday, February 20, 2019 7:16 PM
  • I've installed the Windows universal samples master LineDisplay sample.  It compiles and starts up.  The app starts up and I see the "1) Selecting a Line Display".  In the window on the right where it asks to "select a Line Display and clear it..."  I see a blank list.  What should I be seeing here? At first I thought it was because there was non CFD on my dev computer.  I deployed the app to a HP Engage One Model 143.  Running the program on this computer I still didn't see anything in the list so basically I'm not understanding how I can communicate with the 20x2 Line Display.

    What should I be seeing and how can I simulate using this control to sample the LineDisplay sample?

    TIA

    Harry

    Wednesday, February 20, 2019 7:18 PM
  • Hi,

    I'm sorry to say that currently I don't have a 2x20 line display device to test here. But I'm asking the team to see if other engineers have such devices. There might be some time delay. Thank you for your patience.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 21, 2019 4:40 AM
  • Thank you for the response Roy.  That'll really help.  Just don't know what I should be seeing while running the sample program.  
    Thursday, February 21, 2019 1:21 PM
  • I've now got a line display device at my dev box so now I can debug this sample app.  I have the OPUS driver installed but still not seeing the list of attached devices ie: my usb connected HP LM940 2 line display device.  Is there anyone who wrote this sample that could assist?  I've spent all week trying to verify that UWP sample app works - but it does not.
    Friday, February 22, 2019 5:44 PM
  • Harry,

    Before we can verify the UWP Sample App, you will need to confirm that the OPOS layer is installed correctly and operational from an OPOS based application.  Since you are using the an HP Line Display you should have a sample OPOS application from HP that will interact with the Line Display.  

    If you do not know what is involved in this step then you will need to work with HP to get it working.  Once the Line Display is working with OPOS, then simply close the application that is using OPOS and launch the UWP Sample Application.  We need to make sure that the OPOS application is not running and holding onto a claim for the line display.  At this point, you should be able to enumerate and interact with the HP Line Display.

    Terry Warwick
    Microsoft

    Friday, February 22, 2019 6:52 PM
  • Yes I ran the utility app from HP yesterday and it loads all the possible displays in a listbox and I select the device from that list and I can actively change the text on the CFD.  So yes I'm interacting with the CFD.  When I run the sample app I assume it should load a list of CFD devices in the Scenario_1 list control but it doesn't.  

    Could I be missing some setup step in the Sample app setup.  It compiles without any errors.

    Friday, February 22, 2019 7:27 PM
  • I found this: Does POS for .NET v1.14.1 provide support for Windows Store apps?

    "POS for .NET does not provide any support for the Windows Runtime (WinRT) API. For more details, check POS device support in Universal Windows Platform (UWP),Windows.Devices.PointOfService namespace "

    Does this mean that if it is a UWP app that we need to use this in,  we need to use Windows.Device.PointOfService namespace rather than the POS for .NET?  Can you clarify?

    Friday, February 22, 2019 7:44 PM
  • Harry,

    I am not familiar how the HP utility app interacts with the line display, but we do have a tool that you can use to confirm that the OPOS configuration is configured properly.  At the risk of adding additional confusion there is a sample test app in the POS for .NET SDK that we can use to verify the OPOS configuration.  

    Please follow these instructions step by step

    1. Download POS for .NET 1.14.1 (download link)
    2. Install POS for .NET 1.14.1 Runtime and SDK
    3. Run TestApp.exe from C:\Program Files (x86)\Microsoft Point Of Service\SDK\Samples\Sample Application
    4. Expand the Line Display item in the tree structure on the left edge of TestApp
    5. Select your Line Display from the list (if it does not exist, its OPOS Service Object is not properly installed)
    6. Select Open button
    7. Select Claim button
    8. Place a checkmark in the DeviceEnabled checkbox
    9. Select Display Text button

    If step 5 does not display your Line Display, then you will need to contact HP for configuration assistance.

    If all steps work, then the Line Display should be ready for use by the UWP Sample App which uses Windows.Devices.PointOfService APIs.  POS for .NET was only required to use the TestApp and has no supporting functionality for the UWP implementation.

    If all steps above are successful, and the Line Display is still not working with the UWP Sample App then we need to understand which OPOS Control Objects were installed with the HP Line Display OPOS components.  If you are not using the official OPOS Common Controls, but rather some custom Control Objects they may be incompatible with the UWP implementation.  You must use the official OPOS Common Controls.

    Terry Warwick
    Microsoft

    Saturday, February 23, 2019 3:29 AM
  • Harry,

    Yes, that is correct.

    • POS for .NET is .NET Class Library extension for Win32 .NET 4.0 based applications
    • Windows.Devices.PointOfService supports UWP (may be callable from Win32 as well, but this is not fully tested today)

    In addition, it is technically possible to create an application solution that has both UWP and Win32 processes with Desktop Bridge.  This solution is normally used when you are migrating an existing Win32 application to UWP a little at a time.  It can also be used to support point of sale peripherals that are not already supported by the UWP namespace such as a Weight Scale.  Here is a video that provides more context to this:  https://aka.ms/pointofservice.build2017 

    Terry Warwick
    Microsoft

    • Marked as answer by Mimosa Arts Monday, February 25, 2019 6:24 PM
    Saturday, February 23, 2019 3:56 AM
  • The TestApp.exe worked great.  I followed the steps you outlined and was able to display the "0123456789" string on my attached USB LineDisplay.  

    So this works but not in the UWL LineDisplay Sample. 

    If you could help me figure out what Control Objects I need to make the LineDisplay UWP app work or is there another simpler UWP app I could try.  Again, It would help me if I knew what to expect from the UWP Sample app.  I'm assuming it's not working because I'm not seeing a list of the available Line Display devices when the app loads with Scenario 1. 

    Please advise on the next step with this. 

    Thanks you!!

    Harry

    Monday, February 25, 2019 2:15 PM
  • The properties from the Microsoft POS Tester show that the ServiceObjectDescription is 

    "LineDisplay OPOS SO version 6.0.5.5 [2017.07.11 by LABAU,Vincent]"

    ServiceObjectVersion is 1.103.0

    Monday, February 25, 2019 2:49 PM
  • Harry,

    What version of Windows 10 are you running?  Here are two different methods to check:

    1. Click on Start and type WinVer then press enter.
      Minimum: Version 1709 (OS Build 16299.****)
      Preferred: Version 1809 (OS Build 17736.****).
    2. Open a command prompt and type VER
      Minimum: Version 10.0.16299.**** 
      Preferred: Version 10.0.17736.**** 

    Terry Warwick
    Microsoft

    Monday, February 25, 2019 3:40 PM
  • As the Pos for .NET app lists and operates with the OPOS service objects for the LineDisplay, then too the UWP sample app should list the HP LM line display as well.  I also do not have that particular line display, but have recently seen other OPOS Pole Displays work.

    1) I have a recent version of Windows 10 working (17763, Version 1809), with an Epson DM-D110 OPOS line display.  What version of Windows 10 are you on?

    2) There is at least one free UWP app in the store which works with Win10 PointOfService compatible peripherals.  If you download BarcodeRW (https://aka.ms/barcoderw) app from the store, it has a small way to check line displays for Win10. Its main purpose is for reading and printing barcode, but the settings has basic diagnostics for all five PointOfService peripherals.  In the App,  Click on its Settings (gear) -> POS Device Setup -> Drop down LineDisplay -> Enable this device.  It should enumerate all connected LineDisplays.  If it too does not show any LineDisplays, then it has the same broken behavior as the sample UWP app.  


    Monday, February 25, 2019 3:56 PM
  • Terry,

    Microsoft Windows 

    Version 1809 (OS Build 17763.316)

    Harry

    Monday, February 25, 2019 4:10 PM
  • 1. Version 1809 (OS Build 17763.316)

    2.I'll try it and let you know.

    Monday, February 25, 2019 4:13 PM
  • Terry,

    Is there a LineDisplay sample app like the MS POS for .NET app TestApp that I could see the project and code for?

    POS for .NET is .NET Class Library extension for Win32 .NET 4.0 based applications.  My boss is now asking me to initiate communication from a service using regular Windows service in .NET rather than UWP.

    Or is the TestApp solution code available to look at?

    TIA

    Harry

    Monday, February 25, 2019 4:19 PM
  • Harry,

    Your version of Windows is good.  Now lets verify the version of the OPOS Common Controls that you have installed.  

    1. In File Manager, navigate to C:\Program Files(x86)\OPOS\CommonCO
    2. Locate OPOSLineDisplay.ocx, right click on it and choose Properties
    3. Select the Details tab

    I would expect to see the following:

    File Description: OPOS LineDisplay Control
    Type: ActiveX control
    File Version: 1.14.1.0
    Product name: OPOS Common Controls (CRM/MCS)
    Product version: 1.14.001.0
    Copyright: Copyright 2015: MCS; Dayton OH, USA. ...
    Size: 142 KB

    Terry Warwick
    Microsoft

    Monday, February 25, 2019 4:33 PM
  • Harry, 

    The closest to the POS for .NET TestAPP for UWP is the sample app on GitHub.

    The source code for the POS for .NET TestApp is in the SOURCE folder located in the same location as the EXE.

    Terry Warwick
    Microsoft 

    Monday, February 25, 2019 4:35 PM
  • This barcode app worked perfectly and showed the list of line displays.
    Monday, February 25, 2019 4:42 PM
  • Harry,

    I just rebuilt my LineDisplay Sample and using an HP Line Display.  The watcher appears to be taking about 45 seconds to return a list of devices when Bluetooth is ON.  If I turn Bluetoooth OFF then the list of devices is returned almost immediately. 

    By any chance is this what you are experiencing as well?

    Terry Warwick
    Microsoft

    Monday, February 25, 2019 4:54 PM
  • Ah, perfect.  Knowing that Barcode_RW works is good news since it is based off of the latest Microsoft Universal Samples.  This gives us confidence you are pretty close, and likely only have a minor issue with enumeration.  Your OPOS setup is just fine.

    UWP apps are pretty straightforward, especially with Win10 compatible peripherals which you certainly have.   Guessing a little, but it sounds as if you might have an older sample which did not yet have device watchers, which are more performant for devices enumerating (plugging in and un-plugging responsiveness).

    * The latest, MSFT watcher based samples, are dated February 2019, for the Windows 10 Version 1809.  That LineDisplay sample uses a device watcher, works fine, and is the way that Barcode_RW enumerates devices.

    * The latest Microsoft GitHub sample (1809 version) should be all you need.  But, if you're looking for enumerating more than the line display, or need to see another way to use device watchers, feel free to reference a simple sample I've shown others.  https://github.com/tommykdev/PointOfService/tree/master/MinPosPicker



    Monday, February 25, 2019 5:19 PM
  • In UWP, for a simple way to enumerate and have users select PointOfService devices, while you are getting started, you can use a DevicePicker dialog.

    In the 1809 MSFT UWP Samples, search for apps that use Windows.Devices.Enumeration.DevicePicker.  For example, the PosPrinter C# sample uses a DevicePicker in Scenario1 for finding and claiming a device.  It's only a few lines, and may be all you need if your app just needs to pick one, and not worry about being notified for plugging/un-plugging during the life of the app.  However, as your app capabilities grow, you can come back to using a watcher for production-ready device handling.
    Monday, February 25, 2019 5:43 PM
  • I found the Source for the TestApp - this ought to be what I need for now.  Since my boss now want's a non-UWP service to access the POS for .NET.

    Monday, February 25, 2019 6:26 PM