How to set a custom baud rate on Linux?
I want to communicate over my serial port on Linux to a device with a non-standard-baud rate that is not defined in termios.h . I tried the "baud rate aliasing"-method from this post , but when I execute my C-program (I’ve named it "testprogram"), Linux says "testprogram sets custom speed on ttyS0. This is deprecated." I did some search on Google, and it seems that there is another (newer?) method to change the baud rate to a non-standard-value: On http://sourceware.org/ml/libc-help/2009-06/msg00016.html the author says that the c_flag of struct termios must be OR’d with BOTHER (=CBAUDEX | B0)