Recent

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

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #15 on: July 20, 2013, 05:32:06 pm »
you can place the directory lazserial in the components sub-directory of lazarus and install the package.
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 #16 on: July 20, 2013, 07:59:20 pm »
Hi, I have done that and it's a disaster. When trying to open sertest.lpi, I get an error dialogue " unable to find unit of component class TLazSerial" Oh why, oh why can't there be some installation instructions. Not everyone starting out with Lazarus is an expert!! I now have NO IDEA how to proceed! :'(

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #17 on: July 20, 2013, 11:41:52 pm »
what is your version of lazarus ? Operating system ? have you really installed the package lazserialport ( lazserialport.lpk) ? do you see this package in the installed package list ? the example sertest needs that this package be installed.
« Last Edit: July 20, 2013, 11:44:34 pm by Jurassic Pork »
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 #18 on: July 21, 2013, 11:05:43 am »
Hi, Thanks for the reply. I have Lazarus 0.9.28.2. I have it on 2 machines. This one is a WinXP machine. I also have a Raspberry Pi with raspbian. I was hoping to get it working on the PC first and then install on the RasPi. In the package list is lazserialport 0.0. When I installed that it asked to recompile Lazarus and it did so. I still get that same error trying to open sertest, so as I say, I am lost! The program I am writing needs to read data from a gps on ttyUSB0 on the Pi.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #19 on: July 21, 2013, 01:02:11 pm »
sorry, i haven't an old lazarus version to check the package with it. Strange thing is that you say that you have lazserialport 0.0 ? the version of the package is 0.1  ( see attachment)
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 #20 on: July 21, 2013, 09:43:20 pm »
I am on this version of Lazarus because of the RasPi's OS apparently. No idea why it should say 0.0! Could the error message relate to it not finding the path to the file it requires? I have come from CBuilder and there you could set paths for components. It also showed invalid paths by greying them out but I can't find anything like that in Lazarus.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #21 on: July 22, 2013, 01:59:47 am »
i have tried lazserial with lazarus 0.9.28.2  fpc 2.4.0 on virtualbox ubuntu lucid 10.04   32 bits.

the only error that i had, was with the method "start" of tthread  (put resume for fpc 2.4.0)

then i could compile sertest without errors. So have you errors during this stages  ? :

1 - Open the package ( packages/open a package file) LazSerialPort.lpk ?
2 - Compile
3 - Install

 
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 #22 on: July 22, 2013, 11:07:52 pm »
Steps 1 - 3 go fine. It asks to rebuild Lazarus and does so fine. However, if I close Lazarus and then reopen it, it reloads sertest. If you then do run, you get the error message "unable to find the unit of component class TLazSerial". It gives 3 options, all stop it dead!

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #23 on: July 23, 2013, 12:27:06 am »
Search for  lazserial.ppu and tell me in which folder is this file.

Tell me the complete path where are the ppu files of the units of Lazarus

lazarus/units/????/????/

Have you change in the options of the package lazserialport the target and cpu for your target ?


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

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #24 on: July 23, 2013, 08:30:19 am »
I have Lazarus 0.9.28.2. I have it on 2 machines. This one is a WinXP machine. I also have a Raspberry Pi with raspbian. I was hoping to get it working on the PC first and then install on the RasPi.
You don't have to stick with 0.9.28.2 because of Raspbian. Take a look at this: http://forum.lazarus.freepascal.org/index.php/topic,20803.msg121127.html#msg121127
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

BLL

  • Sr. Member
  • ****
  • Posts: 276
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #25 on: July 23, 2013, 11:37:23 am »
Hi, Thanks for that. I will look into it. My current version was the one I was directed to for the Pi on the Lazarus download site!

BLL

  • Sr. Member
  • ****
  • Posts: 276
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #26 on: July 23, 2013, 02:04:57 pm »
I have installed Lazarus 1.0.6 on the PC and LazSerial installs fine and the test app works. However, nowhere can I find out clearly how to install 1.0.6 on the Raspberry Pi with Raspbian. apt-get install lazarus gives me the same 0.9.28.2 version, so I seem stuck!

BLL

  • Sr. Member
  • ****
  • Posts: 276
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #27 on: July 23, 2013, 04:16:55 pm »
Interestingly, I tried installing TLazSerial on the RasPi - not good - 22 errors trying to compile the component! Surely, there must be a way to read the default gps port 2947, which is ttyUSB0 from pascal? It can be done in python, C and C#, but not, apparently, in pascal on the PI!! Talk about frustrating!! :'(

Rails

  • Guest
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #28 on: July 23, 2013, 04:44:28 pm »
I have installed Lazarus 1.0.6 on the PC and LazSerial installs fine and the test app works. However, nowhere can I find out clearly how to install 1.0.6 on the Raspberry Pi with Raspbian. apt-get install lazarus gives me the same 0.9.28.2 version, so I seem stuck!

The Debian Raspbian repository seems to contain only Wheezy (Stable) packages. Apparently, things haven't progressed to the point that they are in a position  to offer Testing or Unstable repos to their users. i386 Testing currently has Laz 1.0.10, while Stable is at 9.30.4.

Perhaps you can build from source?
 
« Last Edit: July 23, 2013, 04:48:56 pm by Rails »

BLL

  • Sr. Member
  • ****
  • Posts: 276
Re: TLazSerial : serial port component for Lazarus (windows and linux).
« Reply #29 on: July 23, 2013, 05:04:37 pm »
I am a newbie to Linux and the RasPi, so I have absolutely no idea how to go about building from source! I can't believe that no-one has found a way to talk to a USB port in fpc on the PI!!

 

TinyPortal © 2005-2018