title: Motorola MC2180 EMDK - Getting scanned data
body: <p>I've been working on trying to get scanned data from Motorola MC2180. I know this is basic but I am a beginner and never touched a PDA before. I can get it to scan but the result data is still null. I use the following code:</p>
  
  <pre><code>    {
      public Symbol.Barcode.Reader SymbolReader = null;
      public Symbol.Barcode.ReaderData SymbolReaderData = null;
      public static System.EventHandler SymbolEventHandler = null;
  
      /// &lt;summary&gt;
      /// MyReaderData property provides access to the ReaderData 
      /// &lt;/summary&gt;
      public Symbol.Barcode.ReaderData MyReaderData
      {
          get { return SymbolReader.GetNextReaderData(); }
      }
  
      public static System.EventHandler MyEventHandler
      {
          get { return SymbolEventHandler; }
          set { SymbolEventHandler = value; }
      }
  
      public bool InitScanner()
      {
          try
          {
              SymbolReader = new Symbol.Barcode.Reader();
              SymbolReaderData = new Symbol.Barcode.ReaderData(Symbol.Barcode.ReaderDataTypes.Text, Symbol.Barcode.ReaderDataLengths.MaximumLabel);
              SymbolReader.Actions.Enable();
              SymbolReader.Parameters.Feedback.Success.BeepTime = 0;
              SymbolReader.Parameters.Feedback.Success.WaveFile = "\\windows\\alarm3.wav";
          }
  
          catch(Exception ex)
          {
              ex.ToString();
          }
  
          return true;
      }
  
      public void TermReader()
      {
          try
          {
              if (SymbolReader != null)
              {
                  SymbolReader.Actions.Disable();
                  SymbolReader.Actions.Dispose();
                  SymbolReader = null;
              }
          }
          catch (Exception ex)
          {
              ex.ToString();
          }
      }
  
      private bool ReadData()
      {
          {
              try
              {
                  // Submit a read
                  SymbolReader.ReadNotify += SymbolEventHandler;
  
                  // Prevent duplicate reads
                  if (!SymbolReaderData.IsPending)
                  {
                      SymbolReader.Actions.Read(SymbolReaderData);
  
                      return true;
                  }
                  else
                      return false;
              }
              catch (Exception ex)
              {
                  ex.ToString();
                  return false;
              }
          }
      }
  
      public string StopRead()
      {
          if (SymbolReader != null)
          {
              try
              {
                  // Flush (Cancel all pending reads)
                  SymbolReader.ReadNotify -= SymbolEventHandler;
                  SymbolReader.Actions.Flush();
                  return "Closed";
              }
              catch (Exception ex)
              {
                  return ex.ToString();
              }
          }
          else
              return "Already Closed";
      }
  
      public string ToggleTrigger()
      {
          this.InitScanner();
          SymbolReader.Actions.ToggleSoftTrigger();
          this.ReadData();
          return SymbolReaderData.Text;
      }
  }
  </code></pre>
  
  <p>I tried to use the EMDK support site but it keeps locking me out as its on maintenance.</p>
  
  <p>My main issues are:
  1. Getting the data after a scan - I'm not sure how it decodes the barcode data
  2. How do I get the scanner to trigger for longer? because I can Barcode2.Config.TriggerMode allows me to scan for longer than Barcode.Reader.ToggleSoftTrigger();</p>
  
  <p>I might need an explanation as I can't access EMDK guide or documentation doesn't help :(</p>
  
  <p>Thank you in advance! :)</p>