[Lazarus] Using 5dpo for serial comm...

Bo Berglund bo.berglund at gmail.com
Thu Oct 7 22:26:50 CEST 2010


On Thu, 07 Oct 2010 17:27:49 +0200, Koenraad Lelong
<lazarus1 at de-brouwerij.be> wrote:

>When I'm having problems with serial-comms, I use minicom/hyperterminal.
>I disable all handshaking. I have plugged in a test-connector in the
>port : with a 9pin connector shortcircuit pins 2 and 3. Then if I send
>anything to the port, I should get it back on the screen. If that works,
>I go further.
>My 2 cents.

Good idea, I did not think about that kind of self-test into a single
application! I just made myself a loopback connector-cable and tested.

Michael Schnell wrote:
>>  Did you check with minterm or similar that the serial port is in fact 
>> working for you ?
>
>Good point. I usually use gtkterm since it doesn't make assumptions 
>about modems etc. which is more use for talking to instrumentation.

I installed gtkterm and used that for initial testing with the
loopback connector. I found that while I had been using ttyS0 all
along, the working port is ttyS1!

After that I got my test application working too, both using the
loopback connector and with a connection to Hyperterminal on my
Windows host.

So far just functional tests, but next I will start up a serious comm
unit and start checking out the capabilities of the comm component.

Thanks for the tips and suggestions!

A question concerning gtkterm:
I cannot find any command to open/close the port. How is that done?
Do I have to shut down the program to release the port?


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list