Re: [Lazarus] Usage of Serial in a testing program?

2018-09-23 Thread Mark Morgan Lloyd via Lazarus
On 23/09/18 08:15, Bo Berglund via Lazarus wrote: On Sun, 23 Sep 2018 08:39:52 +0200, Bo Berglund via Lazarus wrote: I have now come as far in my application as I can test the way the>Serial unit opens and closes com ports.>It turns out that on Windows there are two port name syntaxes:>>Ports

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-23 Thread Bo Berglund via Lazarus
On Sun, 23 Sep 2018 08:39:52 +0200, Bo Berglund via Lazarus wrote: >I have now come as far in my application as I can test the way the >Serial unit opens and closes com ports. >It turns out that on Windows there are two port name syntaxes: > >Ports 1..9: COM1 to COM9 will work >Ports 10..255:

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-23 Thread Paul Breneman via Lazarus
On 09/23/2018 02:39 AM, Bo Berglund via Lazarus wrote: ... Notice that contrary to the wiki example adding a colon to the end like COM32: does NOT work so that is a wiki error. If I remember correctly the colon at the end is required for WinCE? -- ___

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-22 Thread Bo Berglund via Lazarus
On Sun, 09 Sep 2018 13:33:22 +0200, Bo Berglund via Lazarus wrote: Coming back to this issue after I have been travelling... >For the serial port handling I found the "built-in" Serial unit >described here: >http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit > >Now I have a few

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Bo Berglund via Lazarus
On Mon, 10 Sep 2018 19:49:39 +0200, Giuliano Colla via Lazarus wrote: >Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: >> Unfortunately not possible in the real case because the file transfer >> protocol of the device only sends a header with the count of the data >> to follow and then s

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Bo Berglund via Lazarus
On Mon, 10 Sep 2018 19:44:22 +0200, Giuliano Colla via Lazarus wrote: >Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: > >> This seems only to deal with ports 1..9, what about the higher >> numbered ports 10..255? >> And would it not be a long execution time for testing all 255 possible

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Giuliano Colla via Lazarus
Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: I hope that it helps. Yes it does, but it would have been even better if not full of HTML tags and stuff. I have edited out most but I guess there are some still left... For example inside the code there may be some things like > rather t

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Giuliano Colla via Lazarus
Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: Unfortunately not possible in the real case because the file transfer protocol of the device only sends a header with the count of the data to follow and then streams all of the bytes I don't know how your application is built, but if

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Giuliano Colla via Lazarus
Il 10/09/2018 17:30, Bo Berglund via Lazarus ha scritto: This seems only to deal with ports 1..9, what about the higher numbered ports 10..255? And would it not be a long execution time for testing all 255 possible com ports on Windows? In my experience both Linux and Windows if you connect a ne

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Bo Berglund via Lazarus
On Mon, 10 Sep 2018 13:20:35 +0200, Giuliano Colla via Lazarus wrote: >Il 09/09/2018 13:33, Bo Berglund via Lazarus ha scritto: >>I am writing a testing application for checking out a TCP to Serial >>bridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 >> >>For the serial port h

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Mark Morgan Lloyd via Lazarus
On 10/09/18 13:30, Bo Berglund via Lazarus wrote: On Sun, 9 Sep 2018 20:44:34 +, Mark Morgan Lloyd via Lazarus wrote: I did quite lot of work on the serial.pp unit more recently than that >wiki page, in fact I didn't even know it existed. Please refer to the >comments in that file in the

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Sven Barth via Lazarus
Bo Berglund via Lazarus schrieb am Mo., 10. Sep. 2018, 15:19: > Concerning the com port name for SerOpen(): > > { Open the serial device with the given device name, for example: > \COM1, \COM2 (strictly, \\.\COM1...) for normal serial ports. > ISDN devices, serial port redirectors/virtual

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Bo Berglund via Lazarus
On Sun, 9 Sep 2018 20:44:34 +, Mark Morgan Lloyd via Lazarus wrote: >I did quite lot of work on the serial.pp unit more recently than that >wiki page, in fact I didn't even know it existed. Please refer to the >comments in that file in the first instance. Thanks Mark, I did that too and th

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-10 Thread Giuliano Colla via Lazarus
Il 09/09/2018 13:33, Bo Berglund via Lazarus ha scritto: I am writing a testing application for checking out a TCP to Serial bridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 For the serial port handling I found the "built-in" Serial unit descri

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-09 Thread Mark Morgan Lloyd via Lazarus
On 09/09/18 12:00, Bo Berglund via Lazarus wrote: I am writing a testing application for checking out a TCP to Serialbridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 For the serial port handling I found the "built-in" Serial unitdescribed here:http://wiki.freepascal.org/Har

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-09 Thread Bo Berglund via Lazarus
On Sun, 09 Sep 2018 16:26:29 +0200, Bo Berglund via Lazarus wrote: >On Sun, 09 Sep 2018 13:33:22 +0200, Bo Berglund via Lazarus > wrote: > >>3) Receiving data >> >I forgot to add a question about read timeouts... > >4) Read timeout >--- >When running this to read incom

Re: [Lazarus] Usage of Serial in a testing program?

2018-09-09 Thread Bo Berglund via Lazarus
On Sun, 09 Sep 2018 13:33:22 +0200, Bo Berglund via Lazarus wrote: >3) Receiving data > I forgot to add a question about read timeouts... 4) Read timeout --- When running this to read incoming data: status:= SerRead(serialhandle, s[1], 10); How can I get out of the

[Lazarus] Usage of Serial in a testing program?

2018-09-09 Thread Bo Berglund via Lazarus
I am writing a testing application for checking out a TCP to Serial bridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7 For the serial port handling I found the "built-in" Serial unit described here: http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit Now I have