in reply to Virtual COM port write
Please wrap your text in <p> and your code in <c> tags so it's readable.
A few things to try:
1. Check the return value of write_settings(): $PortObj->write_settings or die "failed to write_settings";
2. Turn off handshake: $PortObj->handshake("none");
3. Check the return value of write():
my $count_out = $PortObj->write($sendData); warn "write incomplete\n" if $count_out != length($sendData);
4. Wait a little while before closing the port - add a sleep(3); before $PortObj->close(). (Note: Although this may not be needed, a quick skim of the module's docs don't make it clear whether write() is blocking or not.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Virtual COM port write
by jismake (Initiate) on Apr 20, 2014 at 12:00 UTC | |
by Anonymous Monk on Apr 20, 2014 at 12:16 UTC | |
by jismake (Initiate) on Apr 20, 2014 at 13:05 UTC | |
by jismake (Initiate) on Apr 22, 2014 at 07:49 UTC |