<?xml version="1.0" encoding="windows-1252"?>
<node id="1007180" title="Re: Trying to read from serial port - not getting a response" created="2012-12-04 21:20:47" updated="2012-12-04 21:20:47">
<type id="11">
note</type>
<author id="44715">
graff</author>
<data>
<field name="doctext">
Do you have any method at all (apart from a perl script) that can let you know that stuff really does come in from the serial port?  It would be a comfort, at least, to rule out hardware problems (e.g. having a badly wired RS-232 connector).
&lt;P&gt;
Apart from that, you might need to be more explicit about the file handle discipline being used for reading from the port.  You seem to be using a default read protocol, whereby a line-termination pattern (probably "\r\n" in your case) needs to be detected by perl in order to return a value from the file handle via the &lt;c&gt;&lt;PORT&gt;&lt;/c&gt; read operation.
&lt;P&gt;
How about trying a [doc://read] or [doc://sysread]  instead?  That is, something that will read some quantity of bytes, regardless of whether there's any specific "record delimiter" character to be looked for. &lt;i&gt;update:&lt;/i&gt;It wouldn't be a bad idea to use one of these functions to read just one byte at a time; that way, it's unlikely that anything will be missed by virtue of being "cached" by the file-handle object.</field>
<field name="root_node">
1007081</field>
<field name="parent_node">
1007081</field>
</data>
</node>
