Skip to content

TCP/UDP protocol performance with Python in Raspberry Pi 4 via Ethernet

License

Notifications You must be signed in to change notification settings

semanurbilada/tcp-udp-ethernet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icon icon

TCP / UDP Ethernet

Purpose

This project aims to measuring TCP/UDP protocol performance with Python in Raspberry Pi 4 via Ethernet connection.

  • TCP: Transmission Control Protocol
  • UDP: User Datagram Protocol

Features

  • Both TCP/UDP Client and Server
  • Performance Measurement: Latency - Throughput - Reliability

Prerequisites

  • Ethernet cable and Modem
  • Raspberry Pi 4 (4GB at least)
  • SD Card (32GB at least) and reader

Notes

  1. I initially tested with C-based implementations but did not achieve effective results.
    Therefore, I focused on Python-based UDP packet transmission.

Project Structure

The project follows this directory structure:

tcp-udp-ethernet/
├── client/
│   ├── tcp_client.py
│   ├── udp_client_packet.py
│   └── udp_client.py
│
├── server/
│   ├── tcp_server.py
│   ├── udp_server_packet.py
│   └── udp_server.py
│
├── test/
│   ├── test_client.c
│   └── test_server.c
│
├── .gitignore
├── LICENSE
├── README.md
└── requirements.txt
  • client/: Contains client side codes.
  • server/: Contains server side codes.
  • test/: Contains test codes written in C.
  • requirements.txt: Lists project dependencies.

Raspberry Pi

How To Run?

  1. Install dependencies:
pip install -r requirements.txt

or

pip3 install -r requirements.txt
  1. Run (example):
python3 tcp_server.py

and

python3 tcp_client.py

Licence

This project is licensed under the MIT License - see the LICENSE file for details.

References