On Tue, Mar 29, 2016 at 4:36 AM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > 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 Thanks Greg, I found the useful information in the below mentioned link. http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/index.html -- Thanks, Sekhar -- 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