Wiznet makers

viktor

Published April 21, 2026 ©

164 UCC

20 WCC

48 VAR

0 Contests

0 Followers

0 Following

Original Link

How to Add Wired LAN Transport with W5500 on M5Stack Cardputer-Adv?

Poseidon is keyboard-first firmware for the M5Stack Cardputer-Adv, built around an ESP32-S3. The project lists WIZnet W5500 as its SPI-to-Ethernet hardware hat

COMPONENTS Hardware components

WIZnet - W5500

x 1


PROJECT DESCRIPTION

Summary

Poseidon is keyboard-first firmware for the M5Stack Cardputer-Adv, built around an ESP32-S3 handheld interface for authorized lab testing, education, and network diagnostics. The project lists WIZnet W5500 as its SPI-to-Ethernet hardware hat, giving the platform a wired RJ45 LAN path alongside its built-in Wi-Fi features.

What the Project Does

Poseidon turns the M5Stack Cardputer-Adv into a compact field console with a display, keyboard, microSD storage, USB-C, Wi-Fi, BLE, and expansion-hat support. The README describes it as firmware for the ESP32-S3-based Cardputer-Adv with many feature groups across Wi-Fi, BLE, sub-GHz, 2.4 GHz RF, LoRa, IR, network utilities, USB-HID workflows, and local tools.

The useful architecture for this article is the expansion model. Poseidon supports several hardware hats one at a time: LoRa/GNSS, Hydra RF, an ESP32-C5 companion node, and W5500 SPI-to-Ethernet. TRIDENT is separate from the W5500 path: TRIDENT refers to the ESP32-C5 companion-node feature set for 5 GHz Wi-Fi and 802.15.4 functions, while W5500 is the wired RJ45 Ethernet option.

For a defensive or educational lab, the W5500 path makes Poseidon less dependent on Wi-Fi STA mode. A cable-connected interface is useful when the target environment is a wired LAN segment, when DHCP behavior needs to be observed from a physical Ethernet client, or when the device should behave like a small handheld LAN diagnostic endpoint rather than a wireless client.

What is M5Stack Cardputer

Source: M5Stack website

The Cardputer-Adv is a card-sized, versatile programmable platform powered by the Stamp-S3A module with ESP32-S3FN8 core processor. With its 1.14" LCD display and an intuitive 56-key keyboard, the Cardputer-Adv offers easy interaction and seamless command entry for a wide range of applications.

Where WIZnet Fits

The WIZnet product used in the project description is the W5500 Ethernet controller. In Poseidon’s architecture, it fits as the SPI-connected wired transport layer: the Cardputer-Adv provides the keyboard UI, display, storage, and control logic, while the W5500 hat provides the RJ45 Ethernet edge for LAN-oriented workflows. The README names this directly as “W5500 SPI → Ethernet” for wired RJ45 use over a LAN cable instead of Wi-Fi STA.

This is a practical match because W5500 is not just a PHY. It is a hardwired Internet controller with an integrated TCP/IP stack, SPI host interface up to 80 MHz, 10/100 Ethernet MAC/PHY, eight independent sockets, and 32 KB internal Tx/Rx buffer memory. Those features reduce the amount of software TCP/IP work the ESP32-S3 has to carry when the goal is straightforward wired Ethernet connectivity.

There is one important implementation caveat. The README declares W5500 hat support, but the inspected shared network helper code still uses WiFiClient for TCP and HTTP helpers. That means the current source evidence shows a clear integration target: Poseidon’s LAN features should be routed through a transport abstraction that can select either Wi-Fi or W5500 Ethernet, instead of directly assuming WiFiClient everywhere.

Implementation Notes

The W5500 support is visible in the repository’s hardware-support description:

 
W5500 SPI → Ethernet — wired RJ45 for full RaspyJack / SaltyJack parity
... over a LAN cable instead of WiFi STA
 

