This project is a customized fork of the DCC-EX CommandStation-EX project, built specifically for ESP32-based systems. The goal is to provide a standalone wireless DCC control system with a mobile-friendly user interface, file management, and real-time communication.
Related project: DCCExpress
- 🚂 EX-CSB1 ESP32 based command station
- 🌐 Built-in web server with Bootstrap UI optimized for mobile devices
- 📡 WebSocket support for real-time control and feedback
- ✏️ Fully editable loco list (image, name, address, speed, functions)
- 🛠️ Function editor with momentary toggles and customizable labels
- 🗃️ LittleFS storage for persistent config, loco data, and file uploads
- 🗂️ File manager interface for maintaining and organizing files
- ✅ Locos
- ✅ Turnouts
- ⌛Route Manager
-
Configure your hardware and network settings
Open theconfig.h
file and adjust it according to your setup (e.g. connected devices, Wi-Fi credentials).
Don’t forget to add the following directive to enable the web server:#define HTTP
-
Compile and upload the firmware
Use PlatformIO or the command line to build and flash the firmware to your ESP32 device. -
Upload the web interface (data folder)
Upload the contents of thedata/
folder using:> pio run -e ESP32 --target uploadfs
Or use the "Upload Filesystem Image" option from the PlatformIO menu.
⚠️ Make sure to run these commands from the directory where your `platformio.ini` file is located.
- Install
> cd DCCExpress
DCCExpress> npm install
- Dev
DCCExpress> npm run dev
- Build to Data
DCCExpress> npm run build
DCCExpress> cd ..
> pio run -e ESP32 --target uploadfs
- Or Build + Upload to EXCSB1
DCCExpress> npm run upload
-
WebServer and WebSocket implementation
- Added an embedded HTTP server with LittleFS/SD card file hosting
- Added WebSocket support via
AsyncWebSocket
for real-time communication with clients - UI pages (e.g., loco control, file manager) are now loaded from the device
-
Serial output redirection (USB_SERIAL)
- Replaced
USB_SERIAL
with aHTTPSerialWrapper
class - This wrapper forwards all serial output to both the original stream and all connected WebSocket clients.
- Useful for debugging or monitoring system messages over the network
- Replaced