go-xmodem

command module
v0.0.0-...-2f07fdb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-xmodem

CI Go Reference

A Go implementation of the XMODEM and YMODEM file-transfer protocols, with a small command-line tool for sending and receiving files over a serial port.

Install

Library:

go get github.com/taigrr/go-xmodem

CLI:

go install github.com/taigrr/go-xmodem@latest

Library usage

Both protocols operate on any io.ReadWriter (for example a serial connection).

XMODEM
import "github.com/taigrr/go-xmodem/xmodem"

// Send (128-byte blocks; use ModemSend1K for 1K blocks)
err := xmodem.ModemSend(conn, data)

// Receive
data, err := xmodem.ModemReceive(conn)
YMODEM
import "github.com/taigrr/go-xmodem/ymodem"

// Send (filename is transmitted in the YMODEM header block)
err := ymodem.ModemSend(conn, data, "file.bin")

// Receive
filename, data, err := ymodem.ModemReceive(conn)

CLI usage

# Send a file over a serial port using YMODEM
go-xmodem send -p /dev/ttyUSB0 file.bin

# Receive a file
go-xmodem receive -p /dev/ttyUSB0

Flags: -p/--port serial port, -m/--message message to initiate transfer, -w/--wait string to wait for before starting the transfer.

License

Released under the MIT License. See LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址