Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-04

Any Free/Cheap Async Serial Port Component

20 messages · 11 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to Bob Axtell
Bob Axtell wrote
This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no longer afford it for one program. Does anybody know of a free/cheap component? any how does it install?

Maybe you can use synaser from the synapse package ?

Michael.

Reply by email

Roberto P.
to Bob Axtell: This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no…

we currently use this one:

http://sourceforge.net/projects/cportlaz/files/cportlaz/

R#

2014-04-02 8:32 GMT+02:00 Bob Axtell :

Show quoted text 14 lines
This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no longer afford it for one program. Does anybody know of a free/cheap component? any how does it install? --Bob A -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140402/4d3e49b7/attachment.html>

Reply by email

Paul Breneman
to Paul Breneman
Paul Breneman wrote 7 lines
On 04/02/2014 02:32 AM, Bob Axtell wrote: > This newbie is familiar with COMPORT from WINSOFT from my olden Delphi > days, but I can no longer afford it for one program. > > Does anybody know of a free/cheap component? any how does it install? www.CtrlTerm.com uses Synapse and Synaser and there is a port for Lazarus.

I should have mentioned that www.CtrlTerm.com is a simple example of how Synapse and Synaser can be used (it is not the component itself).

Best regards,
Paul
www.TurboControl.com

Reply by email

Paulo Costa
to Bob Axtell: This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no…
Bob Axtell wrote
This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no longer afford it for one program. Does anybody know of a free/cheap component? any how does it install?

You can try:

http://sourceforge.net/projects/sdpo-cl/

It is has a component wrapping the synaser library. Works with Windows and Linux.

Paulo Costa

Reply by email

Roberto P.
to Paulo Costa

I'd like to point out that CPortLaz is multithreaded and that it has both a COM port object and a Packet object.
The first one is used to setup, open and close the port; the second one connects to the first one and makes packet handling as simple as:

- define what is a packet:

Packet.Startstring := ':';
Packet.Stopstring := #13;   or Packet.Size := 8;

- implement the OnPacket(Sender: TObject; Str : string); event handler

It also has some visual components but I never used them.

R#

2014-04-02 16:04 GMT+02:00 Paulo Costa :

Show quoted text 24 lines
On 02/04/2014 07:32, Bob Axtell wrote: > This newbie is familiar with COMPORT from WINSOFT from my olden Delphi > days, but I can no longer afford it for one program. > > Does anybody know of a free/cheap component? any how does it install? > You can try: http://sourceforge.net/projects/sdpo-cl/ It is has a component wrapping the synaser library. Works with Windows and Linux. Paulo Costa -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140402/d6cb9d4d/attachment.html>

Reply by email

Martin Gomez
to Roberto P.
Roberto P. wrote 11 lines
I'd like to point out that CPortLaz is multithreaded and that it has both a COM port object and a Packet object. The first one is used to setup, open and close the port; the second one connects to the first one and makes packet handling as simple as: - define what is a packet: Packet.Startstring := ':'; Packet.Stopstring := #13; or Packet.Size := 8; - implement the OnPacket(Sender: TObject; Str : string); event handler

AWESOME, that's just what i need for a project i'm migrating from .NET

Does it work in Windows CE?

Regards,
Mart?n

Reply by email

Roberto P.
to Martin Gomez

Unfortunately I've never tried it on anything other than Win2000-XP-7; I could support you only on these platforms with some examples.

If you discover anything interesting on Win CE, please share it!

R#

2014-04-03 0:23 GMT+02:00 Martin Gomez :

Show quoted text 31 lines
On 02/04/2014 05:53 p.m., Roberto P. wrote: > I'd like to point out that CPortLaz is multithreaded and that it has both > a COM port object and a Packet object. > The first one is used to setup, open and close the port; the second one > connects to the first one and makes packet handling as simple as: > > - define what is a packet: > > Packet.Startstring := ':'; > Packet.Stopstring := #13; or Packet.Size := 8; > > - implement the OnPacket(Sender: TObject; Str : string); event handler > AWESOME, that's just what i need for a project i'm migrating from .NET Does it work in Windows CE? Regards, Mart?n -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140403/955fd028/attachment.html>

Reply by email

Michael Schnell
to Roberto P.: I'd like to point out that CPortLaz is multithreaded and that it has both a COM port…
Roberto P. wrote
I'd like to point out that CPortLaz is multithreaded

Does it work similar to AsyncPro ?

