After first powering up my computer, it fails. Further investigation has shown that it's because COM1 doesn't, at this point, show 115200 baud as one of its capabilities (using WIN32API::CommPort's can_baud method). However, if I first open COM1 at 115200 baud using HyperTerminal, then close it, the above code will allow me to do so, too -- until rebooting. And, indeed, can_baud then lists 115200 as a capability for COM1. So what is HyperTerminal doing to force this capability that I can't also do in perl? Thank you!unless ($Port = new Win32::SerialPort($PortName) and $Port->baudrate($Baudrate) and $Port->parity('none') and $Port->databits(8) and $Port->stopbits(2) and $Port->handshake('rts') and $Port->buffers(4096,4096) and $Port->binary(1) and $Port->xon_limit(3000) and $Port->xoff_limit(300) and $Port->rts_active(1) and $Port->write_settings) { $mw->messageBox( -message => "Can't open $PortName at $Baudrate baud.", -type => 'OK' ); exit }
In reply to Windows serial I/O by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |