On Mon, Mar 28, 2016 at 11:11:26PM +0530, Muni Sekhar wrote: > Hi All, > > > > I would like to know is there any user mode test application source > code(in C language) available to test the serial port in Linux ? > > > > Basically I need to get the following things. > > > > Open the Serial interface (/dev/ttyn) > Set the Baud rate(does it calls tty_operations -> set_termios()?) > Close the Serial interface(/dev/ttyn) > > > > Step1 & Step3 are simple by calling open() & close(), but I don’t know > how to set the baud rate, is there any API for this? > > > > Later I will extend this program to issue various commands over this > serial interface. Have you searched for how to program a serial port on Linux? There is a whole TODO written many years ago that answers these questions for you... good luck! greg k-h -- 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