I use serial cable to connect two QNX computers. I want to set up serial port communication between two machines.
Part of my code is:
struct termios options;
int fd = open("/dev/ser1",O_RDRW | O_NOCTTY);
options.c_cflag |= (CLOCAL | CREAD);
options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag |= CS8;
int len = strlen(data);
char buffer ;
int numbytes_read = read(fd,buffer,1024);
data[numbytes_read] = 0x00;
When I send characters, the other machine can not receive these characters.
Please help me to resolve this problem. I also need some example codes.