安卓jni中接收串口为什么有时候接收不到?

是不是终端函数只写了这些的原因。
tcgetattr(fd_tty,&uart_cfg_opt);
cfsetospeed(&uart_cfg_opt,B921600);
cfsetispeed(&uart_cfg_opt,B921600);
tcsetattr(fd_tty,TCSANOW,&uart_cfg_opt);

uart_cfg_opt.c_cflag |= CS8;
uart_cfg_opt.c_iflag &= ~INPCK;
uart_cfg_opt.c_cflag &= ~CSTOPB;

http://blog.csdn.net/tianruxishui/article/details/37592903