Wiznet makers

viktor

Published May 13, 2026 ©

164 UCC

20 WCC

48 VAR

0 Contests

0 Followers

0 Following

Original Link

CroPDUster: Open-Source Network-Attached PDU Control with WIZnet Ethernet

Network-attached PDU (Power Distribution Unit) controller for the Raspberry Pi Pico (RP2040), replacing the original PIC18-based firmware.

COMPONENTS
PROJECT DESCRIPTION

Introduction

Managing power remotely is a fundamental need in server rooms, lab environments, and embedded hardware test benches. Power Distribution Units (PDUs) sit at the heart of that infrastructure, yet most commercial PDUs rely on closed, proprietary firmware that offers little room for customization or integration with modern toolchains.

CroPDUster is an open-source firmware project by 9elements that replaces the original PIC18-based firmware on a network-attached PDU with a modern, async Rust implementation targeting the Raspberry Pi Pico (RP2040). The result is a fully network-manageable, web-enabled power controller that developers can build on, extend, and understand from top to bottom.

The name is a nod to the crop duster — an old agricultural airplane — and a deliberate pun: it is one of the few words in the English language that contains the letters "PDU" in sequence.


What CroPDUster Does

At its core, CroPDUster turns a Raspberry Pi Pico into a capable network-attached PDU controller with the following capabilities:

8 individually switchable relay outlets are controlled via GPIO pins 0 through 7. Each can be toggled independently, renamed through the web interface, and restricted by per-user access control lists, giving administrators fine-grained power management.

A built-in HTTP server (running on port 80 via the picoserve async framework) serves a single-page web application directly from the device. No cloud service, no mobile app dependency — open a browser, log in, and control your outlets.

A REST API exposes every function of the device over JSON: querying outlet states, toggling relays, reading sensor data, managing users, and triggering over-the-air firmware updates. This makes CroPDUster scriptable and integrable with any automation workflow.

HTTP Basic Auth with multi-user support means teams can share a device without sharing credentials. Admin accounts can create regular users and assign per-port permissions, so a developer can only toggle the outlets assigned to their test bench.

Over-the-air (OTA) firmware updates are handled via an A/B partition scheme powered by embassy-boot. Uploading a new firmware image via HTTP writes it to an inactive DFU partition; on reboot the bootloader swaps the partitions, making rollback safe and updates zero-downtime.

Persistent configuration is stored in a dedicated flash region using the ekv key-value store, surviving power cycles without any external storage.


WIZnet's Role in the Project

The networking capability of CroPDUster is provided by WIZnet Ethernet modules — specifically the W5500 and W6100 chips. These are hardware TCP/IP offload ICs that handle the full Ethernet and IP stack in silicon, communicating with the RP2040 over SPI.

This is a deliberate and important design choice. The RP2040 is a capable microcontroller, but implementing a robust TCP/IP stack entirely in software on a resource-constrained device is complex and memory-intensive. By offloading that work to a dedicated WIZnet chip, CroPDUster keeps the RP2040's 264 KB of RAM free for application logic — HTTP buffers, firmware staging, authentication state, and more.

The hardware SPI connection is configured as follows:

SignalGPIO Pin
MISOGPIO 16
MOSIGPIO 19
CLKGPIO 18
CSGPIO 17
INTGPIO 21
RSTGPIO 20

The SPI bus runs at 50 MHz, giving the device ample throughput for HTTP transactions and OTA firmware streaming.

The project supports both WIZnet variants — the W5500 (the established, widely available option) and the newer W6100 (which adds native IPv6 support) — selectable at build time with a single flag:

cargo xtask dist --w6100

This flexibility means developers can choose whichever chip fits their hardware without touching application code. The driver integration is handled through the embassy-net-wiznet crate, which abstracts away chip-level differences and plugs cleanly into the Embassy async networking stack.

In practice, WIZnet's role is what makes CroPDUster a network appliance rather than a USB-tethered device. DHCP is handled automatically, the device gets a local IP address, and from that point it behaves like any other HTTP service on the network.


Why This Project Matters to Developers

CroPDUster is a valuable reference and starting point for anyone building networked embedded systems, particularly those working with Rust on microcontrollers. Several aspects make it stand out.

It demonstrates a complete async embedded Rust application. The project uses the Embassy framework throughout — embassy-executor for async tasks, embassy-net for the network stack, embassy-rp for the RP2040 hardware abstraction layer. Developers new to async embedded Rust can study how multiple concurrent tasks (Ethernet, networking, GPIO, sensors, and four HTTP worker tasks) coordinate without an OS.

It shows how to build an HTTP server on bare metal. The picoserve integration with Embassy-style extractors, JSON responses via serde_json_core, and embedded static HTML assets covers patterns that come up in nearly every connected embedded project.

The OTA update architecture is production-quality. The A/B partition scheme using embassy-boot, combined with a watchdog timer and hard-fault recovery, is the kind of robust update path that many embedded projects skip and later regret. Developers can lift this pattern directly.

It replaces proprietary firmware on real hardware. Unlike most "blinky LED" demos, CroPDUster solves a concrete problem — retrofitting a physical PDU — which means its design decisions reflect real constraints around memory, flash layout, and network reliability.

The project is clean and well-documented. The repository includes a detailed CLAUDE.md covering build commands, hardware pin assignments, flash memory layout, architecture decisions, and REST API usage. A developer can go from cloning the repository to flashing a device in minutes.

It is liberally licensed. The BSD 3-Clause license means developers can use it as a foundation for commercial products without restriction.

For anyone building a lab automation tool, a remote power cycling fixture, or any networked device on the RP2040 + WIZnet stack, CroPDUster is a thorough, working example of how to do it right.


Getting Started

The project requires a nightly Rust toolchain and a handful of tools:

# Install prerequisites rustup target add thumbv6m-none-eabi
cargo install elf2uf2-rs flip-link
 # Build and flash cargo xtask dist
# Hold BOOTSEL, connect Pico via USB, drag build/combined.uf2 to RPI-RP2

Once flashed, the device obtains an IP via DHCP and is immediately accessible at http://<device-ip>/ with default credentials admin / admin.

The full source is available at github.com/9elements/CroPDUster under the BSD 3-Clause license.

Documents
Comments Write