---
title: "ESP32-Wiznet-W5500-SSL-Micropython"
url: "https://maker.wiznet.io/Grace_Koo/projects/esp32-wiznet-w5500-ssl-micropython/"
markdown_url: "https://maker.wiznet.io/Grace_Koo/projects/esp32-wiznet-w5500-ssl-micropython/md"
type: "UCC: User Created Content"
author: "Grace"
author_url: "https://maker.wiznet.io/Grace_Koo/"
original_author: "Grace Koo"
original_url: "https://github.com/Ayyoubzadeh/ESP32-Wiznet-W5500-SSL-Micropython.git"
published: "2025-10-29"
language: "en"
tags: ["MicroPython", "ESP32", "W5500"]
hardware: ["WIZnet W5500", "Espressif ESP32"]
likes: 0
views: 1930
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# ESP32-Wiznet-W5500-SSL-Micropython

> ESP32-Wiznet-W5500-SSL-Micropython

Original author: Grace Koo (source: https://github.com/Ayyoubzadeh/ESP32-Wiznet-W5500-SSL-Micropython.git)

## Components

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

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/))

## Documents and links

- [ESP32-Wiznet-W5500-SSL-Micropython.git](https://github.com/Ayyoubzadeh/ESP32-Wiznet-W5500-SSL-Micropython.git) (code)

## Article

## Overview

The ESP32 is a widely adopted IoT platform thanks to its built-in Wi-Fi connectivity.
However, in industrial or security-sensitive environments, Wi-Fi connectivity may be restricted, unstable, or not permitted.

To address this, the WIZnet W5500 Ethernet controller can be connected to the ESP32 via SPI,
and the `sma_esp32_w5500_requests` library can be used in a MicroPython environment to enable wired HTTP networking.

This combination integrates the ESP32’s processing capability with the W5500’s hardware TCP/IP stack,
providing a stable and independent network interface.

## System Architecture

The overall architecture is illustrated below:

> **[ESP32 MCU]**
>
> └─ MicroPython Firmware
>
> └─ Python-level W5500 Driver
>
> └─ socketpool / sma_esp32_w5500_requests Module
>
> ↓
>
> **[SPI Bus]**
>
> ↓
>
> **[WIZnet W5500 Ethernet Controller]**
>
> └─ Hardware TCP/IP Engine (MAC + PHY)
>
> └─ RJ45 / Ethernet Port
>
> ↓
>
> **[Local Network / Internet]**

ESP32 runs the MicroPython runtime and acts as the SPI master.

W5500 performs TCP/IP processing entirely in hardware, ensuring reliable and deterministic network communication.

All data exchange occurs through the SPI interface, completely independent of the ESP32’s Wi-Fi stack.

## sma_esp32_w5500_requests.py

`sma_esp32_w5500_requests` is a MicroPython HTTP client library designed for SPI-based Ethernet interfaces such as the W5500.
It is derived from Adafruit’s **CircuitPython Requests** and ported specifically for the ESP32 environment.

### Key Components

| Class | Role |
| --- | --- |
| Session | Manages socket pooling and connection reuse |
| Response | Handles HTTP responses (status, headers, body, etc.) |
| _FakeSSLContext | Provides a mock SSL context for non-SSL hardware such as the W5500 |
| request(), get(), post() | Exposes a familiar `requests`-style API for HTTP operations |

This library enables HTTP communication without relying on the Wi-Fi stack.
Internally, it integrates with the `socketpool` and `wiznet5k` drivers to manage SPI-based network sessions between the ESP32 and W5500.

## Conclusion

By combining the ESP32 and W5500, developers can implement a stable, deterministic wired network interface in MicroPython —
without using Wi-Fi.

This architecture is particularly effective in industrial, security-restricted, or closed network environments.
It leverages the ESP32 for application logic and the W5500 for hardware-based TCP/IP processing,
resulting in an efficient and reliable communication stack.

`SMA_ESP32_W5500_Requests` provides a standardized HTTP request API for Ethernet communication in ESP32-based MicroPython systems,
and its modular structure allows easy porting to other MCUs such as RP2040 or STM32.

ESP32 handles control and logic, while
W5500 ensures robust hardware-level Ethernet connectivity —
forming an ideal combination for embedded IoT networking.

---

Source: https://maker.wiznet.io/Grace_Koo/projects/esp32-wiznet-w5500-ssl-micropython/
