Re: Serial Port voltage drops with Linux

From: Dan Christian (robodan@netscape.com)
Date: Mon Jan 17 2000 - 14:40:56 EST


Is the device port powered (i.e. no other power input)?

My guess is that you are try to get power from the port hand shake
line. If these lines aren't set appropriately, then you are effectively
drawing power off the transmit line (when it tries to go high). Check
what the level of each line is under Linux and whatever is currently
working.

You can control these lines under Linux (or almost any Unix) using the
ioctl command. I can't find the code that I usually use for this, so I
can't give more detail right now. I know that there are open source
packages that let you play with them.

-Dan

Jens Benecke wrote:
>
> Hi,
>
> we have a home-made device connected to the serial port which we are trying
> to program with Linux. I have posted here already and got a lot of useful
> answers, BitWizard (thanks) even translated a QBasic source which was
> supposed to do what we needed for our project into C for Linux.
>
> Thanks to all who answered!
>
> But now we have a somewhat different problem.
>
> The situation is this: When we connect the hardware to the serial port, the
> signal amplitude breaks down to lower than +3V (which is miniumum for the
> PC to detect a "0"). With DOS, the signal amplitude varies from -10..+10 V
> (approx) for 1/0 signals. With Linux, it's -10..<+3V, and that is not
> enough.
>
> I tried not starting setserial when starting Linux, this did not change.
> When gpm was started, the serial port status changed though - although the
> mouse is on ttyS0 and our hardware on ttyS1.
>
> The next thing for us will probably be dosemu....
>
> Yes, I know this project is ridiculous. I didn't invent it. And nobody
> wanted to learn MS Visual C++ & Co, we'd all be happy getting this to run
> under Linux.
>
> Do you have any further ideas about this? Why do the ports behave so much
> differently (no matter if we start setserial or not) when using Linux? In
> theory (yeah, right) it's hardware that should behave the same under any
> OS, at least in respect to voltage levels and power consumption?
>
> We'd all really appreciate if you can give us any further insights (or
> RTFMs...) you might have on this.
>
> BTW, we tried three different serial port hardware boards (ISA) so the
> hardware should not be at fault.
>
> I have put the QBasic source and the C source at
> http://www.pinguin.conetix.de/serial.zip, perhaps someone can shed a little
> light on this. There is also a complete DOS floppy boot image including
> QBasic and the .bas file for those who do not have a bootable DOS handy
> (dos.img.gz).
>
> Thanks a lot!
>
> --
> _ciao, Jens_______________________________ http://www.pinguin.conetix.de
> ·
> "[Microsoft] ... guarantees 99.8% NT uptime for certain hard-/software.
> That's exactly the 3 minutes daily that my NT server needs to reboot."
> -- ZDnet editorial
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:16 EST