[fpc-pascal] Using built-in serial instead of synaser and the like for Linux console app?

Bo Berglund bo.berglund at gmail.com
Fri Aug 21 11:54:51 CEST 2020


What is the advantage of using synaser over serial in a simple non-gui
program running in the console in Linux?

I have been struggling making LazSerial work in a console app and been
adviced to instead use synaser (which is what lazserial is built on).
A few months back it seemingly started to work but with some "fixes".

Yesterday I needed to quickly make a checkup tool for serial comm and
this time (again) I was hit by the appearance of GUI errors. Don't
remember how exactly I solved it last time...
What I remembered was using widgetset nogui, but it seems impossible
to get to such a setting in this simple program.
And using 'interfaces' on the line preceding Lazserial was also a fix
in the previous app but does not work now.

So hence my question:
Is there something bad about serial (built-in to fpc) that makes it
unsuitable for use?

Seems like there are virtually no posts describing solutions using
serial...
As it is built-in to fpc one would assume it is the preferred way, but
for some reason it looks like it is not...

(I am using fpc 3.0.4 + Lazarus 2.0.8 on a RaspberryPi (3 and 4))



-- 
Bo Berglund
Developer in Sweden



More information about the fpc-pascal mailing list