---
title: "TCP/UDP Interface for SP2302 + W5500"
url: "https://maker.wiznet.io/sophia/projects/tcp-udp-interface-for-sp2302-w5500/"
markdown_url: "https://maker.wiznet.io/sophia/projects/tcp-udp-interface-for-sp2302-w5500/md"
type: "UCC: User Created Content"
author: "SecurePi"
author_url: "https://www.hackster.io/securepi1905/tcp-server-tcp-client-and-udp-in-sp2302-with-w5500-070297?utm_source=chatgpt.com"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "SecurePi"
original_url: "https://www.hackster.io/securepi1905/tcp-server-tcp-client-and-udp-in-sp2302-with-w5500-070297?utm_source=chatgpt.com"
published: "2025-07-23"
language: "en"
hardware: ["WIZnet WIZ850io"]
likes: 0
views: 1181
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# TCP/UDP Interface for SP2302 + W5500

> A practical example of connecting the WIZnet W5500 Ethernet module to the SP2302 SBC using SPI to implement a full TCP server/client and UDP socket interface.

Original author: SecurePi (source: https://www.hackster.io/securepi1905/tcp-server-tcp-client-and-udp-in-sp2302-with-w5500-070297?utm_source=chatgpt.com)

## Components

- **WIZnet WIZ850io** x 1 ([docs](https://docs.wiznet.io/Product/ioModule/WIZ850io))

## Article

**Description**
This project demonstrates how to add a stable Ethernet interface to the SP2302 SBC using the WIZnet W5500 Ethernet chip via the WIZ850io module over SPI. The implementation enables full TCP server/client and UDP socket communication on a Linux-based system. By configuring the W5500 as a secondary Ethernet interface (`eth1`) through Netplan and Python socket programming, the system becomes capable of wired communication alongside built-in Wi-Fi (`eth0`). This makes the project ideal for industrial gateways, embedded device controllers, and IoT edge nodes that require multi-protocol networking. The entire setup is reproducible and lightweight, and shows how WIZnet hardware can bring Ethernet capability to platforms without a native MAC/PHY.

**Main Components**

- SP2302 SBC (Arm Cortex-A53 SoC)

- WIZnet WIZ850io (W5500-based Ethernet module)

- Ubuntu 22.04

- Python (for TCP/UDP socket communication)

- Netplan for network configuration

- SPI interface via /dev/spidev

**Key Features**

- Adds full-duplex SPI-based Ethernet (`eth1`) to SBC

- Supports TCP server, TCP client, and UDP socket

- Lightweight, reliable networking without native Ethernet

- Python-based example code for rapid prototyping

- Dual-interface setup (Wi-Fi + Ethernet)

**Target Use Cases**

- Industrial IoT gateways

- Embedded Ethernet controllers

- Device-to-device socket communication

- Network resilience via wired fallback

**Difficulty**
Intermediate – Familiarity with Linux networking, Python sockets, and SPI device setup is recommended.

---

Source: https://maker.wiznet.io/sophia/projects/tcp-udp-interface-for-sp2302-w5500/
