I am using the following code now, and I am wondering where it is wrong.
struct termios options;
int fd = open("/dev/ttyUSB0", O_RDWR | O_NOCTTY | O_NDELAY);
fcntl(fd, F_SETFL, 0);
tcgetattr(fd, &options);
cfsetispeed(&options, B9600);
tcsetattr(fd, TCSANOW, &options);