On 2011-04-06, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote: >> This raises a question I've been wondering about for some time. While >> the kernel and the serial driver API support arbitrary baud rates, >> termios doesn't AFAICT. >> >> How does one use the standard POSIX serial port API to obtain an >> abritrary baud rate? > > The POSIX API is completely broken in this respect. So the kernel > provides its own interface. > >> The only way I can find to get arbitrary baud rates from a user >> perspective is to use the ASYNC_SPD_xxxx mechanism. > > Which is also not POSIX Right. > Simple example app: > > http://www.kerneltrap.com/mailarchive/linux-usb/2008/10/2/3484644 Brilliant! I've been looking for that (off and on) for months. I knew that the kernel/driver API supported arbitrary baud rates and that termios didn't. So I figured there must be an alternative to SPD_CUST, but hadn't been able to figure out what it was. I had found the BSD IOSSIOSPEED ioctl, but hadn't stumbled across the Linux equivalent. -- Grant Edwards grant.b.edwards Yow! Look DEEP into the at OPENINGS!! Do you see any gmail.com ELVES or EDSELS ... or a HIGHBALL?? ... -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html