Re: cygwin 1.5.23-2 : I can't use select() with serial device and socket

2007-01-19 Thread Florent Morin
Excuse me, this is my second code : - CODE -- #include #include #include #include #include #include #include #include #include #include #define BUFFER_SIZE 256 #define DEVICE "/dev/tty

Re: cygwin 1.5.23-2 : I can't use select() with serial device and socket

2007-01-19 Thread Florent Morin
CESS; } -------- /CODE -- The second code write on socket, but it says that serial port isn't ready to read. Can someone explain it to me ? Thanks. Florent. 2007/1/18, Florent Morin <[E

Re: cygwin 1.5.23-2 : I can't use select() with serial device and socket

2007-01-18 Thread Florent Morin
I use unix names. I will post an example code tomorrow. 2007/1/18, Brian Dessent <[EMAIL PROTECTED]>: Florent Morin wrote: > I have a problem using cygwin. My program does this : > - It accept a socket connection, > - it listen on it, > - it open serial device read/writ

cygwin 1.5.23-2 : I can't use select() with serial device and socket

2007-01-18 Thread Florent Morin
Hello, I have a problem using cygwin. My program does this : - It accept a socket connection, - it listen on it, - it open serial device read/write (O_RDWR), - it create 2 fd_sets, - listening loop : - adding file descriptors to sets, - call select(), - if something is on serial port, I write

Re: cygwin 1.5.23-2 : CREAD termios option don't work

2007-01-18 Thread Florent Morin
It compiles but it don't work fine. I want it to works with pseudo-terminals. 2007/1/17, Dave Korn <[EMAIL PROTECTED]>: On 17 January 2007 14:38, Florent Morin wrote: > I use select() to read/write socket and read/write serial. But, after > writing the content of socket

Re: cygwin 1.5.23-2 : CREAD termios option don't work

2007-01-17 Thread Florent Morin
} else error("write", 1); } } alarm(ALARM_TIMEOUT); } sleep(1); } close(serial_fd); /CODE - I have tested it on Linux. It works fine. When I send data throw telnet protocol, the d

cygwin 1.5.23-2 : CREAD termios option don't work

2007-01-11 Thread Florent Morin
Hello, I actually develop a program in C for reading and writing data on serial port. It works fine on GNU/Linux. I now test it with cygwin (Windows XP). I begin to set the port options, then I read/write information and restore port settings. I can write on serial port but can't read. For test