I am trying to use an RS232 port (via FTDI on USB) and have unexpected trouble: Perl complains that the port is blocked since it has to wait for RLSD(DCD). I spent hours in the Internet to find and try solutions ... but no luck. I even soldered a bridge between DTR and DCD, set DTR to active, and could confirm the physical level change ... still a blocked port.

Hi. From your description it sounds like you are attempting a loopback connection on your serial adapter. For loopback without hardware flow control you only need to connect RXD and TXD, pins 2 and 3 on a DB9 serial connector. For hardware flow control you also need to connect DTR with DSR ( pins 4 and 6 ) and RTS with CTS ( pins 7 and 8 ). National Instruments has a tutorial about serial loopback testing.

The next step would be to verify that your hardware works. You can do that with Hyperterminal or another terminal program such as PuTTY. With echo 'on' in Hyperterminal you will see what you type but you should see it doubled as it is received back on the RXD pin. It's been a while since I've used Hyperterminal but the setup is pretty simple, something like tell it the com port, baud, etc.

Finally you might start off with some of the example scripts in the distribution for Win32::SerialPort. Download the tar.gz file and look in the 'eg' folder for stty.plx or try some of the other demo scripts. Let us know what progress you make. I am curious what the application is or if this is just a test.


In reply to Re: Perl on Windows insists on waiting for serial port's RLSD(DCD) by Lotus1
in thread Perl on Windows insists on waiting for serial port's RLSD(DCD) by UltraDMA

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.