Skip to content

GreenShoeGarage/Tether

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tether

Field Instrument 080
Current version: 1.0.1

Tether is a self-contained Web Serial monitor for Arduino boards and other serial devices. It lets a user connect to a supported USB serial device, read its output, and send text commands back to it without installing a desktop serial terminal.

The application consists of one HTML file. It does not require a build process, server-side code, external libraries, or an internet connection after the page has loaded.

Features

  • Connect and disconnect through the browser's Web Serial interface
  • Adjustable baud rate with common presets
  • Custom baud-rate entry
  • Live UTF-8 serial output
  • Send text commands to the connected device
  • Selectable command line endings:
    • None
    • Line feed
    • Carriage return
    • Carriage return plus line feed
  • Command history with the up and down arrow keys
  • Configurable quick-command buttons
  • Pause and resume the displayed output
  • Automatic scrolling
  • Optional timestamps
  • Line wrapping
  • Clear, copy, and save the serial log
  • Received-byte, sent-byte, line-count, and session-time indicators
  • USB vendor and product identifiers when reported by the device
  • Configurable data bits, stop bits, parity, and flow control
  • Light and dark display modes
  • Locally saved application settings
  • Built-in display test that does not require hardware
  • Port-permission removal where supported by the browser
  • Detection of unsupported browsers and insecure hosting
  • No telemetry or remote serial-data transfer

Requirements

Tether requires:

  • A desktop browser that supports Web Serial
  • A secure browser context, normally an HTTPS website
  • An Arduino or other USB serial device
  • A USB cable capable of transferring data
  • Permission to access the serial port

Browser support varies. A current Chromium-based desktop browser is generally the most reliable environment.

Only one application can normally use a serial port at a time. Close the Arduino IDE Serial Monitor, PlatformIO monitor, terminal applications, and other browser tabs that may already be connected to the device.

Installation

No installation or build process is required.

  1. Download fi080-tether-v1.0.1.html.
  2. Upload it to an HTTPS-enabled website.
  3. Open the page in a compatible desktop browser.

The file may be renamed to index.html when it is used as the main page of a directory.

Local development

Web Serial requires a secure context. For local testing, use a local web server rather than opening the file directly whenever possible.

One simple option is Python:

python3 -m http.server 8000

Then open:

http://localhost:8000/fi080-tether-v1.0.1.html

A local development origin such as localhost may be treated as secure by supported browsers.

Basic use

  1. Connect the Arduino or serial device to the computer.
  2. Open Tether.
  3. Select the baud rate used by the device firmware.
  4. Select Connect device.
  5. Choose the correct serial device in the browser permission dialog.
  6. Read incoming data in the serial monitor.
  7. Enter a command in the command console.
  8. Select the required line ending.
  9. Press Send or press Enter.

To disconnect, select Disconnect.

Baud rate

The baud rate must match the value used by the device.

For an Arduino sketch containing:

Serial.begin(115200);

set Tether to:

115200 baud

A mismatched baud rate commonly produces unreadable or corrupted output.

Sending commands

Tether sends UTF-8 text to the connected device.

The selected line ending is added after the entered command:

Setting Bytes appended
None No additional bytes
New line \n
Carriage return \r
Both \r\n

The correct setting depends on how the device firmware parses incoming serial data.

Example Arduino sketch

The following sketch accepts simple text commands:

String command;

void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.println("Device ready");
  Serial.println("Commands: ON, OFF, STATUS");
}

void loop() {
  while (Serial.available() > 0) {
    char incoming = Serial.read();

    if (incoming == '\n') {
      command.trim();
      command.toUpperCase();

      if (command == "ON") {
        digitalWrite(LED_BUILTIN, HIGH);
        Serial.println("LED ON");
      } else if (command == "OFF") {
        digitalWrite(LED_BUILTIN, LOW);
        Serial.println("LED OFF");
      } else if (command == "STATUS") {
        Serial.print("LED ");
        Serial.println(
          digitalRead(LED_BUILTIN) == HIGH ? "ON" : "OFF"
        );
      } else if (command.length() > 0) {
        Serial.print("Unknown command: ");
        Serial.println(command);
      }

      command = "";
    } else if (incoming != '\r') {
      command += incoming;
    }
  }
}

For this sketch, configure Tether for:

  • Baud rate: 115200
  • Line ending: New line (LF)

Serial monitor controls

Pause

Stops updating the visible terminal while continuing to collect incoming serial data. Selecting Resume redraws the collected output.

Auto-scroll

Keeps the newest serial output visible.

Timestamps

Displays a local timestamp beside each received, transmitted, system, and error entry.

Wrap

Wraps long serial lines to the available terminal width.