In fact, IMHO, it would be desirable to have a component that _internally_ uses TThread to handle blocking ports (either using just a byte-FIDO - this is what AsyncPro does - and/or allowing the user to implement a protocol within the Thread's "Execute" ), and when some information from the port is received (at least one byte or when the protocol handler issues a "ready"), does an Event (aka queued callback) to the main thread.

The main thread call of course needs to be "scheduled" using means such as TThread.Queue or Application.QueueAsyncCall. (As at the time when AsyncPro was released, Delphi did not provide either, AsyncPro uses Windows Messages by directly accessing the Windows API, which happily is not necessary with Lazarus).

Unfortunately Thread -> Mainthread signaling is only easily provided in Lazarus in the GUI based Widget Types. (NoGUI still needs an appropriate enhancement.) But of course the user (or even a ComPort Unit) could provide a usable Main Loop implementation.

-Michael

Reply by email

Roberto P.
to Michael Schnell

I don't know AsyncPro, but a quick overview of CPortLaz code reveals the usage of a TThread and WaitForMultipleObjects which is very Windows-centric.

R#?

2014-04-03 11:14 GMT+02:00 Michael Schnell :

Show quoted text 34 lines
On 04/02/2014 10:53 PM, Roberto P. wrote: > I'd like to point out that CPortLaz is multithreaded > Does it work similar to AsyncPro ? In fact, IMHO, it would be desirable to have a component that _internally_ uses TThread to handle blocking ports (either using just a byte-FIDO - this is what AsyncPro does - and/or allowing the user to implement a protocol within the Thread's "Execute" ), and when some information from the port is received (at least one byte or when the protocol handler issues a "ready"), does an Event (aka queued callback) to the main thread. The main thread call of course needs to be "scheduled" using means such as TThread.Queue or Application.QueueAsyncCall. (As at the time when AsyncPro was released, Delphi did not provide either, AsyncPro uses Windows Messages by directly accessing the Windows API, which happily is not necessary with Lazarus). Unfortunately Thread -> Mainthread signaling is only easily provided in Lazarus in the GUI based Widget Types. (NoGUI still needs an appropriate enhancement.) But of course the user (or even a ComPort Unit) could provide a usable Main Loop implementation. -Michael -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140403/9229b990/attachment.html>

Reply by email

Mark Morgan Lloyd
to Michael Schnell: Does it work similar to AsyncPro ? In fact, IMHO, it would be desirable to have a…
Michael Schnell wrote 8 lines
On 04/02/2014 10:53 PM, Roberto P. wrote: > I'd like to point out that CPortLaz is multithreaded Does it work similar to AsyncPro ? In fact, IMHO, it would be desirable to have a component that _internally_ uses TThread to handle blocking ports (either using just a byte-FIDO - this is what AsyncPro does - and/or allowing the user to

I agree. My mods to serial.pp were accepted into trunk a few weeks ago, but that is explicitly unthreaded since it's intended as the lowest layer for cases where- as an example- timestamps or changes to physical control lines need to be enqueued with the character stream.

implement a protocol within the Thread's "Execute" ), and when some information from the port is received (at least one byte or when the protocol handler issues a "ready"), does an Event (aka queued callback) to the main thread.

With the caveat that this sort of thing needs to be implemented very carefully so that it can interwork with e.g. a terminal emulator component. I think the two would need to be designed together, even if in practice one was coded first.

Until then, FPC's thread handling is sufficiently good that an application-specific hack isn't particularly difficult.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Schnell
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
I think the two would need to be designed together, even if in practice one was coded first.

In fact I am planning to do a NoGUI WidgetType some day (hopefully soon), and since some time I do know how this in fact can be done. Unfortunately no spare time right now....

-Michael

Reply by email

Zaher Dirkey
to Bob Axtell: This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no…
Try
https://sourceforge.net/p/minilib

https://sourceforge.net/p/minilib/code/HEAD/tree/trunk/comm/

Bob Axtell wrote 14 lines
This newbie is familiar with COMPORT from WINSOFT from my olden Delphi days, but I can no longer afford it for one program. Does anybody know of a free/cheap component? any how does it install? --Bob A -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140506/984b4555/attachment.html>

Reply by email

Koenraad Lelong
to Zaher Dirkey
Zaher Dirkey wrote 5 lines

Hi,

Out of curiosity I looked into this, and I downloaded the source from sourceforge.
Trying to install I found problems :
minicommons never compiled for fpc/lazarus ? Because some function declarations are different from the forward declarations. Solved this for now by making them identical.
More problematic : minilib lacks HTMLKeywords.inc.

There I'm stuck.
I would like to try the pos-library.

