in reply to Trying to read from serial port - not getting a response
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 <PORT> read operation.
How about trying a read or 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. update: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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Trying to read from serial port - not getting a response
by adiuva (Sexton) on Dec 05, 2012 at 10:23 UTC | |
by graff (Chancellor) on Dec 05, 2012 at 22:27 UTC | |
by adiuva (Sexton) on Dec 06, 2012 at 09:26 UTC | |
by adiuva (Sexton) on Dec 05, 2012 at 14:58 UTC |