Raspberry Pi Pico + W5500 + GPS TCP API Server
Rust-based embedded project for RP2040, W5500, and Pico-GPS-L76K GPS module to create TCP API server that can respond to HTTP request/provide GPS data in JSON.
Waveshare - L76K GNSS module
x 1
This is a Rust-based embedded project for the Raspberry Pi Pico (RP2040) that uses:
W5500 Ethernet module for network connectivity
Pico-GPS-L76K GPS module for GPS data
Embassy asynchronous framework and embedded networking
to create a TCP API server on the Pico that can respond to HTTP requests and provide GPS data in JSON.
🧠 Key Features
The device supports:
✅ Ethernet via W5500 (SPI)
✅ Automatic DHCP IP address
✅ ICMP Ping responses
✅ TCP API server on port 8080
✅ JSON formatted responses
✅ GPS module support with NMEA 0183 parsing
✅ Provides GPS location & time over network API
🔌 Hardware Setup
MCU: Raspberry Pi Pico (RP2040)
Ethernet: W5500 connected via SPI
GPS: Pico-GPS-L76K connected via UART (9600 bps)
Detailed pin wiring for both modules is described in the README.
🧩 Network API Endpoints
Here’s how you can interact with the server:
| Endpoint | Method | Returns |
|---|---|---|
/ or /status | GET | { "status":"ok", ... } |
/ping | GET | { "message":"pong" } |
/api/info | GET | List of available endpoints |
/api/gps | GET | GPS data (JSON) |
/api/gps/mode/{...} | GET | Change GPS output mode |
GPS output modes:
log – Only logs data
tcp – Only outputs via TCP
both – Logs + TCP (default)
none – No output
🛰️ GPS Data Example
Example JSON from /api/gps:
Install probe tools:
Build and flash using cargo commands:
cargo build --release
cargo run --release
``` :contentReference[oaicite:8]{index=8}
🧪 Usage & Testing
You can test the device with:
Ping:
HTTP (cURL):
curl http://<IP>:8080/status
curl http://<IP>:8080/api/gps
``` :contentReference[oaicite:9]{index=9}
⚙️ Configuration Options
You can modify MAC address / TCP port / GPS baud rate / Static IP instead of DHCP
via the source code configuration.
🧰 Project Structure
The main components in the source code:


