|
modemu2k 0.2.3
Library that provides telnet capability to a comm program
|
GitHub repository |
modemu2k is a Hayes-style AT-command modem emulator that bridges a comm program to a TCP or Telnet endpoint. To a comm program it looks like a serial-attached modem; the actual traffic flows over the network.
Dialing takes a quoted address. To specify a non-default port, use a space between host and port (not a colon):
To talk to modemu2k directly without a comm program, invoke it with any flag — for example -e to run a startup AT string:
modemu2k reads AT commands from stdin and writes responses to stdout. Dial out with:
You'll see the remote side's prompt. On disconnect you get NO CARRIER. Quit with:
Tell modemu2k to fork a comm program and hand it the PTY slave path via s:
For 8-bit-clean transfers, run the startup AT string at the same time:
A convenience wrapper, m2k-minicom, runs the above invocation for you. It's in scripts/m2k-minicom; install it by configuring with -Dhelper-scripts=true before ninja install. A matching m2k-picocom ships under the same option.
Any arguments you pass to the wrappers are forwarded to modemu2k. For example, to enable verbose narration while running through minicom, redirect stderr to a log file (modemu2k refuses to run otherwise, because verbose output would corrupt the comm program's display):
From inside minicom (or picocom, etc.), dial in the same AT style:
To quit modemu2k, just quit the comm program — modemu2k tears down with it.
Run modemu2k as a TCP listener that uses the accepted socket as its TTY. The connecting client drives modemu2k with AT commands. Intended mainly for plugging into emulators like dosemu2.
The process accepts one connection on port 19876, then runs the modem state machine over it until the peer disconnects.