Is blocking I/O possible with 3-wire RS232?
Is blocking I/O possible with 3-wire RS232?
- Subject: Is blocking I/O possible with 3-wire RS232?
- From: Michael Ellis <email@hidden>
- Date: Tue, 5 Jan 2010 09:49:34 -0500
Hi folks.
I am writing a program that communicates with an 8-bit, 64K computer. The communication protocol is similar enough to RS232 that it is possible to build a cable based on a USB-Serial project board and TTL-level signals. In my case, I have built such a cable, and I am able to use it to communicate with the remote machine successfully.
The problem I am having is in configuring my software to work with other cables that wire the DSR input to an out-of-band signal. That is to say, some people are using cables that have an unrelated signal wired to the DSR input, and this seems to case trouble for my software. From what I can tell, the serial communication driver perceives that the remote device "comes and goes" as the signal level changes on the DSR input.
The documentation for programming serial ports suggests that opening the tty device-file with the FNODELAY argument will cause DSR signal to be disregarded, but doing this requires aggressive polling (in the form of repeated read() calls) that negatively affects the performance of my application. Furthermore, I cannot simply call read(), sleep() for a quantum, and then rely on the serial buffer to catch any data the arrives in the meantime because the remote computer has very tight timing requirements. The remote computer requires that responses to commands arrive within a very narrow time window.
So, my fundamental question is this: "Is there a way to configure a serial port to disregard the DSR input altogether and still have it perform blocking I/O?"
Thanks for your thoughts.
=========================
Michael F. Ellis
President
Ellis Softworks Inc.
----------
Phone: (941) 713-0361
Email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden