ev3-runner
A command-line tool to upload and run binaries on LEGO EV3 robots running ev3dev over TCP.
Features
- 🚀 Fast binary uploads with hash-based deduplication
- 🔒 Password-protected connections
- 📦 Automatic file permission handling
- 🔄 Upload-only or upload-and-run modes
- 📡 Real-time output streaming from executed programs
Installation
From crates.io
From source
Pre-built EV3 Binary
Pre-compiled binaries for the EV3 (ARMv5TE architecture) are available in the latest GitHub release.
Download the ev3-runner binary from the release page and transfer it to your EV3 robot.
Usage
Server Mode (on EV3)
Run the server on your EV3 robot:
With custom port and password:
Client Mode (on your computer)
Upload a file:
Upload and run a file:
With custom options:
Options
Server Options
-p, --server-port <PORT>- Port to listen on (default: 6767)-p, --password <PASSWORD>- Server password (default: maker)-v- Increase verbosity (can be repeated:-v,-vv,-vvv)
Client Options
-r, --remote-path <PATH>- Target path on the server (default: same as local filename)--host <HOST>- Server address inaddr:portformat (default: 127.0.0.1:6767)-p, --password <PASSWORD>- Connection password (default: maker)-v- Increase verbosity (can be repeated:-v,-vv,-vvv)
How It Works
- Client calculates a hash of the local file
- Client sends file metadata (path, size, hash) and password to Server
- Server verifies the password
- Server checks if the file already exists with the same hash
- If hashes don't match, Client uploads the file
- If in "run" mode, Server executes the binary and streams output back to Client
This hash-based approach avoids unnecessary uploads when the file hasn't changed, making iterative development faster.
Example Workflow
-
Start the server on your EV3:
-
From your development machine, upload and run your program:
-
Watch the output stream in real-time from your EV3!
Building for EV3
To cross-compile your Rust programs for the EV3:
Security Note
The password is hashed using SHA-256 before transmission. However, this tool is designed for development workflows and should not be used in security-critical environments. Always use it on trusted networks.
License
MIT