title: VB.NET: Can you change the .BaudRate property of a System.IO.Ports.SerialPort while it's already connected?
body: <p>For whatever odd reason, we have a legacy data recorder device that runs at 9600 baud. Except when it needs to transfer its recorded data to a PC, in which case it switches to 57600 baud. </p>
  
  <p>The old VB6 code worked, although it had its own set of problems of course.</p>
  
  <p>The routine is this:
  Do several COMMAND/RESPONSE routines to populate a list of available records, listed by timestamp, at 9600 baud. Once a timestamp or several are selected, display a file save dialog. At the moment that dialog is closed, send a command to the device to tell it "hey we're going to warp", sleep for 100ms, then set the baud rate property of the persistent COM1 connection to 57600, before beginning to process XMODEM data and do the progress bar dance.</p>
  
  <p>The problem I'm having is that it doesn't appear that the data received is ever really kosher as far as the byte marshaling is concerned. Which makes me wonder just how well SerialPort is at dynamically changing bauds on the fly.  The VB6 version used MSComm.</p>
  
  <p>I've even attempted to just use MSComm through the compatibility layer but "CTL_E is not supported" which makes it sound like it's incapable of doing XMODEM. (?)</p>