A simple Rust program to forward stdin to a serial port and the serial port's output to stdout in real-time. It also logs all files to log file located in current directory.
- Serial port forwarding: Data from
stdinis sent to the serial port, and data from the serial port is sent tostdout. - Logging: All communication is saved to a file for later inspection.
- Rust installed on your system.
- Access to the serial port device.
-
Clone the repository and navigate to the project directory:
-
Build the program:
cargo build --release
-
Run the executable with the following arguments:
./target/release/serial-forwarder <port> <baud_rate>
For example:
./target/release/serial-forwarder /dev/ttyUSB0 115200
<port>: The serial port to communicate with (e.g.,/dev/ttyUSB0on Linux).<baud_rate>: The baud rate for the serial communication (e.g.,9600,115200).