[fpc-pascal] serial.pp - I can't talk to modem
Michael Van Canneyt
michael at freepascal.org
Wed Jan 2 14:23:07 CET 2008
On Wed, 2 Jan 2008, Graeme Geldenhuys wrote:
> Hi,
>
> I've created a simple console application for Linux and Windows. It's
> a port of older Win32 API code I wrote years ago. All I'm trying to
> do is dial a phone number and then later hang-up the phone.
>
> I've got a external USRobotics Courier V.Everything V.90 X2 connected
> to COM1 (/dev/ttyS0). The modem works perfectly in 'minicom' (a modem
> terminal application). But for some reason I can't get anything out
> of the modem using the serial.pp unit. I can see the RD and SD lights
> flicker briefly on the modem, but nothing else.
> 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 ?
Michael.
More information about the fpc-pascal
mailing list