Send and receive characters thru serial port problem

Hi everyone,
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:
int open_port()
{
struct termios options;
int fd = open("/dev/ser1",O_RDRW | O_NOCTTY);
fcntl(fd,F_SETFL,0);
tcgetattr(fd,&options);
cfsetispeed(&options,B115200);
cfsetospeed(&options,B115200);
options.c_cflag |= (CLOCAL | CREAD);
options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag |= CS8;
tcsetattr(fd,TSCANOW,&options);
return fd;
}
void write_port()
{
char *data;
int len = strlen(data);
write(fd,data,len);
}
void read_port()
{
char buffer [1024];
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.
Thank you!

Try using qtalk first to make sure the issue is not hardware.

Hi Mario,
I used qtalk, steps by steps likes this :

stty < /dev/ser1
stty baud=115200 < /dev/ser1
qtalk -m/dev/ser1

I choose the qcp protocol as default, same configuration on other QNX.
when I send a file, I get error :
-qcp : unable to detect remote qcp.

I don’t know why? Please help me