title: Semaphore timing out while accessing a serial port?
body: <p>I'm experiencing this problem while opening a serial port in C# (which should be dirt simple; or so I thought).</p>
  
  <p>When I try to open a serial port, I am getting the following exception:</p>
  
  <blockquote>
    <p>The semaphore time-out period has expired.‎  </p>
  </blockquote>
  
  <p>Here is the method that is doing this.</p>
  
  <pre><code>public static void Open_TheActivePortWeWillUse(String Drone_StringNameFromUser)
  {
      var TempSerialPort = new SerialPort (
          Drone_StringNameFromUser, 
          (int) SerialPortParameter.TheSerialPortSpeed);
  
      // Now we have a name that anybody can see and use
      OurSpecificPorts.TheActivePortWeAreUsing = TempSerialPort;      
      // We'll do 8-N-1 since almost the whole planet does that
      OurSpecificPorts.TheActivePortWeAreUsing.DataBits = 8;  
      // We'll do 8-N-1
      OurSpecificPorts.TheActivePortWeAreUsing.Parity = Parity.None;    
      // We'll do 8-N-1
      OurSpecificPorts.TheActivePortWeAreUsing.StopBits = StopBits.One;    
  
      OurSpecificPorts.TheActivePortWeAreUsing.DataReceived +=    
          OurBackGroundSerialPortReceiver;
      // We can now open our active port, which is what this line does
      OurSpecificPorts.TheActivePortWeAreUsing.Open();      
  }
  </code></pre>
  
  <p>The strangest thing for me is that I get this error inconsistently. <em>Half the time it works okay</em>, and the other half, <em>it does not</em>.  </p>
  
  <p>Does anybody see anything obviously wrong with my code?  Am I missing something?  </p>