title: Specifying non-standard baud rate for FTDI virtual serial port under Linux
body: <p>I have a USB device I'm trying to communicate with over a virtual serial port provided by the ftdi_sio kernel module. However, I'm having some trouble setting the baud rate of the port to 14400:</p>
  
  <ul>
  <li><code>termios.h</code> doesn't specify a constant for 14400, so I can't use <code>cfsetispeed</code> and <code>cfsetospeed</code>.</li>
  <li>In the source for the ftdi_sio kernel module, baud base is set to 24000000 and there doesn't seem to be a way to change it. This means I can't use a custom divisor with the <code>TIOCSSERIAL</code> ioctl and get a 14400 baud rate that way.</li>
  <li>The module source has a comment making it sound like setting the <code>alt_speed</code> member of the <code>tty_struct</code> structure for the port to 14400 would do what I want, but there doesn't seem to be any way to set it to 14400 given the existing interfaces.</li>
  </ul>
  
  <p>Does anyone have any ideas about this? It'd be pretty easy to fix this by hacking up the kernel module, but I'm really looking for a solution that doesn't require kernel changes.</p>