* serial port issue
@ 2003-08-30 7:23 wilson k.j
0 siblings, 0 replies; 2+ messages in thread
From: wilson k.j @ 2003-08-30 7:23 UTC (permalink / raw)
To: gcc-help, help-gnu-utils; +Cc: wilson
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* serial port issue
@ 2003-08-30 7:28 wilson k.j
0 siblings, 0 replies; 2+ messages in thread
From: wilson k.j @ 2003-08-30 7:28 UTC (permalink / raw)
To: gcc-help, help-gnu-utils, gcc; +Cc: wilson
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-30 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-30 7:23 serial port issue wilson k.j
2003-08-30 7:28 wilson k.j
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).