I am testing the sending and receiving programs with the code as
The main() function is below:
#include \"lib.h\"
int fd;
int initport(int fd) {
s
Either your comment or your code is wrong:
// Set the baud rates to 19200...
cfsetispeed(&options, B9600);
cfsetospeed(&options, B9600);
This says it will be setting the baud rate to 19200, but it really sets it to 9600. Maybe you want this:
// Set the baud rates to 19200...
cfsetispeed(&options, B19200);
cfsetospeed(&options, B19200);