Any way to fully control BREAK condition on an RS232 line?

Any way to fully control BREAK condition on an RS232 line?

Post by Mads Orbesen Troes » Fri, 18 Oct 2002 23:03:39



Hi;

In porting some software to Linux which makes "strange" use of the RS-232 TX
line (to achieve in-place flashing of a PIC controller on the device
connected to the serial port), it is necessary for me to fully control the
BREAK condition of an RS-232 serial line. Due to the nature of this device,
it is not enough to be able to send a break for specified period of time (as
the posix function tcsendbreak() should achieve), I need to be able to turn
the BREAK condition ON when I want to, and OFF again explicitly when I want
to.

Is this possible on Linux (perhaps via ioctls to the serial driver?) - or is
there maybe even a posix way to do it? It can be done on both OS/2 and
Windows (the other target platforms of the software being ported), and I
hope you can enlighten me on my options on Linux (I am fairly new to
development on this platform).

Thanks in advance,
   /\/\\ads Orbesen Troest

 
 
 

1. A way to fully control BREAK condition on an RS232 line?

(This was originally posted to comp.os.linux.development.system but I have a
feeling that might've been the wrong place, so here it (slightly revised) is
in a hopefully more fitting NG. If not, please excuse my ignorance; I'm new
here...)

Hi;

In porting some software to Linux which makes "strange" use of the RS-232 TX
line (to achieve in-place flashing of a PIC controller on the device
connected to the serial port), it is necessary for me to fully control the
BREAK condition of an RS-232 serial line. Due to the nature of this device,
it is not enough to be able to send a break for specified period of time (as
the Posix function tcsendbreak() should achieve), I need to be able to turn
the BREAK condition ON when I want to, then fiddle with some other lines,
and then finally turn the break condition OFF again - explicitly when I want
to.

Is this possible on Linux (perhaps via ioctls to the serial driver?) - or is
there maybe even a Posix way to do it? It can be done on both OS/2 and
Windows (the other target platforms of the software being ported), and I
hope you can enlighten me on my options on Linux (I am fairly new to
development on this platform).

During my fruitless search on the net I came across something in the kernel
tty-code which may be related to this, namely "break_ctl". But I have no
idea whether that is something I can access from user space, and how...

Thanks in advance,
   /\/\\ads Orbesen Troest

2. Q: X-Windows mail program?

3. Detecting line break condition

4. Newbie - Telnet help

5. Ways to control named-xfer timing

6. port forwarding

7. Controlling RS232 peripherals

8. Problem installing gcc-2.4.5

9. Keyboard to fully control mouse?

10. HELP! Controlling RS232 ports in C

11. How to fully control both short and long names with mkisofs?

12. RS232 flow control

13. Fully qualified host name breaks calendar manager