Hi ! I have a problem with reading from a serial port using select() under 2.4.5. What I am doing is basically the following: fd_set readfds; struct timeval timeout; int s; serialfd = open("/dev/ttyS0", O_RDWR ); init_serial(B9600); timeout.tv_sec = 2; /* ! */ timeout.tv_usec = 0; FD_ZERO(&readfds); FD_SET(serialfd,&readfds); s=select(serialfd+1, &readfds, NULL, NULL, &timeout); ... But s is always equal to 0 even when I am sure there are data to read. If I use s=select(serialfd+1, NULL, &writefds, NULL, &timeout); (with the corresponding initialisation of writefds) it returns s=1 and I can write to the serial port. I can see that since the lights of the modem are flashing. I noticed that behavior since I tried to send some "ATZ" with the write-function but I never got the "OK" back. However, the same programme works under 2.2.19. Any help, please ? -- Thomas - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Re: The latest Microsoft FUD. This time fr... Rob Landley
- Re: The latest Microsoft FUD. This tim... Michael Bacarella
- Re: The latest Microsoft FUD. Thi... Alan Cox
- Re: The latest Microsoft FUD.... Rob Landley
- Re: The latest Microsoft FUD.... Kai Henningsen
- Re: The latest Microsoft FUD.... Pavel Machek
- Re: The latest Microsoft FUD. This time from Bill... Paul Flinders
- Re: The latest Microsoft FUD. This time from ... Rik van Riel
- Re: The latest Microsoft FUD. This time f... Alan Cox
- Re: The latest Microsoft FUD. This ti... watermodem
- Re: problem with select() - 2.4.5 Thomas Speck
- Re: problem with select() - 2.4.5 Thomas Speck
- Re: problem with select() - 2.4.5 Edgar Toernig
- Re: The latest Microsoft FUD. This time from BillG, hi... Jesse Pollard
- Re: The latest Microsoft FUD. This time from Bill... Pavel Machek
- Re: The latest Microsoft FUD. This time from ... Lew Wolfgang
- RE: The latest Microsoft FUD. This time f... David Schwartz
- RE: The latest Microsoft FUD. This ti... Lew Wolfgang
- RE: The latest Microsoft FUD. Th... David Schwartz
- Re: The latest Microsoft FUD.... Lionel Elie Mamane
- Re: The latest Microsoft FUD.... Dmitri Pogosyan