Re: [fpc-pascal] problem setting up serial port

2006-03-11 Thread Felipe Monteiro de Carvalho
Hello, Would you guys please add a serial communication tutorial in this wiki page: http://wiki.lazarus.freepascal.org/index.php/Hardware_Access#Serial_Communication I wrote the parallel part of the tutorial, but I know nothing about serial comm and I would be very thankful =) thanks, -- Felipe

Re: [fpc-pascal] problem setting up serial port

2006-03-11 Thread Marc Santhoff
Resending second time, was blocked again: Am Samstag, den 11.03.2006, 12:26 +0100 schrieb Marco van de Voort: > > Note the line in pascal saying "c_line: char" which is missing in the > > systems declaration. This is an error, insn't it? > > I think so. Can you verify that it works with that lin

Re: [fpc-pascal] problem setting up serial port

2006-03-11 Thread Marc Santhoff
Resending, was blocked: Am Samstag, den 11.03.2006, 12:26 +0100 schrieb Marco van de Voort: > > Note the line in pascal saying "c_line: char" which is missing in the > > systems declaration. This is an error, insn't it? > > I think so. Can you verify that it works with that line commented? It l

Re: [fpc-pascal] problem setting up serial port

2006-03-11 Thread Marco van de Voort
> Note the line in pascal saying "c_line: char" which is missing in the > systems declaration. This is an error, insn't it? I think so. Can you verify that it works with that line commented? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] problem setting up serial port

2006-03-10 Thread Marc Santhoff
Hi again, from trying and decoding error messages I know the call to tcsetattr fails with an invalid input. The problem is caused by trying to set the field termios.c_ospeed, if left out the call is successfull. So I went the way trough the sources and have found something. On FreeBSD 4.11 termio

Re: [fpc-pascal] problem setting up serial port

2006-03-10 Thread Marc Santhoff
Am Freitag, den 10.03.2006, 17:06 +0100 schrieb Michael Van Canneyt: > > On Fri, 10 Mar 2006, Sebastian Günther wrote: > > > Marc Santhoff schrieb: > >> > >> Maybe I have looked at it for too long, where is the problem? > > > > just by the way, there is a unit called 'serial' in Free Pascal. Per

Re: [fpc-pascal] problem setting up serial port

2006-03-10 Thread Marc Santhoff
Am Freitag, den 10.03.2006, 16:46 +0100 schrieb Sebastian Günther: > Marc Santhoff schrieb: > > > > Maybe I have looked at it for too long, where is the problem? > > just by the way, there is a unit called 'serial' in Free Pascal. Perhaps > you might want to use this one, or at least have a look

Re: [fpc-pascal] problem setting up serial port

2006-03-10 Thread Michael Van Canneyt
On Fri, 10 Mar 2006, Sebastian Günther wrote: Marc Santhoff schrieb: Maybe I have looked at it for too long, where is the problem? just by the way, there is a unit called 'serial' in Free Pascal. Perhaps you might want to use this one, or at least have a look at the source code... Bette

Re: [fpc-pascal] problem setting up serial port

2006-03-10 Thread Sebastian Günther
Marc Santhoff schrieb: Maybe I have looked at it for too long, where is the problem? just by the way, there is a unit called 'serial' in Free Pascal. Perhaps you might want to use this one, or at least have a look at the source code... Regards, Sebastian __

[fpc-pascal] problem setting up serial port

2006-03-10 Thread Marc Santhoff
Hi, I'm trying to use a serial port at 1200baud, 7N2 with this code sequence: fCom := fpOpen('/dev/cuaa0', O_RDWR OR O_NOCTTY );//OR O_NONBLOCK); if (fCom < 0) then begin writeln(stderr, 'Couldn''t open serial port.'); halt(1); end; r := 0; fillchar(tios, sizeof(tios), #0); cfs