Hi!
I am quite new to the SUN Solaris environment and I am having some
problem writing a C++ program to read and write to the SUN SPARC20 serial
port (port a). Below is the "simple" test program that I used :
main()
{ char buffer[80];
int fd, n;
if ((fd=open("/dev/cua/a","O_RDWR))<0)
printf("\n Can't open port");
ioctl(fd,I_FLUSH, FLUSHW);
n=read(FD,buffer,sizeof(buffer));
ioctl(fd,I_FLUSH,FLUSHW);
write(fd,buffer,n);
close(fd);
}
The device that I want to communicated with is a PC-based device.
I am not getting any response. :(
Can some one help?
Many Thanks.
Ling