in reply to SerialPort issues under Windows 10
Based on my testing, the issue is that you need to do $port->write_settings or die "write_settings: $^E"; after setting the parameters.
The next issue I had was that Win32::SerialPort's ->read appears to be behaving non-blocking (I unfortunately don't have enough time to investigate further at the moment see reply). See its documentation for a few blocking methods you can try, or you can use the tied filehandle interface to be able to use Perl's readline and read - if I wanted blocking I/O, the latter is what I would do as I find the filehandle interface more familiar.
Note you should Use strict and warnings!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SerialPort issues under Windows 10
by haukex (Archbishop) on Apr 16, 2021 at 12:24 UTC | |
|
Re^2: SerialPort issues under Windows 10
by clinicalAD (Initiate) on Apr 20, 2021 at 13:19 UTC |