The first lab of RCOM 2026/27 at FEUP, done with Carlos Diogo. We wrote a
C program that sends a file over an RS-232 serial link between two machines, using stop-and-wait ARQ.
The application layer splits the file into DATA packets between START and END packets. The link layer sends each packet in an I-frame with byte stuffing and an XOR check. The receiver answers with RR to accept a frame or REJ to ask for it again. Sequence numbers alternate between 0 and 1 to catch duplicates. A DATA packet carries up to 997 file bytes. The timeout is four seconds with three retries.
A Python runner starts the supplied virtual cable and both programs, then compares the received file with the original. We used it to measure efficiency while changing the baud rate, frame size, propagation delay and frame error rate, and compared the results with a stop-and-wait model. The report is written in
Typst.
Results
$ ls ~/socials
or type socials in the tty