[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
serial port issue
From: |
wilson k.j |
Subject: |
serial port issue |
Date: |
Sat, 30 Aug 2003 00:23:37 -0700 (PDT) |
Can someone tell the reason why the following code
fails, returning error
Filed to reopen
open(): Resource temporarily unavailable
....
while ( ( fd = open( "/dev/ttyS0", O_RDWR ) ) < 0
)
{
if ( errno != EINTR )
{
printf( "Filed to open\n" );
perror( "open()" );
exit( 1 );
}
}
.....
close( fd );
When I connect two PCs with serial line (rs232,
between /dev/ttyS0 and COM2(Win2k)), and run a java
application that opens a serial port connection at the
other end and just tries to read data from line.
Im using the following gcc version
gcc version 2.96 20000731 (Red Hat Linux 7.0)
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com