This content has been marked as final. Show 2 replies
IMHO Solaris not have big difference when forking with serial device.
Genaraly, garbled characters mean that selected speed not correspond to device speed.
What device connected to rs232 port ?
/dev/cua - not loking ports, so can be used at one time by different programs with different settintg.
try use /dev/term/1
It can be hardware problem. Try use tip -57600 /dev/term/1 and check for garbled characters.
Can you clear you recive garbled characters or other side recive from you garbled characters ?
Thanks for your help.
After modify these lines, it has been worked:
#define MODEMDEVICE "/dev/term/1"
newtio.c_cflag = BAUDRATE|CS8|CLOCAL|CREAD;
newtio.c_iflag = IGNPAR;
newtio.c_oflag = 0;
newtio.c_lflag = ICANON;
Modify to below, reference this:
newtio.c_cflag |= CS8;
newtio.c_cflag &= ~PARENB;
newtio.c_cflag &= ~CSTOPB;
newtio.c_cflag &= ~CSIZE;
newtio.c_cflag &= ~CRTSCTS;
newtio.c_cc[VMIN] = 1;
newtio.c_cc[VTIME] = 0;