title: Cannot set baud rate on USB serial port for Ubuntu 12.04
body: <p>I just upgraded from Ubuntu 10.04 on a project that connects an embedded device through a <a href="http://en.wikipedia.org/wiki/USB" rel="nofollow">USB</a> serial port at 115,200 baud. After upgrading this, it did not work, but I rebooted and was able to connect. Since shutting down and restarting my system I have not been able to connect. The serial line looks like it is connected at the wrong baud rate (fast string of characters like looking like:</p>
  
  <pre><code>"'''''''''''''''''ppppp'''''''''''''''pppppp'''''''''''"...
  </code></pre>
  
  <p>The USB device is being recognized and set up as <code>/dev/ttyUSB0</code>. When I try setting the baud rate with <code>stty</code> I get:</p>
  
  <pre><code>$ sudo stty -F /dev/ttyUSB0 115200
  stty: /dev/ttyUSB0: unable to perform all requested operations
  </code></pre>
  
  <p>If I try setting to <code>9600</code> it seems to work:</p>
  
  <pre><code>$ sudo stty -F /dev/ttyUSB0 9600
  </code></pre>
  
  <p>But anything else fails:</p>
  
  <pre><code>$ sudo stty -F /dev/ttyUSB0 4800
  stty: /dev/ttyUSB0: unable to perform all requested operations
  </code></pre>
  
  <p>Here is what stty sees:</p>
  
  <pre><code>$ stty -F /dev/ttyUSB0
  speed 9600 baud; line = 0;
  min = 1; time = 0;
  -brkint -icrnl -imaxbel
  -opost -onlcr
  -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
  </code></pre>
  
  <p>I can change other values using stty (echo, echoe, etc.), but not the baud rate.</p>
  
  <p>I saw a comment online that someone could set baud with <a href="https://en.wikipedia.org/wiki/Minicom" rel="nofollow">Minicom</a>, but not from the command line, so I got Minicom and tried it, but I get the same result (what appears to be the wrong baud rate).</p>
  
  <p>I also tried setserial, but that also refuses to accept the <code>/dev/ttyUSB</code> devices:</p>
  
  <pre><code>$ sudo setserial  /dev/ttyUSB0 -a
  Cannot get serial info: Invalid argument
  $ sudo setserial  /dev/ttyS0 -a
  /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
      Baud_base: 115200, close_delay: 50, divisor: 0
      closing_wait: 3000
      Flags: spd_normal skip_test
  </code></pre>
  
  <p>Finally, here are the devices, and their setup from dmesg:</p>
  
  <pre><code>$ ls -l /dev/ttyUSB*
  crw-rw-rw- 1 root dialout 188, 0 Nov 19 15:53 /dev/ttyUSB0
  crw-rw-rw- 1 root dialout 188, 1 Nov 19 16:00 /dev/ttyUSB1
  $ dmesg | grep ttyUSB
  [   32.444445] usb 4-1: generic converter now attached to ttyUSB0
  [   32.444549] usb 8-2: generic converter now attached to ttyUSB1
  </code></pre>
  
  <p>I had been working with this device under Ubuntu 10.04 for a few months and was able to use them last week, but since shutting down and rebooting I have not been able to. I've looked online and found a few people with a similar problem, but none with solutions. How can I fix this problem?</p>