---
title: "ESP32 OTA Firmware Update via W5500 Ethernet Module"
url: "https://maker.wiznet.io/sophia/projects/esp32-ota-firmware-update-via-w5500-ethernet-module/"
markdown_url: "https://maker.wiznet.io/sophia/projects/esp32-ota-firmware-update-via-w5500-ethernet-module/md"
type: "UCC: User Created Content"
author: "Nadia Wartiningrum"
author_url: "https://nadiawaa.medium.com/esp32-ota-ethernet-198083699192"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Nadia Wartiningrum"
original_url: "https://nadiawaa.medium.com/esp32-ota-ethernet-198083699192"
published: "2025-10-28"
language: "en"
hardware: ["Espressif ESP32", "WIZnet W5500"]
likes: 0
views: 1086
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# ESP32 OTA Firmware Update via W5500 Ethernet Module

> Perform secure OTA firmware updates on ESP32 over LAN using WIZnet W5500 Ethernet—no WiFi or USB needed, ideal for IoT and industrial devices.

Original author: Nadia Wartiningrum (source: https://nadiawaa.medium.com/esp32-ota-ethernet-198083699192)

## Components

- **Espressif ESP32** x 1 ([docs](https://www.espressif.com/en/products/socs/esp32))
- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Article

**Hardware Components**:

- ESP32 development board (e.g., ESP32-DevKit)

- Ethernet controller/module (e.g., WIZnet W5500 or compatible Ethernet shield)

- RJ-45 Ethernet cable + network connection

- Power supply to ESP32 and Ethernet module

- (Optional) SPI or other interface wiring if the Ethernet module connects via SPI

**Project Overview**:
This project demonstrates how to perform **Over-The-Air (OTA) firmware updates** on an **ESP32 development board** using the **WIZnet W5500 Ethernet module**, without relying on Wi-Fi or USB connections.
The main objective is to enable **stable and secure firmware updates** in environments where Wi-Fi connectivity is unavailable or unreliable—such as industrial or commercial IoT deployments.

By using **Ethernet-based OTA**, devices can download new firmware directly via a wired LAN connection.
This eliminates the need for on-site maintenance or manual updates, reducing downtime and operational costs.

### Technical Description

![](https://miro.medium.com/v2/resize:fit:724/1*wCRAk4Svc2prPjm8PAK6Cw.png)

The core of this implementation is based on a **Dual Bank Flash Structure**, which allows the device to store two firmware images in separate memory partitions.
Here’s how the update process works:

**Current Firmware Execution (Bank A)**
The device continues normal operation with the existing firmware while remaining connected to the Ethernet network via W5500.

**Firmware Download (Bank B)**
The new firmware is securely downloaded through the Ethernet interface and written to the unused flash partition (Bank B).
During this process, the device remains fully operational.

**Integrity Verification**
After the download, the system validates the new firmware image using CRC or SHA checksum verification to ensure data integrity.

**Bootloader Switching & Reboot**
Once verified, the bootloader switches the active partition from Bank A to Bank B and restarts the system to load the new firmware.

**Rollback Mechanism**
If the new firmware fails to boot, the bootloader automatically reverts to the previous version (Bank A), ensuring system stability.

This design ensures **non-disruptive and fail-safe updates**, which is critical in remote or industrial applications.
The W5500 module handles TCP/IP offload functions, providing reliable Ethernet connectivity and reducing MCU load during OTA communication.

### Benefits & Applications

- **High Reliability:** Update firmware without Wi-Fi dependency or manual access.

- **Safety Assurance:** Automatic rollback in case of update failure.

- **Operational Efficiency:** Remote maintenance reduces cost and downtime.

- **Industrial Ready:** Ideal for factories, automation systems, retail devices, and smart infrastructure.

ESP32 보드와 W5500 등 이더넷 모듈을 이용해 유선 LAN 환경에서 USB나 WiFi 없이도 펌웨어 OTA 업데이트를 구현하는 튜토리얼입니다.

**하드웨어 구성요소**:

- ESP32 개발보드 (예: ESP32-DevKit)

- 이더넷 컨트롤러/모듈 (예: WIZnet W5500 또는 호환 Ethernet 실드)

- RJ-45 이더넷 케이블 + 네트워크 연결

- ESP32 및 이더넷 모듈에 전력 공급

- (선택) SPI 등 인터페이스 배선: 이더넷 모듈이 SPI 방식일 경우

**프로젝트 전체 설명**:
이 프로젝트는 **WIZnet의 W5500 이더넷 모듈**을 이용해 **ESP32 개발보드의 펌웨어를 유선 LAN 환경에서 OTA(Over-The-Air)로 업데이트**하는 방법을 구현한 사례입니다.
Wi-Fi가 불안정하거나 사용할 수 없는 환경에서도, **USB 연결 없이** 안정적이고 안전하게 펌웨어를 원격으로 교체할 수 있도록 설계되었습니다.

이를 통해 설치된 디바이스가 **유선 네트워크만으로 원격 업데이트가 가능**하며, 산업 현장이나 공공 인프라 등에서도 유지보수 효율을 크게 향상시킬 수 있습니다.

**핵심 기술 **

![](https://miro.medium.com/v2/resize:fit:724/1*wCRAk4Svc2prPjm8PAK6Cw.png)

본 구현의 핵심은 듀얼 뱅크 플래시 구조(Dual Bank Flash Structure)입니다.
플래시 메모리를 두 개의 영역으로 나누어, 한쪽은 현재 실행 중인 펌웨어를 유지하고 다른 한쪽은 새로운 펌웨어를 다운로드하는 구조입니다.

**현재 펌웨어 실행 (Bank A)**
W5500을 통해 LAN에 연결된 상태에서 기존 펌웨어가 계속 동작합니다.

**새 펌웨어 다운로드 (Bank B)**
OTA 서버로부터 새 펌웨어 이미지를 이더넷을 통해 수신하여 다른 영역(Bank B)에 저장합니다.

**무결성 검증**
CRC 또는 SHA 해시를 사용하여 새 펌웨어가 손상되지 않았는지 확인합니다.

**부트로더 전환 및 재부팅**
검증이 완료되면 부트로더가 Bank B를 활성화하고 시스템을 재부팅하여 새 펌웨어로 부팅합니다.

**자동 롤백 기능**
새 펌웨어 실행 실패 시 자동으로 이전 버전(Bank A)으로 복귀하여 안정성을 보장합니다.

W5500 모듈은 하드웨어 기반 TCP/IP 오프로딩을 수행하므로, MCU의 부하를 줄이고 OTA 데이터 전송의 안정성을 확보할 수 있습니다.

### 기대 효과 및 응용 분야

- **무중단 업데이트**: 동작 중에도 펌웨어 다운로드 가능

- **안전성 강화**: 실패 시 자동 복귀로 장치 보호

- **유지보수 효율 향상**: 현장 방문 없이 원격 업데이트 가능

- **산업용 환경 적합성**: 공장, 빌딩, 스마트 리테일 등에서 안정적 운영

---

Source: https://maker.wiznet.io/sophia/projects/esp32-ota-firmware-update-via-w5500-ethernet-module/
