| PLEX86 | ||
|
another serial port questionPlease do *not* multipost your articles. Crosspost, so that everyone in all of the groups you post to can see the same set of response and can engage in the one discussion. There are two possibilities for you conversion from 0x0D (CR) to 0x0A (LF) One is OPOST and OCRNL on the sending machine, the other is ICRNL on the receiving machine. Don't do it. You *cannot* loop two serial cards to each other and expect to write programs that then work correctly when used on two separate machines! Spend a few bucks (on gas perhaps) and find a cheap (free perhaps) second machine to use as the "distant" computer. The problem is that on one machine certain actions are necessarily synchronous, and on two machines they will be asynchronous. If you develop on a machine where X *must* happen before Y can start, you can rest buttured that on two machines Y will start (and maybe even finish) *before* X starts. Then you get to rewrite your *entire* read-write module... and everything based on it. At this point you have no idea what the termios settings are. But all you are doing is setting or clearing specific flags, while leaving others as they were. They might be different every time you invoke this program. * this is not POSIX compliant, but does work *memset(&options, 0, sizeof options); * set everything to 0 * You are setting CLOCAL here, but down a bit you set CRTSCTS. If you want hardware flow control to work, do *not* turn off the modem control lines! Need OCR recommendation the Black Sun and said: Yep. Note that this holds true even if you get a really, really good scan, and you use a really accurate commercial OCR engine. Er, no. If... Replace all of the above with one statement per structure member for every member that should be non-zero. options.ccflag = CS8 CREAD IGNBRK CRTSCTS; options.ciflag = IGNBRK IGNPAR; options.cccVMIN = 0; * use timer as character timer * options.cccVTIME = 1; * set character timer to 1-10 second * Alternately you can (ber very precisely POSIXly correct) and not clear the entire stucture, but instead explicitly set each member to 0. reading mouse coordinates 1503 On Fri, 12 May 2006 13:36:45 -0400, Gerald Pollack staggered into the Black Sun and said: So... options.ccflag = CS8 CREAD IGNBRK CRTSCTS; options.ciflag = IGNBRK IGNPAR; options.coflag = 0; options.clflag = 0; options.cccVMIN = 0; * use timer as character timer * options.cccVTIME = 1; * set character timer to 1-10 second * reading mouse coordinates 1502 On Fri, 12 May 2006 11:15:19 -0400, Gerald Pollack staggered into the Black Sun and said: IIRC, the kernel mouse modules return no data until-unless there's... #ifdef linux * for linux only * options.cline = NTTY; * set line discipline * #endif --
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||