title: Opening /dev/ttyUSB0 returns "Bad file descriptor"
body: <p>I've been working for quite while on little project of mine with some XBee's. Until now all the code has been tested and working on a UBUNTU-SERVER 10.04 LTS, making use of the <em>libftdi</em> libraries for serial-usb simulation/conversion.</p>
  
  <p>At the beginning of this week, I've tried to use the exact same code on a laptop with kubuntu 12.04 make using of the same library versions of <em>libftdi</em>.</p>
  
  <p>The thing is that, in my Satellite L755 - 18K laptop, every time I now try to open my XBee device at <em>/dev/ttyUSB0</em>, it gives me "Bad file descriptor". From the log messages from <em>dmesg</em>, the device registers quite normally and can't seem to put my finger one it.</p>
  
  <p>Here it is the part of code used to open the device:</p>
  
  <pre><code>cfmakeraw(&amp;tio);
  cfsetospeed(&amp;tio,B9600);            // 9600 baud
  cfsetispeed(&amp;tio,B9600);            // 9600 baud
  tio.c_cc[VMIN]=0;
  tio.c_cc[VTIME]=10;
  
  serial_fd=open("/dev/ttyUSB0", O_RDWR);
  
  tcsetattr(serial_fd,TCSANOW,&amp;tio);
  
  
  if (serial_fd &lt; 0){
  
      cout &lt;&lt; "Error while opening device... " &lt;&lt; "errno = " &lt;&lt; errno &lt;&lt; endl;
  
      printf("Something went wrong with open()! %s\n", strerror(errno));
      exit(1);
  }
  </code></pre>
  
  <p>Any thoughts on the subject would be greatly appreciated.</p>
  
  <p>Regards</p>