Recent

Author Topic: Problem using lazSerial library  (Read 6330 times)

soymoe

  • New Member
  • *
  • Posts: 35
Problem using lazSerial library
« on: December 08, 2014, 07:37:43 pm »
Hi, im try to use a LazSerial library to read data from USB-RS232 adapter. im configure serial port in object inspector ttyUSB0 but happens a error, see the image , sorry for my english.
http://www.subeimagenes.com/img/pantalla-1172482.html

dogriz

  • Full Member
  • ***
  • Posts: 130
Re: Problem using lazSerial library
« Reply #1 on: December 08, 2014, 07:50:21 pm »
You have to be root user or add yourself in dialout group.
FPC 3.2.2
Lazarus 4
Debian x86_64, arm

soymoe

  • New Member
  • *
  • Posts: 35
Re: Problem using lazSerial library
« Reply #2 on: December 08, 2014, 08:10:01 pm »
as I do that?.Tell me more.

tr_escape

  • Sr. Member
  • ****
  • Posts: 437
  • sector name toys | respect to spectre
    • Github:
Re: Problem using lazSerial library
« Reply #3 on: December 08, 2014, 08:37:27 pm »

soymoe

  • New Member
  • *
  • Posts: 35
Re: Problem using lazSerial library
« Reply #4 on: December 08, 2014, 09:14:09 pm »
i m was read these instructions and give access to all users. the problem is that serial port used is tyyUSB0 and the compiler say "dont open ttyS0" these is wrong port.

soymoe

  • New Member
  • *
  • Posts: 35
Re: Problem using lazSerial library
« Reply #5 on: December 09, 2014, 12:34:14 am »
problem solved adding this lines in form creator:

Code: [Select]
procedure TForm1.FormCreate(Sender: TObject);
begin
  LazSerial1.Device:='/dev/ttyUSB0';
  LazSerial1.Active:=true;

end;       
LazSerial maybe have a error...

tr_escape

  • Sr. Member
  • ****
  • Posts: 437
  • sector name toys | respect to spectre
    • Github:
Re: Problem using lazSerial library
« Reply #6 on: December 09, 2014, 07:44:53 am »
hello,

there is function in synaser.getserialports or similar.
if you look into this function you will see some useful operations.

also

http://www.turbocontrol.com/simpleserial.htm

address will you give a another synaser solution.


by the way in linux all access is not correct way because it can be dangerously.

i tried last night and i opened the ttyS0 because my computer is a desktop

in lazarus forum you can find TLazSerial:

http://forum.lazarus.freepascal.org/index.php?topic=20481.0

it is working

have fun

 

TinyPortal © 2005-2018