Clear

Clears the displayed and retained log for the current page session. It does not reset the connected device.

Copy

Copies the retained log to the clipboard.

Save log

Downloads the retained log as a UTF-8 text file.

The log records received data, transmitted commands, connection messages, and errors.

Quick commands

The default quick commands are:

  • STATUS
  • START
  • STOP
  • RESET

Selecting a quick-command button immediately sends that command using the currently selected line ending.

These labels are intended as general examples. They only have an effect when the connected firmware recognizes the corresponding command.

Advanced serial settings

The default serial format is:

8 data bits
No parity
1 stop bit
No flow control

This is commonly written as:

8N1

The advanced panel also supports:

  • 7 or 8 data bits
  • None, even, or odd parity
  • 1 or 2 stop bits
  • None or hardware flow control

These settings must match the connected device.

Display test

Select Test display to insert sample serial messages into the monitor.

This verifies terminal rendering, scrolling, line counting, timestamps, wrapping, copying, and log export without requiring a connected device.

The display test does not simulate an actual Web Serial connection.

Data handling and privacy

Tether communicates directly between the browser and the serial device selected by the user.

The application:

  • Does not upload serial data
  • Does not use analytics
  • Does not include advertising
  • Does not load external JavaScript libraries
  • Does not require an account
  • Does not send commands anywhere except the selected local serial port

Interface settings are stored locally in the browser using localStorage. Serial logs are retained only in the current page session unless the user explicitly downloads them.

Troubleshooting

The Connect button is disabled

Confirm that:

  • The browser supports Web Serial
  • The page is served from HTTPS or a supported local development origin
  • The page is opened directly rather than inside a restricted embedded frame

The device does not appear in the selection dialog

Confirm that:

  • The device is connected with a USB data cable
  • The operating system recognizes the device
  • The required USB serial driver is installed
  • Another application is not already using the port
  • The device is not charge-only hardware

The serial output is unreadable

The most common cause is an incorrect baud rate. Match Tether's baud rate to the firmware's Serial.begin(...) value.

Also verify the data bits, parity, and stop-bit settings.

No output appears

Check that:

  • The firmware is actually calling Serial.print() or Serial.println()
  • The correct port was selected
  • The baud rate matches
  • The device did not reset into a bootloader or alternate USB mode
  • The terminal display is not paused

Some Arduino-compatible boards reset when the serial port opens. Startup output may appear several seconds after connecting.

Commands are not recognized

Check that:

  • The firmware reads from Serial
  • The selected line ending matches the firmware parser
  • Letter case and spacing match the expected command format
  • The device is not expecting binary data instead of text
  • The command is being sent at the correct baud rate

The port is already in use

Close:

  • Arduino IDE Serial Monitor
  • Arduino IDE Serial Plotter
  • PlatformIO serial monitor
  • PuTTY, CoolTerm, screen, minicom, or similar tools
  • Other browser tabs connected to the same device

Then reconnect in Tether.

The waiting message remains visible

This was corrected in version 1.0.1. The placeholder now disappears when a serial connection is established or monitor content is present.

Limitations

  • Browser and operating-system support for Web Serial is not universal.
  • Mobile browser support is limited.
  • The application currently treats incoming serial data as UTF-8 text.
  • It is a serial monitor, not a binary protocol analyzer.
  • It does not graph numeric data.
  • It does not currently save reusable command profiles.
  • The quick-command labels are fixed in version 1.0.1.
  • The terminal retains a maximum of 5,000 entries per page session.
  • A physical serial port can usually be opened by only one application at a time.

File structure

Tether is distributed as one self-contained file:

fi080-tether-v1.0.1.html

The file contains:

  • HTML structure
  • CSS styling
  • Web Serial logic
  • Terminal rendering
  • Local settings storage
  • Log export
  • Light and dark themes

No package manager, compilation step, or external dependency is required.

Version history

1.0.1

  • Corrected the serial-monitor placeholder so it hides after connection or when output is displayed
  • Prevented the empty-state message from remaining over active serial content

1.0.0

  • Initial release
  • Web Serial connection and disconnection
  • Adjustable baud rate
  • Live serial monitoring
  • Command transmission
  • Line-ending selection
  • Command history
  • Quick commands
  • Terminal controls
  • Session metrics
  • Log copying and export
  • Advanced serial settings
  • Theme switching
  • Browser and secure-context checks
  • Built-in display test

License

No license has been assigned yet.

Until a license is added, the source remains subject to the default protections of copyright law. Add a LICENSE file before distributing or accepting outside contributions under a specific open-source license.

Project

Tether
Field Instrument 080
Version 1.0.1

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages