---
title: "STM32-Serial-to-Ethernet-Converter"
url: "https://maker.wiznet.io/irina/projects/stm32-serial-to-ethernet-converter/"
markdown_url: "https://maker.wiznet.io/irina/projects/stm32-serial-to-ethernet-converter/md"
type: "UCC: User Created Content"
author: "vorun"
author_url: "https://github.com/vorun/STM32-Serial-to-Ethernet-Converter"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "vorun"
original_url: "https://github.com/vorun/STM32-Serial-to-Ethernet-Converter"
published: "2025-11-27"
language: "en"
likes: 0
views: 1456
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# STM32-Serial-to-Ethernet-Converter

> An STM32F103 + W5500–based UART-to-TCP bridge that acts like an open-source USR-TCP232 module, enabling transparent Serial ⇄ Ethernet communication.

Original author: vorun (source: https://github.com/vorun/STM32-Serial-to-Ethernet-Converter)

## Article

## 👤AUTHOR

**vorun**
An embedded systems developer focused on STM32, low-level peripheral programming, bare-metal drivers, and lightweight network stacks.
He builds educational microcontroller projects, custom bootloaders, and minimal network gateways using pure C and open hardware tools.

🔗 GitHub: <https://github.com/vorun/STM32-Serial-to-Ethernet-Converter>

---

## 🎯PROJECT DESCRIPTION

This project implements a **Serial-to-Ethernet Converter** that bridges RS232, RS485, and CAN communication to **Ethernet TCP** using:

- **STM32F103C8T6 (Blue Pill)**

- **WIZnet W5500 (Hardware TCP/IP Ethernet Controller)**

The device works as a transparent **Serial ⇄ TCP gateway**—similar to industrial devices like USR-TCP232—allowing legacy serial devices to be accessed remotely over a network.

Compared to software-based ENC28J60 designs, the **W5500 drastically improves performance, reliability, and reduces MCU load** by handling TCP/IP in hardware.

![](https://maker.wiznet.io/upload/ckeditor5/201742316%5F1765464779%2Epng)

---

## 🧩COMPONENTS

#### 🧠 Hardware

- STM32F103C8T6 development board

- RS232 (5V level, USART1)

- **RS485 (3.3V, USART2)**

- **CAN (5V, CAN peripheral)**

- WIZnet W5500 Ethernet Controller (SPI1)

### 🧰 SYSTEM OVERVIEW

```css
    [TCP Client: PC / Server / Application]
            ↑       ↓
      Ethernet (TCP/IP)
            ↑
    WIZnet W5500 Ethernet
            ↑  SPI
     STM32F103 MCU
            ↑  UART
      Serial Device (Sensor/MCU)
```

The STM32 simply reads/writes socket buffers via SPI,
while the **W5500** handles TCP/IP packetization and link management.

This ensures:

- deterministic latency

- low CPU overhead

- stable operation under heavy traffic

![](https://maker.wiznet.io/upload/ckeditor5/201742316%5F1765463949%2Epng)

## ✔ KEY FEATURES

#### 🔹 Multi-Protocol Serial Support

- RS232 (DB-9)

- RS485 (3.3V differential)

- CAN (5V transceiver)
  All mapped to Ethernet TCP.

#### 🔹 Transparent Serial Bridge

Data passes between TCP client and serial port without modification:

- TCP → UART

- UART → TCP

This makes it compatible with:

- PLCs

- sensors

- CNC controllers

- industrial monitors

- legacy devices

---

## 🧪USE CASES

- Industrial PLC Ethernet integration

- Remote serial port server

- SCADA / HMI communication

- CNC machine networking

- CAN-bus monitoring over LAN

- Legacy equipment modernization

---

📌 This UCC focuses on the hardware capabilities of the design. The original project provides **hardware resources only**—no official firmware or ready-to-use software stack is included. Users are expected to build their own S2E firmware or integrate custom communication protocols using STM32 and the W5500.

---

---

Source: https://maker.wiznet.io/irina/projects/stm32-serial-to-ethernet-converter/
