A
arkadyz1
I'm not sure if it's the right group for this question as it's very
environment-specific.
Actually, the subject "How to set the baud rate on a serial port (Perl
under cygwin)?" says it all.
Here is the more detailed description of the problem:
I have a device connected to my Windows 2000 PC's serial port. The
device might talk at different baud rates (19200, 38400, 57600,
115200). Before starting to work with the device I have to determine
its baud rate. The device has some predefined response to a certain
'command' sent its way so it should be easy enough to find out the baud
rate from a Perl script... if only I knew how to change the baud rate
of the open port! Intuitively, ioctl() seems to be the best bet but
perldoc -f ioctl is not very helpful, and, since I don't have any
"native" Windows development environment, there is no ioctl.h to h2ph.
As a side note:
I use
sysopen SERIAL, "COM${port}:", O_RDWR;
to open the port. Is it suitable for my purposes?
Thanks in advance,
Arkady.
environment-specific.
Actually, the subject "How to set the baud rate on a serial port (Perl
under cygwin)?" says it all.
Here is the more detailed description of the problem:
I have a device connected to my Windows 2000 PC's serial port. The
device might talk at different baud rates (19200, 38400, 57600,
115200). Before starting to work with the device I have to determine
its baud rate. The device has some predefined response to a certain
'command' sent its way so it should be easy enough to find out the baud
rate from a Perl script... if only I knew how to change the baud rate
of the open port! Intuitively, ioctl() seems to be the best bet but
perldoc -f ioctl is not very helpful, and, since I don't have any
"native" Windows development environment, there is no ioctl.h to h2ph.
As a side note:
I use
sysopen SERIAL, "COM${port}:", O_RDWR;
to open the port. Is it suitable for my purposes?
Thanks in advance,
Arkady.