Koenraad.

Reply by email

Zaher Dirkey
to Koenraad Lelong

What functions?

I added the missed file, and you can use the bug tracker. Try again

Thank you

Koenraad Lelong wrote 28 lines
op 06-05-14 21:08, Zaher Dirkey schreef: > Try > https://sourceforge.net/p/minilib > > https://sourceforge.net/p/minilib/code/HEAD/tree/trunk/comm/ > > Hi, Out of curiosity I looked into this, and I downloaded the source from sourceforge. Trying to install I found problems : minicommons never compiled for fpc/lazarus ? Because some function declarations are different from the forward declarations. Solved this for now by making them identical. More problematic : minilib lacks HTMLKeywords.inc. There I'm stuck. I would like to try the pos-library. Koenraad. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3 Best Regards Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140510/e6ed48e4/attachment.html>

Reply by email

Koenraad Lelong
to Zaher Dirkey
Zaher Dirkey wrote 7 lines
What functions? I added the missed file, and you can use the bug tracker. Try again Thank you

Never mind those functions. I later read that I needed to use release, in stead of trunk. There all was OK.
I will try again ASAP.

Koenraad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140510/5f7ae846/attachment.html>

Reply by email

Koenraad Lelong
to Koenraad Lelong
Koenraad Lelong wrote 13 lines
op 10-05-14 16:44, Zaher Dirkey schreef: > What functions? > > I added the missed file, and you can use the bug tracker. > Try again > > Thank you > Never mind those functions. I later read that I needed to use release, in stead of trunk. There all was OK. I will try again ASAP. Koenraad.
I spoke a bit too soon. I downloaded release (download snapshot). Then I
tried to compile lib/minicommons. I get the same errors I had before :
/lib/mnFields.pas(750,20) Error: Calling convention doesn't match forward
/lib/mnFields.pas(213,14) Hint: Found declaration:
TmnFields.QueryInterface(constref TGuid,out <Formal type>):LongInt; CDecl;
/lib/mnFields.pas(798,20) Error: Calling convention doesn't match forward
/lib/mnFields.pas(205,14) Hint: Found declaration:
TmnFields._AddRef:LongInt; CDecl;
/lib/mnFields.pas(803,20) Error: Calling convention doesn't match forward
/lib/mnFields.pas(206,14) Hint: Found declaration:
TmnFields._Release:LongInt; CDecl;
After fixing those I get :
/lib/mnUtils.pas(121,18) Error: Identifier not found "CharInSet"
/lib/mnUtils.pas(251,51) Error: Identifier not found "CharInSet"
/lib/mnUtils.pas(259,108) Error: Identifier not found "CharInSet"
/lib/mnUtils.pas(261,50) Error: Identifier not found "CharInSet"
/lib/mnUtils.pas(509,17) Error: Identifier not found "CharInSet"

Here I'm stuck.
P.S. I do it this way because I don't see how I can use the bug-tracker of sourceforge. I will have to search more.

Koenraad.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140510/85f61889/attachment.html>

Reply by email

Marco van de Voort
to Koenraad Lelong
Koenraad Lelong wrote
Here I'm stuck. P.S. I do it this way because I don't see how I can use the bug-tracker of sourceforge. I will have to search more.

charinset is a D2009+ function that is roughly the same as (c in tsyscharset), where c is an expression of type char. It is mostly a workaround for unicodestrings.

FPC/trunk supports it.

Reply by email

Zaher Dirkey
to Koenraad Lelong: I spoke a bit too soon. I downloaded release (download snapshot). Then I tried to compile…
Koenraad Lelong wrote 12 lines
I spoke a bit too soon. I downloaded release (download snapshot). Then I tried to compile lib/minicommons. I get the same errors I had before : /lib/mnFields.pas(750,20) Error: Calling convention doesn't match forward /lib/mnFields.pas(213,14) Hint: Found declaration: TmnFields.QueryInterface(constref TGuid,out <Formal type>):LongInt; CDecl; /lib/mnFields.pas(798,20) Error: Calling convention doesn't match forward /lib/mnFields.pas(205,14) Hint: Found declaration: TmnFields._AddRef:LongInt; CDecl; /lib/mnFields.pas(803,20) Error: Calling convention doesn't match forward /lib/mnFields.pas(206,14) Hint: Found declaration: TmnFields._Release:LongInt; CDecl;

?Sorry for the delay?

Ah, that because i am using Windows, i fixed it, try last in "release" branch.

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140521/a421a73b/attachment.html>

Reply by email