modemu2k 0.2.3
Library that provides telnet capability to a comm program
Loading...
Searching...
No Matches
modemu2k

C/C++ CI BSD

modemu2k

modemu2k is a Hayes-style AT-command modem emulator that bridges a serial-style interface to a TCP or Telnet endpoint. It ships as a C library (libmodemu2k) exposing the modem state machine, plus a small CLI built on top that allocates a PTY and either reads stdin/stdout directly, forks a comm program (minicom, picocom) on the slave, or accepts an incoming TCP connection as the TTY. IPv4 and IPv6.

It is based on modemu, originally developed by Toru Egashira (1995–1996).

Maintainer: Andy Alt

License: GNU GPL 2 or later

The App

This project includes modemu2k, a small command-line program that fills in for the dialup modem that classic terminal programs like minicom and picocom were originally written to talk to. You can run modemu2k, point your terminal program at it, and type the same ATD"bbs.example.com" commands you'd have typed in the 1990s — except modemu2k turns each "dial" command into a network (TCP/telnet) connection instead of dialing a phone number. The classic comm program thinks it's still talking to a real modem; you're actually reaching today's BBSes over the internet. Works on Linux and BSD, with IPv4 and IPv6.

Build

meson setup builddir
ninja -C builddir

Run meson configure builddir to see extra options. ninja install is optional. The m2k-minicom / m2k-picocom wrapper scripts are not installed by default; pass -Dhelper-scripts=true to opt in.

Usage

See QUICKSTART.md for the actual how-to: standalone mode, running under minicom, listen mode, the binary-mode toggle for file transfers, escaping with +++, and quitting cleanly.

The modemu2k(1) man page has the full option and AT-command reference.

Live Telnet Boards

(BBSes in this list may also be capable of ssh or web-based protocols; look them up in your browser if you would like more info.)

  • The Rusty Mailbox — trmb.ca 2030
  • Synchronet BBS List — a directory of currently-reachable telnet BBSes

Acknowledgments

Several library-API conventions in modemu2k.h are modeled after mature C libraries — the patterns, not the code:

  • libcurl — caller-supplied detailed error buffer (m2k_set_error_buffer mirrors CURLOPT_ERRORBUFFER), strerror-style code-to-message helper, log-callback pattern (CURLOPT_DEBUGFUNCTION), and the blocking/non-blocking split between m2k_run and m2k_step (curl's easy vs. multi interfaces).
  • libuv / libcurl / libssh2M2K_API visibility/export macro (mirrors UV_EXTERN / CURL_EXTERN / LIBSSH2_API) for Windows DLL support and ELF visibility hardening.
  • SQLite / libssh2 — versioned header (macros)
  • libssh2M2K_ERR_WOULDBLOCK return code for non-blocking flow control (mirrors LIBSSH2_ERROR_EAGAIN), distinguishing flow-control from hard errors.