title: Connect to EPSON ePOS t88V printer from .NET UWP
body: <p>I am trying to connect to an EPSON ePOS t88V printer from my .NET UWP application, using the drivers and SDK found here: <a href="https://download.epson-biz.com/modules/pos/index.php?page=prod&amp;pcat=3&amp;pid=36" rel="nofollow noreferrer">https://download.epson-biz.com/modules/pos/index.php?page=prod&amp;pcat=3&amp;pid=36</a></p>
  
  <p>I have deployed the official UWP sample app (<a href="https://download.epson-biz.com/modules/pos/index.php?page=single_soft&amp;cid=5592&amp;pcat=3&amp;pid=36" rel="nofollow noreferrer">https://download.epson-biz.com/modules/pos/index.php?page=single_soft&amp;cid=5592&amp;pcat=3&amp;pid=36</a>) to the POS, but the application wasn't able to discover the printer. </p>
  
  <p>Then, I tried to build a minimal app, following the code snippets from the user manual: </p>
  
  <pre><code>using System;
  ...
  using Epson.Epos.Epos2;
  using Epson.Epos.Epos2.Printer;
  
  namespace PrinterTest1
  {
      /// &lt;summary&gt;
      /// An empty page that can be used on its own or navigated to within a Frame.
      /// &lt;/summary&gt;
      public sealed partial class MainPage : Page
      {
          Printer printer = null;
          PrinterStatusInfo status = null;
  
          public MainPage()
          {
              InitializeComponent();
          }
  
          private async void Button_Click(object sender, RoutedEventArgs e)
          {
              try
              {
                  printer = new Printer(Series.TM_T88, ModelLang.Ank);
                  printer.Received += Printer_Received;
                  printer.AddText("Deeeeerp.");
                  await printer.ConnectAsync("TCP:10.10.10.133", Printer.PARAM_DEFAULT); //this line throws an exception
                  await printer.BeginTransactionAsync();
                  await printer.SendDataAsync(Printer.PARAM_DEFAULT);
              }
              catch (Exception ex)
              {
  
              }
          }
  
          private void Printer_Received(Printer sender, ReceivedEventArgs args)
          {
              DoStuff();
          }
  
          private async void DoStuff()
          {
              try
              {
                  status = printer.GetStatusAsync().GetResults();
                  if (status.Connection == Connection.True &amp;&amp; status.Online == Online.True)
                  {
                      await printer.SendDataAsync(Printer.PARAM_DEFAULT);
                  }
              }
              catch (Exception ex)
              {
  
              }
          }
      }
  }
  </code></pre>
  
  <p>but I am still not being able to connect to the printer. I am getting this exception:</p>
  
  <blockquote>
    <p>{System.Exception: Exception from HRESULT: 0xA0048201    at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)    at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)    at System.Runtime.CompilerServices.TaskAwaiter.GetResult()<br>
    at PrinterTest1.MainPage.d__3.MoveNext()}</p>
  </blockquote>