File path: README.md
What it configures: It defines W5500 as the intended SPI Ethernet hat for Poseidon’s wired LAN path.
Why it matters: This separates the W5500 role from TRIDENT. TRIDENT extends the platform with an ESP32-C5 companion for radio functions, while W5500 extends the same handheld with cabled Ethernet transport.

The current shared TCP/HTTP helper still uses Wi-Fi sockets:

bool net_tcp_open(IPAddress ip, uint16_t port, uint32_t timeout_ms) {
    WiFiClient c;
    if (!c.connect(ip, port, timeout_ms)) return false;
    c.stop();
    return true;
}
File path: src/net_helpers.cpp
What it configures: A common TCP-open helper using WiFiClient.
Why it matters: This is the clean integration seam for W5500. A W5500 implementation should avoid duplicating LAN features and instead replace direct WiFiClient dependence with a network-client abstraction that can use either Wi-Fi or Ethernet.

The platform configuration also shows why hats are realistic on this device:

; Keyboard on I2C frees GPIO 3/4/5/6/7/13/15 for hats
File path: platformio.ini
What it configures: Cardputer-Adv hardware assumptions and GPIO availability for expansion hats.
Why it matters: W5500 needs SPI plus chip select, reset, and optionally interrupt. Poseidon’s hat model already assumes expansion hardware is planned, but the final pin map must avoid conflict with SD, display, keyboard, and other hats.

Practical Tips / Pitfalls

  • Treat W5500 as a transport layer, not as a separate feature menu. The LAN tools should call shared TCP/UDP helpers, while the lower layer chooses Wi-Fi or Ethernet.
  • Plan SPI ownership carefully. W5500 requires SPI, chip select, reset, and optionally interrupt, and Poseidon’s other hats may also need shared buses or reserved pins.
  • Show Ethernet state in the UI before running LAN tools. Link up/down, DHCP result, local IP, gateway, and active transport should be visible to avoid confusing physical-link problems with software problems.
  • Budget W5500 sockets. The chip supports eight independent sockets, so concurrent scanners, listeners, and HTTP/TCP helpers need explicit socket discipline.
  • Keep W5500 and TRIDENT conceptually separate. TRIDENT is for ESP32-C5 companion-radio functions; W5500 is for wired RJ45 Ethernet.
  • Keep the use case authorized. The appropriate context is an owned lab, classroom, internal validation setup, or approved assessment network.

FAQ

Q: Why use W5500 in Poseidon?
A: W5500 gives the Cardputer-Adv a physical RJ45 Ethernet path through SPI, with hardwired TCP/IP handling, internal buffering, and eight sockets. For authorized LAN diagnostics, a cabled endpoint is often more predictable than Wi-Fi STA because it joins the same wired segment as ordinary Ethernet clients.

Q: How does W5500 connect to the Cardputer-Adv?
A: The project describes W5500 as an SPI-to-Ethernet hat. A practical implementation needs SPI signals plus chip select, reset, and optionally interrupt; the repository’s platformio.ini notes that the I2C keyboard frees several GPIOs for hats, but the inspected source does not provide a final W5500 pin map.

Q: What role does W5500 play in this project?
A: W5500 is the wired LAN transport option. It is not TRIDENT and it is not the ESP32-C5 companion node; it is the RJ45 Ethernet path intended for LAN workflows over a cable instead of Wi-Fi STA.

Q: Can beginners follow this project?
A: Beginners can understand the high-level hardware model, but W5500 integration is an intermediate embedded-networking task. It requires PlatformIO familiarity, ESP32-S3 pin planning, SPI wiring, Ethernet link/DHCP debugging, and enough C++ structure to replace direct WiFiClient usage with a selectable network transport.

Q: How does W5500 Ethernet compare with ESP32 Wi-Fi STA mode here?
A: ESP32 Wi-Fi STA mode is convenient because it uses the built-in radio, but it depends on association, signal quality, and wireless policy. W5500 Ethernet gives Poseidon a physical LAN endpoint, which is better suited for controlled wired-lab diagnostics, DHCP validation, and local network checks from an RJ45 client position.

Documents
Comments Write