Recent

Author Topic: TLazSerial : serial port component for Lazarus (windows and linux).  (Read 342191 times)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
TLazSerial          EDIT  (02/2021) :   new version v0.4 in Github here   and OPM
Serial Port Component for Lazarus (windows and linux).
by Jurassic Pork  03/2013
This library is Free software; you can rediStribute it and/or modify it
  under the terms of the GNU Library General Public License as published by
  the Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.

  This program is diStributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; withOut even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  for more details.

  You should have received a Copy of the GNU Library General Public License
  along with This library; if not, Write to the Free Software Foundation,
  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. }

 Based on  :
- SdpoSerial v0.1.4
  CopyRight (C) 2006-2010 Paulo Costa
   paco@fe.up.pt
 
- Synaser library  by Lukas Gebauer
- TcomPort component


Features :
Changed :  baudrate values.
           stop bits  new value : 1.5
new event : onstatus
new property FRcvLineCRLF : if this property is true, you use RecvString
in place of RecvPacket when you read data from the port.

new procedure  ShowSetupDialog to open a port settings form :
the device combobox contain the enumerated ports.
new procedure to enumerate real serial port on linux ( in synaser).

Demo : a simulator of serial port gps + serial port receiver :
you can send NMEA frames ( GGA GLL RMC) to the opened serial port
(start gps simulator). You can change speed and heading.
In the memo you can see what is received from  the opened serial port.
In the status bar you can see the status events.

tested with windows 7 and Ubuntu 12.04
                                       
if you haven't serial ports in your PC you can use virtual ports :
1 - WINDOWS
To simulate  a paired serial ports on  windows : com0com   

2 - Linux
To simulate  a paired serial ports on linux : socat
ex :  socat -d -d PTY: PTY:

To connect to a bluetooth GPS on Linux
echo connection to a  bluetooth GPS(/dev/rfcomm0)

sudo rfcomm bind  0 xx:xx:xx:xx:xx:xx 1

====================================================================
How to install the component ( lazarus version >=  1.x) : 

1 - Download the file LazSerial.7z (you must be logged in the forum  to see and download the file).

2 - Open the file and uncompress it in the Lazarus/components directory.

3 - Open Lazarus IDE ,  Open the package ( packages/open a package file) LazSerialPort.lpk

4 - Compile

5 - Install

====================================================================

Sorry for my poor english but it isn't my natural language.

to be continued if it is usable ....

                    J.P
« Last Edit: February 27, 2021, 02:52:36 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

herux

  • Full Member
  • ***
  • Posts: 102
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #1 on: April 03, 2013, 04:54:53 am »
yes this is very useful

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
 :D :) Yes this is very very very useful tool. Thanks, J.P. for making it available to the Lazarus community.

vruz

  • Newbie
  • Posts: 1
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #3 on: July 07, 2013, 07:22:06 am »
Thanks a lot JP, this will be very useful. :D
Cheers!

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #4 on: July 07, 2013, 04:16:48 pm »
Components under GPL are not ideal.  Usually units/components are LGPL (and preferably with exception, like FPC and Lazarus themselves)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #5 on: July 07, 2013, 05:40:28 pm »
Quote
Components under GPL are not ideal.  Usually units/components are LGPL (and preferably with exception, like FPC and Lazarus themselves)
Isn't it LGPL already? With different L, if I'm not mistaken...

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #6 on: July 07, 2013, 06:00:47 pm »
Yep, see JP's original post:
Quote
GNU Library General Public License
=LGPL, right?!?
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8744
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #7 on: July 07, 2013, 06:21:58 pm »
Quote
=LGPL, right?!?
the real LGPL has L stands for Lesser, not Library

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #8 on: July 07, 2013, 07:54:49 pm »
Quote
=LGPL, right?!?
the real LGPL has L stands for Lesser, not Library

(it was my mistake I read over the original).

But afaik it was library originally, and GNU tried to rechristening it to lesser because they wanted to make some point, just like GNU tried to redefine the word free.
« Last Edit: July 08, 2013, 12:44:46 pm by marcov »

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #9 on: July 08, 2013, 03:00:40 am »
hello everybody,
the component has  "GNU Library General Public License"  which is also the  "GNU Lesser General Public License or LGPL"

look at   :o  here :
The GNU Lesser General Public License or LGPL (formerly the GNU Library General Public License)

I am Jurassic, so i use formely licenses  :D

Friendly, J.P
« Last Edit: July 08, 2013, 03:13:26 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

serfi-laz

  • Newbie
  • Posts: 1
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #10 on: July 17, 2013, 02:37:40 pm »
Unfortunately, don't know how to adapt this component for WinCE platform.. Maybe someone has idea how to do it without manual thread-magic?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #11 on: July 17, 2013, 03:09:23 pm »
I am Jurassic, so i use formely licenses  :D
Good motivation - ROFL ;)
(also thanks for clarifying this for people who did not know)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BLL

  • Sr. Member
  • ****
  • Posts: 276
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #12 on: July 18, 2013, 09:09:49 pm »
Hi, I am new to this board. Where can I download TLazSerial? I can't find it anywhere!! Thanks

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #13 on: July 18, 2013, 11:44:10 pm »
hello BLL,

you can find the download of TLazSerial in attachments (lazserial.7z) of this message :
http://forum.lazarus.freepascal.org/index.php/topic,20481.msg118267.html

You must be logged to see and download attachments in the forum.

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

BLL

  • Sr. Member
  • ****
  • Posts: 276
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #14 on: July 20, 2013, 05:07:28 pm »
Thank you for the reply. I have now downloaded it. In which sub-directory should the files be placed, please?

 

TinyPortal © 2005-2018