[fpc-pascal] How to use serial or usb-ports in linux

Sven Barth pascaldragon at googlemail.com
Sun Sep 6 12:40:33 CEST 2015


Am 06.09.2015 12:34 schrieb "P. vanderWal" <p.wal1 at quicknet.nl>:
>
> Hello all,
>
> I wrote a program to control a hobby milling machine.(Profiler, see
Elektor-forum). The programm is written in fpc-pascal and using synaser in
the windows version for control of the serial port(s).
> Now I want to use the program in Debian 8... and or Ubuntu 15...
Compiling and running the present version gives "no permission" for the
serial/usb ports.
> Please advise how to get the program running with these ports. (lazarus
1.2.4 fpc 2.6.4).

You need to run your program either as root or ensure that the user you run
as is allowed to use the ports.
You can check that by doing a "ls -l /dev/tty*", which will list the user
and group of the ttys as well as the permissions. With "groups" you should
be able to list what groups your user is part of and whether one of those
matches the group of the ports you try to access.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150906/9b37eacf/attachment.html>


More information about the fpc-pascal mailing list