ser_rdwt - test serial I/O read/write functions
ser_rd -d devicename -b baudrate
ser_wt -d devicename -b baudrate
ser_rdwt sets the terminal parameter with the requested baud rate using the standard ioctl(2) system call. ser_rdwt then sets up two channels to transfer and receive data for the duration (in seconds) specified by the RUNTIME environment variable.
ser_rd transmits data until RUNTIME seconds have elapsed or until a transmission error occurs.
ser_wt receives data until RUNTIME seconds have elapsed or until an reception error occurs.
- -b baudrate
- Baud rate. This must be one of the baud rates specified for CBAUD in the termio(7I) man page, such as 38400 or 76800.
- -d devicename
- Device for communication. Use a full path for devicename. Dialout device paths typically start with /dev/cua/.
About 4 hours
No other concurrent tests are possible on the devicename port.
If:
- Receiver device is /dev/cua/a
- Transmitter device is /dev/cua/b
- Receiver baud rate is 38400
- Transmitter baud rate is 38400
Then, on the receiver side:
# ser_rd -d /dev/cua/a -b 38400 # ser_wt -d /dev/cua/a -b 38400On the transmitter side:
# ser_wt -d /dev/cua/b -b 38400 (to test serial I/O write function)
# ser_rd -d /dev/cua/b -b 38400 (to test serial I/O read function)Note: The receiver device and the transmitter device must be on different machines, but they must be physically connected.
termio(7I)
Copyright 2005 Sun Microsystems, Inc. All rights reserved.