[fpc-pascal]Serial Port programming under Linux...

Rainer Hantsch rainer at hantsch.co.at
Thu Jan 3 07:29:45 CET 2002

Hello everybody,

and all the best in the new year!

I have a small problem and I hope that somebody is here who knows an answer.

In the past (many years ago), I wrote a small RTTY (Radio Tele TYping) program
for my father (he is an radio amateur). This program was written in TP and
used X00 to do the serial communication with his self built modem. DTR
switches between sending and receiving, TxD and RxD are used like a normal
wire link to another terminal, but uses 45.5 bps/ 5 Data-Bits/ 2 Stop-Bits/ 

Because of this very low speed it is no must to do special buffering, but it
still would be nice if I wouldn't have to work on a character-by-character
level, if possible. 
With X00 on DOS, which also supports nothing below 1200bps, I had to
initialize X00 first (setting the correct data length,...) and then
re-configure the UART with direct access to the much lower speed. X00 didn't
recognize that and so I had what I wanted: 45.5 bps, buffered through
X00. But this is surely NOT portable to LINUX...
Instead, it starts to be a real problem to setup a serial port to this very
exotic speed of 45.5 bps, expecially because I never programmed such things 
before! I had a look into the ObjCOM unit which I plan to use, but it is very
confusing and poorely documented.
Another handicap is that my father's shack (equipment) is 80km away from my
office, so it is very hard to find the solution by trial and error...

My questions:
o  Does LINUX support only those speeds which are pre-defined in 'serial.h',
   or does it allow also other speeds?
o  Does anybody have experience with ObjCOM? OnjCOM seems to be the best
   replacement for X00-Fossil, because it adds buffering, if I understood it 
   right. I wrote to the developer of this unit, but it seems that he is 
   either not really interested in helping or he also has not enough 
   experience himself...  :-/ 

I will be very happy to receive some useful hints which really help me solving
my little problem.

Thanks for your answers,

  Ing. Rainer Hantsch

      \\|//           Ing. Rainer HANTSCH  -  Hardware + Software
      (o o)           Forget Windoze! -- We focus on L-I-N-U-X...
Ing. Rainer HANTSCH  |  e-Mail: office at hantsch.co.at
Khunngasse 21/20     |  www   : http://www.hantsch.co.at
A-1030 Vienna        |  Tel.  : ++43 - 1 - 7988538 0 
---------------------|  Fax   : ++43 - 1 - 7988538 18
** AUSTRIA **        |  Mobile: ++43 - 664 - 9194382

More information about the fpc-pascal mailing list