MCM_GitHub_OTA
MCM_GitHub_OTA
📌 Overview
MCM_GitHub_OTA는 ESP32 장치가 GitHub Releases에 올려진 새 펌웨어를 원격으로 내려받아 자동 업데이트하도록 만든 OTA 라이브러리입니다. 핵심은 단순 OTA 구현이 아니라, Wi-Fi와 Ethernet(W5500 via SPI)을 모두 지원하고, GitHub API 조회는 정상인데 CDN 인증서 체인 문제로 바이너리 다운로드가 실패하는 상황까지 고려한 지연형 fallback 구조를 넣었다는 점입니다.
이 프로젝트가 해결하는 문제는 분명합니다. 현장에 배포된 ESP32 기반 장비를 USB 재플래시 없이 유지보수해야 하는데, 일반적인 OTA 예제는 네트워크 경로 변화, 인증서 갱신, 유선/무선 이중화 같은 실제 운영 조건을 충분히 다루지 못합니다. 이 라이브러리는 그 간극을 메우는 방향으로 설계되어 있습니다.
📌 Features
이중 네트워크 지원
Wi-Fi와 W5500 Ethernet을 함께 지원하며, 활성 인터페이스를 자동 선택합니다. 현장에서는 유선 우선, 무선 백업 같은 운영 전략으로 연결 안정성을 높일 수 있습니다.
GitHub Releases 기반 배포
GitHub API에서 최신 릴리스 태그와 .bin 자산을 찾아 업데이트합니다. 별도 OTA 서버를 직접 운영하지 않고도 배포 파이프라인을 단순화할 수 있습니다.
보안 연결 + 인증서 관리 구조
SSLClient, BearSSL, Trust Anchor 기반으로 GitHub 서버 신뢰성을 검증하도록 설계되었습니다. 즉, 기본 동작은 HTTPS 검증을 전제로 합니다.
“Late Fallback” 복구 로직
API 연결은 성공했지만 CDN 다운로드 단계에서 인증서 문제로 실패하면, 해당 다운로드 세션에 한해 insecure mode로 재시도합니다. 이 부분이 이 프로젝트의 가장 큰 기술적 차별점입니다. 단, 이 fallback은 운영 안정성에는 유리하지만, 보안 정책이 엄격한 제품에서는 적용 범위를 분명히 제한해야 합니다.
사설 저장소 지원
GitHub Personal Access Token을 사용해 private repository도 다룰 수 있어, 내부 제품 펌웨어 배포 구조로 확장할 여지가 있습니다.
📌 System Architecture
기본 구성
- MCU: ESP32
- 유선 네트워크 칩: WIZnet W5500
- 무선 백업 경로: ESP32 내장 Wi-Fi
- 원격 서버: GitHub API + GitHub Release Asset CDN
- 저장 영역: ESP32 OTA 파티션(
ota_0,ota_1,otadata)
데이터 흐름
- 장치가 현재 네트워크 상태를 확인합니다.
- Ethernet이 활성 상태이면 W5500 경로를 우선 사용하고, 그렇지 않으면 Wi-Fi를 사용합니다.
- GitHub API에 HTTPS로 접속해 최신 release tag와 asset 정보를 읽습니다.
- 새 버전이 확인되면 release asset의
.bin파일을 다운로드합니다. - ESP32 OTA 영역에 새 이미지를 기록하고, 성공 시 재부팅 후 새 펌웨어로 전환합니다.
- ESP-IDF OTA 구조상, 이 과정은 최소 2개의 OTA 슬롯과 OTA data partition을 전제로 하며, 업데이트 후 다음 부팅 슬롯이 갱신됩니다.
📌 Role and Application of the WIZnet's Chip
사용된 WIZnet 칩 : W5500
네트워크에서의 역할
- W5500은 ESP32에 유선 Ethernet 연결을 제공하는 역할을 합니다.
- 이 프로젝트에서는 W5500이 단순 로컬 통신이 아니라, GitHub API 조회와 release asset 다운로드를 위한 OTA 데이터 전송 경로로 사용됩니다. 프로토콜 관점에서는 최종적으로 TCP/IP 기반 HTTPS(HTTP over TLS) 경로에 참여합니다. 라이브러리 설명상 GitHub API 조회, 바이너리 다운로드, 버전 비교, OTA 적용 흐름 전체에 Ethernet 경로가 포함됩니다.
📌 Market & Application Value
적용 가능한 산업 및 시장
- 산업 자동화 / 설비 제어
- 현장 장비는 한 번 설치되면 물리 접근이 어렵습니다. 원격 펌웨어 업데이트 수요가 분명합니다.
- 스마트 빌딩 / 게이트웨이 장비
- Ethernet 백본 환경에서 ESP32 기반 보조 제어기나 센서 허브를 운영하는 경우 적합합니다.
- 에너지 모니터링 / 원격 계측
- 설치 후 지속적 기능 개선과 버그 수정이 필요한 저전력 임베디드 장비에 맞습니다.
- 소형 OEM 장치
- 별도 OTA 서버를 운영하기 어려운 소규모 제조사에게 GitHub Release 기반 구조는 초기 도입 비용이 낮습니다.
📌 External Indicators
GitHub 저장소 반응
- 공개 저장소 기준 Star 2, Fork 0, Issues 0, Releases 5, 최신 릴리스 v0.0.5(2026-03-04)로 확인됩니다. 커밋 수는 57개로 조회됩니다. 즉, 코드베이스는 계속 다듬어졌지만 외부 확산 규모는 아직 작습니다.
PlatformIO Registry 등록
- 해당 라이브러리는 PlatformIO 공식 Registry에 등록되어 있으며, 이는 단순 코드 공개를 넘어 패키지화된 배포 가능한 라이브러리 상태임을 의미합니다.
- PlatformIO는 임베디드 개발자가 실제 프로젝트에서 라이브러리를 설치·사용하는 환경이므로, 등록 자체가 실제 사용 가능성과 개발자 접근성 확보를 나타냅니다.
Link : https://registry.platformio.org/libraries/mcmchris/MCM_GitHub_OTA
Arduino 생태계 등재
- Arduino Libraries 사이트에 Contributed 라이브러리로 등재되어 있으며,
MCM_GitHub_OTA-0.0.1.zip의 등록 이력이 확인됩니다. 이는 개인 저장소를 넘어서 라이브러리 유통 채널에 편입되기 시작했다는 신호로 볼 수 있습니다.
Link : https://www.arduinolibraries.info/libraries/mcm_git-hub_ota
📌 WIZnet Strategic Value
WIZnet Maker 생태계 관점의 의미
- 이 사례는 W5500을 단순 Ethernet 접속 칩으로 소개하는 수준을 넘어, 원격 펌웨어 유지보수와 라이프사이클 관리라는 더 상위의 가치로 연결합니다. 즉, “WIZnet 칩을 쓰면 연결된다”가 아니라, **“배포 후 운영까지 관리할 수 있다”**는 메시지를 줄 수 있습니다.
다른 고객·개발자에게 주는 메시지
- W5500은 단순 TCP/UDP 예제용 칩이 아니라 안정적인 OTA 운용 경로로도 쓸 수 있습니다.
- ESP32 + W5500 조합은 Wi-Fi가 불안정한 환경에서도 유선 기반 업데이트 구조를 만들 수 있습니다.
- GitHub Release를 활용하면 소규모 팀도 가벼운 OTA 배포 체계를 시작할 수 있습니다.
📌 Summary
이 프로젝트는 ESP32 기반 장치에서 GitHub Releases를 활용한 OTA 업데이트를 구현하면서, Wi-Fi와 W5500 Ethernet을 함께 사용하는 이중 네트워크 구조와 실제 운영 환경에서 발생할 수 있는 인증서 문제까지 고려한 복구 로직을 포함한 것이 특징입니다. 특히 W5500을 안정적인 유선 OTA 전송 경로로 활용함으로써 WIZnet 칩의 역할을 단순 통신을 넘어 원격 유지보수 인프라로 확장한 사례로 볼 수 있습니다. 외부 확산은 아직 제한적이지만, 구조적으로 재사용성과 확장성이 높아 향후 WIZnet Maker 생태계에서 실용적인 레퍼런스로 활용될 수 있는 의미 있는 프로젝트입니다.
📌 FAQ
- MCM_GitHub_OTA는 무엇인가요?
MCM_GitHub_OTA는 ESP32 장치가 GitHub Releases에 업로드된 최신 펌웨어를 자동으로 다운로드하고 업데이트할 수 있도록 지원하는 OTA 라이브러리입니다. Wi-Fi와 W5500 Ethernet을 동시에 지원하는 것이 특징입니다. - ESP32 OTA 업데이트에 W5500 Ethernet을 사용하는 이유는 무엇인가요?
W5500은 안정적인 유선 네트워크 연결을 제공하여 Wi-Fi가 불안정한 환경에서도 신뢰성 높은 OTA 업데이트를 가능하게 합니다. - GitHub Releases를 OTA 서버로 사용할 수 있나요?
네, GitHub Releases의 .bin 파일을 활용하여 별도의 OTA 서버 없이도 펌웨어 배포 및 업데이트가 가능합니다. - Wi-Fi와 Ethernet을 동시에 사용할 수 있나요?
가능합니다. 이 라이브러리는 두 네트워크를 모두 지원하며, Ethernet이 우선적으로 사용되고 필요 시 Wi-Fi로 자동 전환됩니다. - OTA 중 인증서 오류가 발생하면 어떻게 되나요?
기본적으로 HTTPS 인증을 수행하지만, CDN 다운로드 단계에서 인증서 문제가 발생하면 해당 세션에 한해 insecure 모드로 재시도하는 fallback 로직이 적용됩니다. - 이 fallback 방식은 보안상 안전한가요?
운영 안정성에는 도움이 되지만, 보안이 중요한 환경에서는 fallback 사용 범위를 제한하거나 비활성화하는 것이 권장됩니다. - Private GitHub 저장소도 지원하나요?
네, GitHub Personal Access Token을 사용하면 private repository의 릴리스도 OTA 업데이트에 활용할 수 있습니다. - ESP32 OTA를 위해 필요한 파티션 구조는 무엇인가요?
최소 2개의 OTA 슬롯(ota_0, ota_1)과 otadata 파티션이 필요하며, 업데이트 후 부팅 슬롯이 자동으로 전환됩니다. - 이 프로젝트는 어떤 산업 분야에 적합한가요?
산업 자동화, 스마트 빌딩, 에너지 모니터링, 원격 계측 등 물리적 접근이 어려운 장비의 유지보수에 적합합니다. - WIZnet W5500의 주요 역할은 무엇인가요?
W5500은 ESP32에 유선 Ethernet 연결을 제공하며, GitHub API 통신과 펌웨어 다운로드를 포함한 OTA 전체 데이터 경로에서 핵심적인 역할을 합니다.
📌 Overview
MCM_GitHub_OTA is an OTA library designed to allow ESP32 devices to remotely download new firmware uploaded to GitHub Releases and update automatically. The key point is not just a simple OTA implementation, but that it supports both Wi-Fi and Ethernet (W5500 via SPI), and incorporates a delayed fallback mechanism that accounts for situations where GitHub API queries succeed but binary downloads fail due to CDN certificate chain issues.
The problem this project solves is clear. ESP32-based devices deployed in the field need to be maintained without USB reflashing, but typical OTA examples do not adequately handle real-world operational conditions such as network path changes, certificate renewals, or wired/wireless redundancy. This library is designed to bridge that gap.
📌 Features
Dual Network Support
Supports both Wi-Fi and W5500 Ethernet, automatically selecting the active interface. In real-world deployments, connection stability can be improved through strategies such as prioritizing wired connections with wireless as backup.
GitHub Releases-Based Deployment
Updates are performed by retrieving the latest release tag and .bin assets from the GitHub API. This simplifies the deployment pipeline by removing the need to operate a separate OTA server.
Secure Connection + Certificate Management Structure
Designed to verify the trustworthiness of GitHub servers based on SSLClient, BearSSL, and Trust Anchors. In other words, HTTPS verification is the default behavior.
“Late Fallback” Recovery Logic
If the API connection succeeds but the CDN download fails due to certificate issues, the system retries the download in insecure mode only for that session. This is the most distinctive technical feature of the project. However, while this fallback improves operational reliability, its scope should be clearly restricted in products with strict security policies.
Private Repository Support
By using a GitHub Personal Access Token, private repositories can also be handled, allowing the system to be extended for internal firmware distribution.
📌 System Architecture
Basic Configuration
- MCU: ESP32
- Wired network chip: WIZnet W5500
- Wireless backup path: Built-in Wi-Fi on ESP32
- Remote server: GitHub API + GitHub Release Asset CDN
- Storage: ESP32 OTA partitions (ota_0, ota_1, otadata)
Data Flow
- The device checks its current network status.
- If Ethernet is active, it prioritizes the W5500 path; otherwise, it uses Wi-Fi.
- It connects to the GitHub API over HTTPS to retrieve the latest release tag and asset information.
- If a new version is detected, it downloads the .bin file from the release assets.
- The new image is written to the ESP32 OTA partition, and upon success, the device reboots and switches to the new firmware.
📌 Role and Application of the WIZnet's Chip
WIZnet Chip Used: W5500
Role in Networking
- The W5500 provides a wired Ethernet connection to the ESP32.
- In this project, it is not limited to simple local communication but is used as the OTA data transmission path for GitHub API queries and release asset downloads. From a protocol perspective, it ultimately participates in a TCP/IP-based HTTPS (HTTP over TLS) communication path. According to the library design, the Ethernet path is involved throughout the entire flow, including GitHub API queries, binary downloads, version comparison, and OTA application.
📌 Market & Application Value
Applicable Industries and Markets
- Industrial Automation / Equipment Control
- Once deployed, field equipment is difficult to access physically. There is a clear demand for remote firmware updates.
📌 External Indicators
GitHub Repository Activity
- As of the public repository status, it has 2 stars, 0 forks, 0 issues, and 5 releases, with the latest release being v0.0.5 (2026-03-04). The total number of commits is 57. This indicates that while the codebase has been continuously refined, its external adoption and visibility are still relatively limited.
PlatformIO Registry 등록
- This library is registered in the official PlatformIO Registry, which means it is not just publicly available code but a packaged, distributable library.
- Since PlatformIO is an environment where embedded developers install and use libraries in real projects, this registration indicates practical usability and accessibility for developers.
Link : https://registry.platformio.org/libraries/mcmchris/MCM_GitHub_OTA
Arduino Ecosystem Listing
- The library is listed as a contributed library on the Arduino Libraries site, with a registration history for MCM_GitHub_OTA-0.0.1.zip. This can be seen as a signal that it is beginning to move beyond a personal repository and enter broader library distribution channels.
Link : https://www.arduinolibraries.info/libraries/mcm_git-hub_ota
📌 WIZnet Strategic Value
Implications from the WIZnet Maker Ecosystem Perspective
- This case goes beyond presenting the W5500 as a simple Ethernet connectivity chip and connects it to a higher-level value of remote firmware maintenance and lifecycle management. In other words, instead of the message “WIZnet chips enable connectivity,” it conveys that “they enable post-deployment operation and management.”
Key Messages for Other Customers and Developers
- The W5500 is not just for basic TCP/UDP examples; it can also serve as a reliable path for OTA operations.
- The ESP32 + W5500 combination enables a wired-based update architecture even in environments where Wi-Fi is unstable.
- By leveraging GitHub Releases, even small teams can establish a lightweight OTA deployment system.
📌 Summary
This project implements OTA updates using GitHub Releases on ESP32-based devices, featuring a dual-network architecture that utilizes both Wi-Fi and W5500 Ethernet, along with recovery logic that accounts for certificate-related issues that may occur in real-world operating environments. In particular, by leveraging the W5500 as a stable wired OTA transmission path, it demonstrates an expansion of the WIZnet chip’s role beyond simple communication into remote maintenance infrastructure. Although external adoption is still limited, the design shows high reusability and scalability, making it a meaningful project that could serve as a practical reference within the WIZnet Maker ecosystem in the future.
📌 FAQ (English)
- What is MCM_GitHub_OTA?
MCM_GitHub_OTA is an OTA library that enables ESP32 devices to automatically download and update firmware from GitHub Releases, supporting both Wi-Fi and W5500 Ethernet. - Why use W5500 Ethernet for ESP32 OTA updates?
The W5500 provides a stable wired connection, ensuring reliable OTA updates even in environments where Wi-Fi is unstable. - Can GitHub Releases be used as an OTA server?
Yes, firmware binaries uploaded to GitHub Releases can be used for OTA updates without requiring a dedicated OTA server. - Does it support both Wi-Fi and Ethernet simultaneously?
Yes, the library supports dual networking. Ethernet is prioritized, and Wi-Fi is used as a fallback when needed. - What happens if a certificate error occurs during OTA?
If HTTPS validation fails during CDN download, the library retries the download in insecure mode for that session using a late fallback mechanism. - Is the fallback mechanism secure?
While it improves reliability, it may reduce security. It should be carefully controlled or disabled in security-critical deployments. - Does it support private GitHub repositories?
Yes, by using a GitHub Personal Access Token, OTA updates can be performed from private repositories. - What partition structure is required for ESP32 OTA?
At least two OTA partitions (ota_0 and ota_1) and an otadata partition are required for proper OTA functionality. - What are the typical use cases for this project?
It is suitable for industrial automation, smart buildings, energy monitoring, and remote devices that require reliable firmware updates. - What is the role of the WIZnet W5500 in this architecture?
The W5500 provides wired Ethernet connectivity and is responsible for handling OTA data transmission, including GitHub API requests and firmware downloads.

