Skip to content

EN Network

drew.po28@gmail.com edited this page Jul 22, 2026 · 8 revisions

Network

Menu path: Network (+ the F5 file browser) · Boards: RP2350 only (RP2040 unsupported) · Requires: an ESP-01S (ESP8266) module with stock AT firmware + SD card

What it is

Networking via an ESP-01S module, attached either directly to a GPIO UART pin pair or through a USB-serial dongle (CH340 and similar) plugged into the USB host port — see Transport. The ESP runs the stock Espressif AT firmware — no reflashing needed. The RP2350 side implements:

  • ZiFi NIC — a network interface for ZX-Spectrum software (port #EF, 16550-UART window). Compatible with the MRF terminal/drivers (see Software).
  • WiFi — join an access point (scan, password). Credentials are saved and reconnected automatically on the next boot.
  • SNTP time sync → built-in clock (RTC / Mr Gluk TimeKeeper) — runs automatically right after a WiFi connect and at boot, or on demand. Needs the RTC enabled (Options → Other → RTC + NVRAM). The clock's day-of-week value follows the Russian/European convention (week starts Monday).
  • FTP server — share the SD card to the LAN. A PC connects to the device, browses the SD and uploads/downloads files. A live log terminal shows activity; emulation is paused until you press ESC. Anonymous, active mode only.
  • HTTP test (curl) — a diagnostic one-shot HTTPS/HTTP GET (status, size, body preview, free heap before/after) to validate TLS-over-ESP on real hardware.

File access — browsing remote servers (FTP / SFTP) and the online archives no longer lives in the Network menu: it now opens from the F5 file browser as a location chooser (Local / Remote / Web Archives / Add Remote), in the same "Open File" window as the SD card. See File access — the F5 browser.

Menu structure

Network
├── ESP-01(S) ▸
│   ├── Transport ▸       Off / USB (CH340) / a UART pin pair (TX/RX)
│   ├── Baud ▸            115200 / 230400 / 460800 / 921600
│   ├── Time zone ▸       UTC−12 … UTC+14
│   └── Sync time (SNTP)  one-shot clock sync
├── WiFi <status>         connect / disconnect (shows SSID + IP)
├── FTP Server ▸          share the SD card to the LAN (see below)
├── HTTP test (curl) ▸    one-shot HTTPS GET for diagnostics (see below)
└── ZiFi NIC ▸            Off / On — enable the network interface

File transfer (FTP/SFTP) and the online archives used to be Network-menu items; they moved to the F5 location chooser. Only the server/diagnostic rows remain here.

Options

Item Values Default Description
ESP-01 › Transport Off / USB (CH340) / board TX/RX pairs board-specific GPIO pair How the ESP is attached: a GPIO UART pair or a USB-serial dongle. Conflicting GPIO pairs are tagged (e.g. off: NESPAD); picking a conflicting pair — or switching into/out of USB — prompts a reboot
ESP-01 › Baud 115200 / 230400 / 460800 / 921600 115200 Link speed. Higher = faster transfers (~8× at 921600). Applied live via AT+UART_CUR
ESP-01 › Time zone UTC−12 … UTC+14 UTC+0 Timezone for SNTP
ESP-01 › Sync time — — On-demand SNTP sync (needs WiFi + RTC enabled). Also auto-runs on connect/boot
WiFi — — Disconnected → scan + password → connect (+ auto time-sync); connected → show SSID/IP, disconnect
FTP Server — — Share the SD card to the LAN over FTP (anonymous, active mode). Emulation pauses; ESC stops
HTTP test (curl) — — One-shot GET (scheme https/http + host + path); shows status/size/preview/heap. Needs WiFi
ZiFi NIC Off / On Off Enables the network interface. Stored in NVS

On speed: 921600 is the fastest, but with no hardware flow control (the ESP-01S doesn't expose RTS/CTS) marginal wiring can drop the odd byte — under SFTP that shows as a MAC mismatch and a dropped session (FTP wouldn't notice). If you hit it, pick 460800 or lower.

While the ZiFi NIC is on and the Z80 is running, the link idles at a safe 230400 regardless of the Baud setting; file transfers (FTP/SFTP/HTTPS), which pause emulation, temporarily boost to the configured rate.

Transport: GPIO UART or USB dongle

The Transport picker (ESP-01(S) submenu) chooses how the ESP-01 is attached:

  • A GPIO pair — the classic 4-wire hookup described under ESP-01S wiring. Pairs that displace another peripheral are tagged in the list (e.g. off: NESPAD); ZiFi has priority — at boot the displaced peripheral skips its own init, which is why a conflicting choice asks for a reboot.
  • USB (CH340) — plug the ESP-01 into a USB-serial adapter (the common "ESP-01 USB programmer" dongles: CH340, CP2102, FTDI) and that into the board's USB host port. No soldering, no GPIO pins consumed. The row only exists in builds with USB-host support (the same ones that take USB keyboards).
  • Off — no link at all.

Notes on the USB transport:

  • Works with everything the GPIO transport does: WiFi, SNTP, the ZiFi NIC (MRF etc.), FTP/SFTP/HTTPS transfers and the FTP server.
  • Speeds: with the NIC live it runs at 230400 like the GPIO transport; transfer boost is hw-verified at 460800, and higher rates depend on the dongle chip's own sustained-RX ceiling (the CH340 is the usual limit).
  • The dongle shares the USB bus with keyboards/gamepads/flash sticks through a hub.
  • Switching between USB and GPIO prompts a reboot so displaced peripherals can release/claim their pins.

File access — the F5 browser

When WiFi is configured (or a USB flash drive is plugged in), pressing F5 (Load file) first opens a location chooser drawn in the same "Open File" window as the SD browser:

Open from
├── Local (SD)          the SD card (the normal file browser)
├── USB Drive           a plugged-in USB flash stick (row appears while one is present)
├── Remote (FTP/SFTP)   your saved connections
├── Web Archives        online ZX disk/tape catalogs over HTTPS
└── Add Remote          store a new FTP/SFTP connection

The network rows need WiFi; the USB Drive row appears with just a stick (see Storage → USB flash drive).

The ZiFi NIC toggle is independent — file access works whether the NIC is on or off, it only needs WiFi connected. F5 reopens where you left off: the last location and folder (Local, a saved remote, or a Web Archives source) are remembered across sessions.

Common browser keys (Remote & Web Archives)

Both remote and archive browsing use the same RAM-bounded file browser (the listing is indexed on SD, like the SD-card browser):

Key Action
↑ ↓ / PgUp PgDn / Home End navigate
Enter (on a folder/category) enter the directory
Enter (on a file) quick-start — download to RAM (/tmp) and run/mount immediately (tape/snapshot → load; disk .trd/.scl/… → mount to drive A + cold-boot TR-DOS; .zip → unzip then launch). The OSD closes on success
F5 save the file (real name) or folder (recursive) to a chosen SD destination folder
F7 upload an SD file into the current remote directory (Remote only)
F8 / Del delete the remote file/folder, with confirmation (Remote only)
F2 force a re-fetch of the current directory (refresh the cache)
.. / Backspace go up one level
Esc close the browser / OSD

💡 Enter = run, F5 = save. Enter is the fast "just play it" path (a fixed /tmp name, overwritten each time); use F5 when you want the file kept on the SD card under its real name.

Remote (FTP / SFTP) — saved connections

Instead of re-typing a server each time, connections are saved and listed:

  • The list shows each connection's alias (if set) or user@host:port (ftp/sftp). Enter connects (prompting the password if it wasn't stored); on connect the browser cd's straight into the connection's saved start path. F8 forgets a connection. A trailing [Add Remote] row opens the form.
  • For SFTP, the host-key fingerprint (SHA-256) is shown on first connect — trust is saved to known_hosts on SD (TOFU); a changed key blocks the connection (MITM guard).
  • SSH/SFTP crypto (curve25519, AES-CTR, HMAC-SHA256) runs on the RP2350 via mbedTLS; the ESP is just a TCP bridge.

