Skip to main content

HARDWARIO Real Time Transfer Terminal Console

Project description

HARDWARIO Real Time Transfer Terminal Console

Main Release PyPI License Twitter

Overview

HARDWARIO Real Time Transfer Terminal Console (rttt) is a Python package that provides an interface for real-time data transfer using SEGGER J-Link RTT (Real-Time Transfer) technology. It enables efficient data communication between an embedded system and a host computer via RTT channels.

This package is particularly useful for debugging, logging, and real-time data visualization in embedded applications.

alt text

Features

  • Real-time communication with embedded devices via RTT.
  • Support for multiple RTT buffers (console and logger).
  • Adjustable latency for optimized readout.
  • J-Link support with configurable serial numbers, device types, and speeds.
  • Command-line interface (CLI) for quick and easy access.
  • Easy installation via PyPI.

Installation

To install the package, use:

pip install rttt

To verify the installation, run:

rttt --help

Usage

Basic Command

To start the RTT console:

rttt --device <DEVICE_NAME>

Available Options

Usage: rttt [OPTIONS]

  HARDWARIO Real Time Transfer Terminal Console.

Options:
  --version                  Show the version and exit.
  --serial SERIAL_NUMBER     J-Link serial number.
  --device DEVICE            J-Link Device name.
  --speed SPEED              J-Link clock speed in kHz. [default: 2000]
  --reset                    Reset application firmware.
  --address ADDRESS          RTT block address.
  --terminal-buffer INTEGER  RTT Terminal buffer index. [default: 0]
  --logger-buffer INTEGER    RTT Logger buffer index. [default: 1]
  --latency INTEGER          Latency for RTT readout in ms. [default: 50]
  --history-file PATH        Path to history file. [default: ~/.rttt_history]
  --console-file PATH        Path to console file. [default: ~/.rttt_console]
  --mcp / --no-mcp           Enable MCP server. [default: no-mcp]
  --mcp-listen TEXT           MCP server listen address [host:]port. [default: 127.0.0.1:8090]
  --help                     Show this message and exit.

Examples

Connect to a device (replace NRF52840_xxAA with your actual device name):

rttt --device NRF52840_xxAA

Use a specific J-Link serial number:

rttt --device NRF52840_xxAA --serial 123456789

Configuration File

RTTT supports configuration via a .rttt.yaml file, which can be placed in the working directory, the home directory (~/.rttt.yaml), or the user configuration directory (~/.config/rttt.yaml). The file is loaded from the first available location in this order—working directory first, then home, then config. If no configuration file is found, default settings are used.

Example Configuration:

device: NRF9151_XXCA
console_file: "test.log"

With this configuration, simply running:

rttt

MCP Server (AI Integration)

RTTT includes a built-in Model Context Protocol (MCP) server that allows AI tools (Claude, Cursor, etc.) to interact with your embedded device via RTT.

MCP server is enabled by default. Start RTTT as usual:

rttt --device NRF52840_xxAA --mcp

Claude Code Configuration

Add to your .mcp.json:

{
    "mcpServers": {
        "rttt": {
            "type": "http",
            "url": "http://127.0.0.1:8090/mcp"
        }
    }
}

Available MCP Tools

Tool Description
send_command(command, timeout) Send a shell command to the device and wait for response
read_terminal(lines) Read recent terminal output (device responses and sent commands)
read_log(lines, after_cursor, pattern) Read log output from the device ring buffer, with optional regex filter
status() Get session statistics (line counts, buffer usage, cursors)
flash(file_path, addr) Flash a firmware file (.hex, .bin, .elf, .srec) to the target device

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤  by HARDWARIO a.s. in the heart of Europe.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rttt-1.4.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rttt-1.4.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file rttt-1.4.0.tar.gz.

File metadata

  • Download URL: rttt-1.4.0.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rttt-1.4.0.tar.gz
Algorithm Hash digest
SHA256 9db7ecde22b57b33254f6ebc009107f32c3ebcb2ffe67828b782086df2c47df7
MD5 a7785b4c068f717305d93e33e0947b56
BLAKE2b-256 b5e9554ddb59df905bebd1dbab4a75b6b4fcda0d498e6ba523606fe204616aa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rttt-1.4.0.tar.gz:

Publisher: publish.yaml on hardwario/py-rttt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rttt-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: rttt-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rttt-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c039cc2a72688524e2e4b678dce626775f55900a5b5ce49eb3980aedd18fd958
MD5 5a44620838b085fad7720f4005f59d17
BLAKE2b-256 8a671a8133a380b35b2e216f597c05a9ac19516f65768a4704d082400b1b43a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for rttt-1.4.0-py3-none-any.whl:

Publisher: publish.yaml on hardwario/py-rttt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page