Re: [Ftdi-usb-sio-devel] Communication problems between Ubuntu Linux and Suunto D6 over FTDI usbser
Brought to you by:
bryder
From: Bill R. <bil...@gm...> - 2010-04-28 20:25:19
|
You could try setting VTIME to 1 for testing purposes. Or even 0. On Thu, Apr 29, 2010 at 3:35 AM, Michael Plante <mic...@gm...>wrote: > Matti Dahlbom wrote: > >> // configure the new port settings for 9600baud, 8N1, raw output > >> termios options = termios(); > >> options.c_cflag = B9600 | CS8 | CLOCAL | CREAD; > >> options.c_iflag = 0; > >> options.c_oflag = 0; > >> options.c_lflag = 0; > >> > >> // 1 second port read timeout > >> options.c_cc[VMIN] = 0; > >> options.c_cc[VTIME] = 10; > >> > >> // register the new port settings > >> tcflush(m_fd, TCIFLUSH); > >> if ( tcsetattr(m_fd, TCSANOW, &options) == -1 ) > > Just a guess, since I don't generally use my ftdi chips this way (but have > used real serial ports this way), but termios has other members. I'm not > entirely sure what the termios() function does (constructor of some sort?), > but you might try a memset(&options, 0, sizeof(options)); before you start > fiddling with them, or, better yet, a tcgetattr() first. I have no idea if > tcflush() can fail, but you might also printf its return value. > > Michael > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Ftdi-usb-sio-devel mailing list > Ftd...@li... > https://lists.sourceforge.net/lists/listinfo/ftdi-usb-sio-devel > |