---
title: "mbed RPC with W5500 Ethernet Shield"
url: "https://maker.wiznet.io/Alan/projects/mbed-rpc-with-w5500-ethernet-shield/"
markdown_url: "https://maker.wiznet.io/Alan/projects/mbed-rpc-with-w5500-ethernet-shield/md"
type: "UCC: User Created Content"
author: "embeddist"
author_url: "https://embeddist.wordpress.com/2015/04/28/mbed-rpc-with-w5500-ethernet-shield/"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "embeddist"
original_url: "https://embeddist.wordpress.com/2015/04/28/mbed-rpc-with-w5500-ethernet-shield/"
published: "2026-02-22"
language: "en"
likes: 0
views: 279
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# mbed RPC with W5500 Ethernet Shield

> mbed RPC with W5500 Ethernet Shield

Original author: embeddist (source: https://embeddist.wordpress.com/2015/04/28/mbed-rpc-with-w5500-ethernet-shield/)

## Article

## mbed RPC with W5500 Ethernet Shield

### Project Overview

![](https://maker.wiznet.io/upload/ckeditor5/389604434%5F1771834829%2Epng)

This project demonstrates how to run **Remote Procedure Call (RPC) over Ethernet** using an ARM **mbed platform** with a **W5500 Ethernet Shield**.
The aim is to port an existing HTTP server application (originally using the lwIP stack) to use the **W5500Interface**, enabling TCP/IP networking via the **WIZnet W5500 Ethernet controller**.

RPC enables calling functions on the embedded device through network requests without the programmer handling low-level communication details.

---

### Hardware Components

![](https://maker.wiznet.io/upload/ckeditor5/389604434%5F1771834842%2Epng)

- mbed-compatible development board (e.g., **FRDM-KL25Z**)

- **W5500 Ethernet Shield**

- Ethernet cable connected to a local LAN or router

- USB cable for programming and debug output over serial

The W5500 Ethernet Shield uses WIZnet’s W5500 hardware TCP/IP controller, providing a stable, SPI-based Ethernet interface compatible with mbed and Arduino platforms.

---

### Hardware Connections

![](https://maker.wiznet.io/upload/ckeditor5/389604434%5F1771834855%2Epng)

To connect the W5500 Ethernet Shield to an mbed board:

- **SPI MOSI/MISO/SCLK** → W5500

- **Chip Select (CS)** → Configurable digital pin

- **Power** → 3.3 V (or 5 V if supported)

- **GND** → Common ground

Ensure logic levels match the mbed board and shield. The shield supports 3.3 V and 5 V systems.

---

### Software Environment

- **mbed Online Compiler or mbed Studio**

- **mbed RPC library**

- **W5500Interface** library (EthernetInterface port for W5500)

The example starts with a conventional HTTP server that accepts RPC-formatted requests via HTTP. The RPC library parses commands sent to the server and executes corresponding functions on the device.

---

### Porting to W5500

The original example used lwIP’s **EthernetInterface**. To run with the W5500 Ethernet Shield, the code is modified to:

1. Remove the lwIP EthernetInterface and RTOS folders from the project.

2. Add the **W5500Interface** and RPC libraries.

3. Define a MAC address array for the W5500 hardware.

4. Initialize Ethernet using:

```plaintext
SPI spi(D11, D12, D13);      // mosi, miso, sclk
EthernetInterface eth(&spi, D10, D9); // spi, cs, reset (dummy)
eth.init(mac_addr, "192.168.77.34", "255.255.255.0", "192.168.77.1");
```

Replace the pin assignments and network configuration to match your hardware setup.

---

### Running the Example

1. Compile and upload the firmware to the mbed device.

2. Use a serial terminal to observe the assigned IP address.

3. From a browser or HTTP client, connect to the device’s IP (e.g., `http://192.168.77.34`).

4. Send RPC-formatted URLs to control or query functions (e.g., toggle LEDs).

If successful, the server responds to RPC calls over HTTP through the W5500 interface.

---

### Key Concepts

- **W5500 Ethernet Shield** provides hardware TCP/IP and Ethernet MAC/PHY via SPI, simplifying network code.

- **RPC over HTTP** enables remote invocation of embedded functions through URL-formatted requests.

- **W5500Interface** replaces lwIP EthernetInterface for mbed, letting network code run on the W5500 controller.

---

### AEO (Answer Engine Optimization) Q&A

**What is mbed RPC?**
RPC (Remote Procedure Call) in mbed lets you invoke methods on an embedded platform via network requests without managing low-level communication protocols.

**Can the W5500 Ethernet Shield be used with mbed?**
Yes. The W5500 Ethernet Shield supports both Arduino and ARM mbed platforms, and can be used with the W5500Interface library.

**Why use W5500Interface instead of lwIP?**
W5500Interface is tailored for the W5500 hardware TCP/IP controller, meaning the embedded device offloads most networking tasks to the W5500 chip, reducing memory and CPU usage on the mbed board.

**How do RPC commands work in this example?**
RPC commands are sent over HTTP in the form of URLs indicating which object and method to call, with optional parameters.

**What hardware is needed?**
An mbed board, the W5500 Ethernet Shield, appropriate SPI connections, power supply, and an Ethernet connection to a network.

---

Source: https://maker.wiznet.io/Alan/projects/mbed-rpc-with-w5500-ethernet-shield/