Add Remote (from the location chooser or the [Add Remote] row) prompts, in order: protocol (FTP / SFTP) → host → port (default 21 FTP / 22 SFTP) → user → password (masked; TAB reveals) → save password? (Yes/No) → optional start path → optional alias (display name). Connections are stored in remotes.tsv on SD; the password is only written when you chose to save it (otherwise it's re-prompted at connect time). Up to 16 connections.

Web Archives — online image catalogs

Browse and download ZX-Spectrum disk/tape images from internet catalogs (currently Virtual TR-DOS, Spectrum Computing, ZX-Art, ALF cartridges and more — the source list is pulled from the catalog's sites.tsv). Pick a source → browse categories → files, then Enter to quick-start or F5 to save to SD (read-only: no upload/delete). The ALF cartridges source lets you browse and download ALF cartridge images over HTTPS and run them just like the other archive content (the cartridge is mounted from SD and streamed from the card — nothing is flashed).

How it works under the hood:

  • The catalog is static and serverless — a GitHub Action periodically crawls the source sites and publishes an index tree (.tsv) to GitHub Pages (https://drewpo28.github.io/pico-spec-catalog). The device only reads those indexes — no always-on server.
  • HTTPS runs on the RP2350 itself: TLS 1.2 via mbedTLS, the ESP-01 is a plain TCP bridge (the same host-crypto / dumb-ESP split as SSH). The certificate is verified against cacert.pem on SD (no file → no verification + a warning).
  • Cyrillic titles are rendered with a dedicated font face.

💡 Related: TR-DOS Auto-boot (Storage → Betadisk) injects a boot file into downloaded disks that lack one, so they autostart.

FTP server (sharing the SD card)

The reverse of remote file transfer: the device becomes an FTP server that shares the whole SD card to the LAN, so a PC can browse it and upload/download files. Requires WiFi connected.

Network → FTP Server starts a server on port 21 and opens a live log terminal showing the connection details (ftp://<ip>:21, user anonymous) and each command/response. The ZX-Spectrum emulation is paused the whole time; press ESC to stop the server and resume.

  • Anonymous — any username/password is accepted (e.g. anonymous with an empty password). Full read/write access to the SD.
  • Active mode only. ESP-AT firmware exposes a single listening port, so the data connection is opened outbound to the client. Set your FTP client to active (not passive) mode. On a LAN this just works; behind NAT/firewall it may not.
  • One client at a time. Binary transfers only (TYPE I).
  • Supported commands: list (LIST/NLST/MLSD/MLST), download (RETR), upload (STOR/APPE), resume (REST), delete (DELE), make/remove directory (MKD/RMD), rename (RNFR/RNTO), SIZE, CWD/CDUP, PWD.

Command-line ftp example:

ftp> open <device-ip> 21
Name: anonymous
Password:           (just press Enter)
ftp> binary
ftp> ls
ftp> get game.tap
ftp> put snapshot.z80
ftp> bye

FileZilla / GUI clients: set Active mode (Site Manager → Transfer Settings → Active) and Anonymous logon — passive mode will fail to open the data connection.

No persistent settings: the FTP server is a transient action with no config of its own.

HTTP test (curl)

A diagnostic tool: a one-shot HTTP(S) GET to confirm that TLS-over-ESP actually works on your hardware. Requires WiFi connected.

Network → HTTP test (curl) prompts as separate fields: the scheme (https / http), the host (Host:) and the path (Path:, defaults to /) — separately, because a full URL doesn't fit one input field.

It shows a summary dialog: the URL, HTTP status, Content-Length, bytes received, whether the TLS handshake succeeded, and free heap before/after (handy to see whether memory is too tight for the handshake), plus a preview of the first ~512 body bytes. No file is written to SD.

ESP-01S wiring

Just 4 wires — power (VCC, GND) and a serial pair (TX, RX). Both sides are 3.3 V logic, so no level shifter is needed.

The serial pair crosses over: each side's TX → the other side's RX.

The diagram below uses the PICO_DV default pins (UART0: GPIO 0 = TX, GPIO 1 = RX). For other boards only the GPIO numbers change — see the table below.

        ESP-01S                              RP2350  (example: PICO_DV)
   ┌───────────────────┐
   │  ((( antenna )))  │
   │   ┌──────────┐    │
   │   │ ESP8266  │    │
   │   └──────────┘    │
   │              TX ●─┼──────────────────●  GPIO 1   ( Pico RX )
   │              RX ●─┼──────────────────●  GPIO 0   ( Pico TX )
   │             GND ●─┼──────────────────●  GND
   │             VCC ●─┼──────────────────●  3V3   ( solid 3.3 V — see note )
   │                   │
   └───────────────────┘
   EN / RST / GPIO0 / GPIO2 on the ESP — leave unconnected

   The crossover is baked into the labels:  ESP TX → Pico RX,  ESP RX → Pico TX.

Connection list (PICO_DV):

ESP-01S RP2350 (PICO_DV) meaning
TX ──► GPIO 1 ESP TX → Pico RX
RX ◄── GPIO 0 ESP RX ← Pico TX
GND ─── GND common ground
VCC ─── 3V3 3.3 V power

The crossover rule never changes (only the GPIO numbers do): Pico TX (even pin) → ESP RX, and Pico RX (odd pin) → ESP TX. Connecting TX→TX / RX→RX is the #1 reason "nothing happens".

Power. The ESP-01S draws bursts up to ~300 mA on WiFi TX. Feed it from a solid 3.3 V rail and add a 100–470 µF cap at VCC — otherwise expect brownout resets. The Pico's own 3V3 may be marginal.

Default pins per board

Change the pair in Network → ESP-01(S) → Transport. TX is the even pin, RX its odd neighbour.

Board TX / RX (default) UART Note
PICO_DV 0 / 1 UART0 dedicated ZiFi header
MURM2 20 / 21 UART1 takes NESPAD pins
PICO_PC 20 / 21 UART1 takes NESPAD pins; alt 2/3 (QWST1), 10/11
ZERO2 24 / 25 UART1 free
MURM-1 (RP2350) 16 / 17 UART0 takes NESPAD pins

If you pick a pair that overlaps the audio output pins, ZiFi takes priority: sound init yields those pins to the UART at boot, so the chosen pair works reliably.

Full board GPIO maps: Boards & pinout.

Software

No Spectrum-side software is needed for file transfer or the archives — it's all done from the OSD. For the ZiFi NIC (networking inside ZX-Spectrum programs) use the MRF terminal/drivers:

Files on SD

Path Purpose
/.config/pico-spec/wifi.cfg WiFi + network settings (keys below). Legacy /wifi.cfg is still read as a fallback
/.config/pico-spec/remotes.tsv Saved FTP/SFTP connections (one tab-separated line each). Passwords stored only when "save password" was chosen
/.config/pico-spec/known_hosts SFTP host-key trust (TOFU): one host base64(SHA-256) line per server
cacert.pem CA bundle for HTTPS (Web Archives). Missing → TLS without verification + a warning
/spec Default download / save destination

wifi.cfg keys (key=value, one per line):

Key Meaning Values
ssid WiFi network name text
pass WiFi password text
tz SNTP timezone UTC−12 … UTC+14
autoconnect WiFi enabled (reconnect at boot) 0
1
baud ESP-01S UART speed 115200
230400
460800
921600
net_host last remote host text
net_user last remote user text
net_port last remote port number (0 = protocol default)
net_proto last remote protocol 0 FTP
1 SFTP
net_dl last SD download/save folder path (default /spec)
net_ul last SD upload folder path
catalog_host archive catalog source host or base URL
catalog_port catalog port (dynamic mode only) number (0 = 80)
last_loc last F5 browse location (so F5 reopens where you left off) L
W\t<site>\t<path>
R\t<host>\t<port>\t<proto>\t<user>\t<path>

Saved connection passwords live in remotes.tsv, not here; the FTP server has no stored password.

Links

Clone this wiki locally