Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to make my Linux box to talk to a DCE via RS232. It is required that the the RTS line on the DTE side be set to -12 VDC and the DTR be +12 VDC. Is there a command in Linux to do this? Thank you.
In all the time I worked with rs232c connections (modems, terminals, printers and device to device) I never had to specify voltage.
On a quick check of the standard I suspect you are misreading. I think it is just telling you it uses that voltage - not that you need to configure it.
FYI: If you're doing a modem this matters but for most other connections if you can use software flow control (XON/XOFF) you can just jumper. For most connections other than modems on a DB25 D shell connector I'd jumper pin 4 to 5 and then jumper 20, 6 and 8 to each other for software flow control. (The 20, 6 and 8 usually were really only necessary for serial printers.) By doing such jumpering it forces the device to answer itself on any extraneous sends. Bascially one only needs pins 2 (TX), 3 (RX) and 7 (Ground) for software flow control. DTE to DTE you send 2 on one side to 3 on the other (and vice versa) and on DTE to DCE you just send them straight across. Pin 7 would always be straight across. These rules came from DB25 but apply to RJ45 (of course there is no 20 on RJ45 though). For a DB9 you'd have to look up the specifics of which pin is which.
Last edited by MensaWater; 02-14-2006 at 09:49 AM.
In all the time I worked with rs232c connections (modems, terminals, printers and device to device) I never had to specify voltage.
Thanks jlightner. Actually I realized the way I put this was a little confusing. What I wanted to find out was how to toggel the RTS and DTR lines of the COM port in Linux.
The DCE I'm working on is a little tricky. You have to set the DTR high AND RTS low to establish a communiction. I have done this successfully on a WindowsXP machine and just need to fighure out how to do the same thing under Linux.
Haven't done that. Usually I've just enabled or disabled various parameters (e.g. "stty -crtscts" to disable CTS/RTS handshaking).
You might have a look at the "stty" command to see if it helps with what you want to do. (Type "man stty" or "info stty" to see documentation about it.) This is the command that does serial line conditioning in Linux.
I would just strap them to something thats already high/low in the cable. If the DCE is giving out DSR+ then strap DSR to DTR on the DCE. If the DCE is giving DCD- then use DCD to strap RTS low. That way it doesn't matter what OS you use it'll work. A break-out-box is always handy for figuring out what to use to. Five minutes with a soldering iron will sort you out.
I would just strap them to something thats already high/low in the cable. If the DCE is giving out DSR+ then strap DSR to DTR on the DCE. If the DCE is giving DCD- then use DCD to strap RTS low. That way it doesn't matter what OS you use it'll work. A break-out-box is always handy for figuring out what to use to. Five minutes with a soldering iron will sort you out.
I tried to jump some pins on the DCE side , hoping to make the device think it got the high/low staus it wanted. It didn't work and I checked the DCE pin voltages. Turned out they are all zero. Then I realized a partial handshaking cale wouldn't work in this particular case.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.