cat-dev-telnet

Crates.iocat-dev-telnet
lib.rscat-dev-telnet
version0.0.13
created_at2025-10-11 08:53:07.629506+00
updated_at2025-10-11 08:53:07.629506+00
descriptionA library for interacting with the telnet service on a CAT-DEV (wii-u devkit) host bridge, like a MION.
homepage
repositoryhttps://codeberg.org/rem-verse/sprig
max_upload_size
id1878004
size57,720
Cynthia Coan (Mythra)

documentation

README

cat-dev-telnet

A library used for interacting with CAT-DEV (also sometimes referred to as the "cat-dev bridge") host bridge's telnet service.

Stability

This crate is currently pre-1.0. We will do our best to minimize breaking changes to the library, but there is still many parts of the cat-dev we have not fully figured out. As such we're very hesitant to make any promises about the stability of these APIs, or that we'll follow SEM-VER until we've at the very least figured all of that out. If you are ever affected by this, or concerned about this please reach out on our codeberg repository. We do want to try, and make it as smooth as possible.

Usage

The crate offers a very simple API, capable of sending commands (and not reading the response back as the telnet server has no way of identifying when the 'end' of a response is), and receiving FULL lines from the input.

use cat_dev_telnet::TelnetStream;
use std::time::Duration;

const TIMEOUT_FOR_CONNECT: Duration = Duration::from_secs(30);
const TIMEOUT_FOR_WAITING_FOR_A_LINE: Duration = Duration::from_secs(3);

let stream = TelnetStream::connect(
	"192.168.1.1:23",
	TIMEOUT_FOR_CONNECT,
).await.expect("Failed to connect to telnet for MION device at 192.168.1.1");
// `connect()` will not only open a telnet session but log you into the device.
//
// From there all we need to do is use it!
stream.send("dump_dsata_trace").await.expect("Failed to send `dump_dsata_trace` command!");
while let Ok(line) = stream.recv_line(TIMEOUT_FOR_WAITING_FOR_A_LINE).await {
	println!("Got line: [{line}]")
}
Commit count: 0

cargo fmt