CTP, is a frame-based custom transport protocol implemented in pure C. This project simulates reliable serial communication over virtual or real serial ports, including frame creation, CRC error detection, and ACK/NACK based retransmission.
| Protocol Feature | CAP Implementation |
|---|---|
| Frame Structure | Each frame has preamble, sequence number, payload, and CRC |
| CRC Error Detection | Detects transmission errors using binary CRC |
| ACK/NACK Reliability | Receiver sends ACK/NACK; sender retransmits if needed |
| Virtual Serial Communication | Uses socat to simulate connected serial ports |
| Termios Integration | Configures serial ports, baud rate, character size, and blocking mode |
| Simple Data Transfer | Send arbitrary payloads reliably over serial |
- GCC / C compiler
- Unix-based OS (Linux, macOS)
socat(for virtual serial port testing)make
cd ctp
socat -d -d pty,raw,echo=0,link=/tmp/sender pty,raw,echo=0,link=/tmp/receiver
make
make run-receiver
make run-senderReadmore here: CTP Blog
We ❤️ contributors!
To contribute:
- Fork the repository.
- Clone it locally:
git clone [repo] cd ctp git checkout -b feature/my-improvement
@Meerthika

