Microsoft Point of Service - PosPrinter.FromIdAsync Returns "A device attached to the system is not functioning"

0

I'm trying to use MS PosPrinter into UWP app, my Epson Tm-T20II printer is installed and can print using Epson oPos setup utility.

Even I installed the full windows driver and it works.

My problem comes when I run this:

DevicePicker devicePicker = new DevicePicker();
devicePicker.Filter.SupportedDeviceSelectors.Add(PosPrinter.GetDeviceSelector());

// Anchor the picker on the Find button.
GeneralTransform ge = FindButton.TransformToVisual(Window.Current.Content as UIElement);
Rect rect = ge.TransformBounds(new Rect(0, 0, FindButton.ActualWidth, FindButton.ActualHeight));

DeviceInformation deviceInfo = await devicePicker.PickSingleDeviceAsync(rect);
rootPage.deviceInfo = deviceInfo;
PosPrinter printer = null;
if (deviceInfo != null)
{
    printer = await PosPrinter.FromIdAsync(deviceInfo.Id);
}

await PosPrinter.FromIdAsync(deviceInfo.Id) always return:

System.Exception: 'A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)'

This is my test from oPos setup.

enter image description here

Some Idea about this problem?

c#
uwp
epson
pos
posprinter
asked on Stack Overflow Oct 28, 2019 by Juan Pablo Gomez • edited Oct 28, 2019 by Juan Pablo Gomez

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0