[Lazarus] Using 5dpo for serial comm...
Lukasz Sokol
el.es.cr at gmail.com
Thu Oct 7 10:23:44 CEST 2010
On 07/10/2010 06:01, Bo Berglund wrote:
> On Thu, 07 Oct 2010 02:14:47 +0000, Mark Morgan Lloyd
> <markMLl.lazarus at telemetry.co.uk> wrote:
>
>>> If I now close the port with my button and then try to open it again
>>> there is an exception that forces the program to end.
>>
>> Check port ownership, the groups the current user is in, and look at
>> dmesg output.
>>
>
> Hmm, what do you mean by that? Could you be more specific?
> The current user is myself, there is no other account created on the
> system and I am an admin.
> And what is "dmesg output"?
>
>
In virtual console, type 'ls -l /dev/ttyS*' will list all ttyS with permissions.
like this :
crw-rw---- 1 root dialout 4, 64 2010-04-12 09:17 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2010-04-12 09:17 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2010-04-12 09:17 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2010-04-12 09:17 /dev/ttyS3
(this is from actual Ubuntu machine, under 8.10).
This shows you that root owns all these ports, and dialout group
is allowed to use it too, no others (man chmod).
So to get your port working, you need to change your user group (add the username
to group dialout in /etc/group file), then log out and log in again.
Or you can, for quick look, start your app under gksudo;
Dmesg output appears on console if you type 'dmesg' or you can view it
as saved to /var/log/dmesg (it lists a whole lot of kernel startup messages).
HTH,
Lukasz
More information about the Lazarus
mailing list