In our previous episode, "Vinzent H?fler" said:
>
> > Accessing ports is limited to ports < 03ffh, more ports cannot be
> > released with fpioperm. This means to me, successful serial port access
> > on higher addresses cannot yet be implemented with fpc.
>
> Or any other compiler, for that mat
2009/11/3 Marc Santhoff :
>
> I don't know wheter todays Lunix systems have static device nodes seen
> here for ttys or if they are created dynamically and the rights have to
> be set in some configuration file - consult your systems docs or a good
> tutorial or book an those questions.
The permis
Am Dienstag, den 03.11.2009, 09:39 +0100 schrieb Tomas Hajny:
> On Tue, November 3, 2009 02:33, Holger Bruns wrote:
> > Brad Campbell schrieb:
> >>
> >> Why not try attaching your test code that is failing so we can help
> >> you get it working?
> >
> > Done. My fault was the following declaration:
2009/11/3 Holger Bruns :
> in trouble with it. Secondly, it appears to be necessary to use the fpc
> compiler as "root", not simply as a user, I guess.
You need permissions to access any files on linux. Device nodes are
files, too. This is what it looks like on debian:
h...@technical09:~/source
On Tue, November 3, 2009 02:33, Holger Bruns wrote:
> Brad Campbell schrieb:
>>
>> Why not try attaching your test code that is failing so we can help
>> you get it working?
>
> Done. My fault was the following declaration:
>
> var inbuffer: array of char;
>
> This is a better declaration:
>
> var
Brad Campbell schrieb:
Why not try attaching your test code that is failing so we can help
you get it working?
Done. My fault was the following declaration:
var inbuffer: array of char;
This is a better declaration:
var inbuffer: array[0..10] of char;
Now I got my code working. Hidden poi
Holger Bruns wrote:
The real sad thing is, that one cannot produce software for Linux, based
on the restricted free pascal compiler. I am really disappointed.
That's an interesting assertion.
I use serial.pp on i386 Linux, x86_64 Linux, PPC OSX & Intel OSX flawlessly.
I use synaser on Win32.
Marc Santhoff schrieb:
sDefaultPort: string = '/dev/cuaa0'; { this would be /dev/ttyS2 for you }
fPort = sDefaultPort;
{ Init }
fCom := SerOpen(fPort);
if (fCom > -1) then begin
SerSetParams(fCom, 1200, 7, NoneParity, 2, []);
end else begin
writeln('Metex: failed to open port');
n := Get
Holger Bruns :
> Accessing ports is limited to ports < 03ffh, more ports cannot be
> released with fpioperm. This means to me, successful serial port access
> on higher addresses cannot yet be implemented with fpc.
Or any other compiler, for that matter, because this is a system restriction.
P
Am Montag, den 02.11.2009, 15:20 +0100 schrieb Holger Bruns:
> I am new to linux and wrote only small things for MS-DOS before. As far
> as I could read on the internet, fpc uses ioperm and iopl, and I will
> try to use iopl to get access to the ports I want to use. The problem is
> indeed the
> No, the "1000" means the size of a buffer, not a part address. The port
> address I try to use is 0xEC00, which is the base address for an UART on a
> PCI card. Linux sees this UART as /dev/ttyS2. Accessing the registers
> direcly should be easy, because 3 lines of assembler code should do this
>
Bernd Mueller schrieb:
Holger Bruns wrote:
Holger Bruns schrieb:
I try to implement a direct port access. If this also leads to
access errors, I should give it up. Embarassing.
Accessing ports is limited to ports < 03ffh, more ports cannot be
released with fpioperm. This means to me, successfu
Holger Bruns wrote:
Holger Bruns schrieb:
I try to implement a direct port access. If this also leads to access
errors, I should give it up. Embarassing.
Accessing ports is limited to ports < 03ffh, more ports cannot be
released with fpioperm. This means to me, successful serial port access
on
Florian Klaempfl schrieb:
Holger Bruns schrieb:
Holger Bruns schrieb:
I try to implement a direct port access. If this also leads to access
errors, I should give it up. Embarassing.
Accessing ports is limited to ports < 03ffh, more ports cannot be
released with fpioperm. This me
Holger Bruns wrote on Mon, 02 Nov 2009:
Accessing ports is limited to ports < 03ffh, more ports cannot be
released with fpioperm. This means to me, successful serial port
access on higher addresses cannot yet be implemented with fpc. If
this policy can be ruled out, let me know.
fpioperm
Holger Bruns schrieb:
> Holger Bruns schrieb:
>> I try to implement a direct port access. If this also leads to access
>> errors, I should give it up. Embarassing.
> Accessing ports is limited to ports < 03ffh, more ports cannot be
> released with fpioperm. This means to me, successful serial port
Holger Bruns schrieb:
I try to implement a direct port access. If this also leads to access
errors, I should give it up. Embarassing.
Accessing ports is limited to ports < 03ffh, more ports cannot be
released with fpioperm. This means to me, successful serial port access
on higher addresses can
Holger Bruns wrote on Mon, 02 Nov 2009:
Felipe Monteiro de Carvalho schrieb:
It may be useful to know that there is a serial communication example
using Synaser here:
http://wiki.lazarus.freepascal.org/Hardware_Access#Serial_Communication
Yes, thank you. I checked this out. The procedure recc
Felipe Monteiro de Carvalho schrieb:
It may be useful to know that there is a serial communication example
using Synaser here:
http://wiki.lazarus.freepascal.org/Hardware_Access#Serial_Communication
Yes, thank you. I checked this out. The procedure reccvbyte, as used in
this manner:
Write(
Jonas Maebe schrieb:
Holger Bruns wrote on Mon, 02 Nov 2009:
Martin schrieb:
you can do:
var buffer: Array of byte;
SetLength(Buffer, 1000);
SerRead(Handle, Buffer[0], 1000);
I checked this out. It works not reliable. Sometimes I get real data,
sometimes the data are corrupted. I have no i
Jürgen Hestermann schrieb:
function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt):
LongInt;
begin
Result := fpRead(Handle, Buffer, Count);
end;
i don't understand the declaration for "buffer" in the function
below, because no type is declared for "buffer".
Untyped para
Holger Bruns wrote on Mon, 02 Nov 2009:
Martin schrieb:
you can do:
var buffer: Array of byte;
SetLength(Buffer, 1000);
SerRead(Handle, Buffer[0], 1000);
I checked this out. It works not reliable. Sometimes I get real
data, sometimes the data are corrupted. I have no idea to rule out
cor
There's nothing limited within the compiler! If you have the same
knowledge and expertise of Pascal and C, IMHO with gcc you will only
be complicating your life.
About serial port, low level routine need some practice, but you can
go quickly to the point with this component for lazarus:
http://s
In our previous episode, Holger Bruns said:
>
> The only way to get rid of this problem is a direct port access. But
> direct port access is only possible for the first 200 port addresses. A
> "port" array is not yet implemented, and the required higher port
> addresses are strictly ruled out f
Martin schrieb:
Holger Bruns wrote:
Jürgen Hestermann schrieb:
function SerRead(Handle: TSerialHandle; var Buffer; Count:
LongInt): LongInt;
begin
Result := fpRead(Handle, Buffer, Count);
end;
i don't understand the declaration for "buffer" in the function
below, because no type is d
It may be useful to know that there is a serial communication example
using Synaser here:
http://wiki.lazarus.freepascal.org/Hardware_Access#Serial_Communication
It's much easier to use then using the lower level routines yourself.
--
Felipe Monteiro de Carvalho
Holger Bruns wrote:
Jürgen Hestermann schrieb:
function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt):
LongInt;
begin
Result := fpRead(Handle, Buffer, Count);
end;
i don't understand the declaration for "buffer" in the function
below, because no type is declared for "buff
Jürgen Hestermann schrieb:
function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt):
LongInt;
begin
Result := fpRead(Handle, Buffer, Count);
end;
i don't understand the declaration for "buffer" in the function
below, because no type is declared for "buffer".
I believe tha
function SerRead(Handle: TSerialHandle; var Buffer; Count: LongInt): LongInt;
begin
Result := fpRead(Handle, Buffer, Count);
end;
i don't understand the
declaration for "buffer" in the function below, because no type is
declared for "buffer".
I believe that the type is irrelevant, yo
Hello,
I am new to this list. For programming the serial ports on a linux
system, I tried to use the "serial" unit. i don't understand the
declaration for "buffer" in the function below, because no type is
declared for "buffer". How can I read a character from the selected
serial port? This i
30 matches
Mail list logo