[fpc-pascal] serial.pp - I can't talk to modem

Michael Van Canneyt michael at freepascal.org
Wed Jan 2 14:49:18 CET 2008



On Wed, 2 Jan 2008, Graeme Geldenhuys wrote:

> On 02/01/2008, Michael Van Canneyt <michael at freepascal.org> wrote:
> > > begin
> > >   serialhandle := SerOpen('/dev/ttyS0');  // COM1 under Linux
> > > //  SerSetParams(serialhandle, 2400, 8, NoneParity, 1, []);
> >
> > Shouldn't you set at least RtsCtsFlowControl ?
> > As far as I know, you must at least set some options, such as the baud rate
> > and so on, sersetparams seems to do most of the needed actions ?
> 
> 
> Even if I uncomment the 'SerSetParams(...)' line shown above, it makes
> no difference.  :-(

Yes, but it should be

SerSetParams(serialhandle, 2400, 8, NoneParity, 1, [RtsCtsFlowControl]);

No ?

Also, 2400 baud seems very slow ?

Michael.



More information about the fpc-pascal mailing list