diff --git a/README.md b/README.md index 47f6664..1003041 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,27 @@ -# TermTCP CLI +# TermTCP -A terminal TCP client for BPQ32 packet radio nodes, written in C with an ncurses TUI. Connects via BPQTermTCP protocol, displays split output/monitor panes, and supports real-time RF frame monitoring with port filtering. +A terminal TCP client for BPQ32 packet radio nodes, written in C with an ncurses TUI. Connects via BPQTermTCP protocol, displays split output/monitor panes, supports real-time RF frame monitoring with port filtering, multiple simultaneous sessions, and built-in forms for ICS-213 and packet check-in. ## Features - ncurses TUI with split output and monitor panes -- BPQ packet radio node support (BPQTermTCP protocol) +- BPQTermTCP protocol (compatible with QtTermTCP) +- Up to 4 simultaneous sessions with live background receive - RF monitor with per-port and frame-type filtering - Auto-populates port names from the BPQ server on connect - Scrollable output and monitor windows with history - Input history (Up/Down arrows) - Session logging to timestamped files +- Function key bar (F1/F3–F10) at bottom of screen +- ICS-213 General Message form with F2 background send +- PKTNET Packet Check-In form - Multiple host configuration with quick connect - Unicode box-drawing borders on all menus ## Dependencies - GCC -- ncurses (wide character support — `libncursesw6`) +- ncurses with wide character support (`libncursesw6`) ### Install dependencies on Debian/Ubuntu @@ -28,7 +32,7 @@ sudo apt install gcc libncurses-dev ## Build ```bash -make -f Makefile_CLI +make ``` The binary is `./termtcp`. @@ -36,31 +40,31 @@ The binary is `./termtcp`. ### Other make targets ``` -make -f Makefile_CLI clean # Remove build artifacts -make -f Makefile_CLI debug # Build with debug symbols -make -f Makefile_CLI install # Install to /usr/local/bin/ +make clean # Remove build artifacts +make debug # Build with debug symbols +make install # Install to /usr/local/bin/ ``` ### Manual compile ```bash gcc -Wall -Wextra -O2 -std=gnu99 -D_XOPEN_SOURCE_EXTENDED \ - -o termtcp termtcp_cli.c -lm -lncursesw + -o termtcp termtcp.c -lm -lncursesw ``` ## Configuration -On first run, `~/.termtcprc` is created automatically. Edit it to add BPQ nodes: +Config is stored in `~/.BPQTermTCP.ini` and created automatically on first run. Edit it to add BPQ nodes: ```ini -[Host0] +[Host1] Host=10.0.2.7 Port=17023 Username=kb8pmy Password=yourpassword Name=Home Node -[Host1] +[Host2] Host=10.121.15.68 Port=17023 Username=kb8pmy @@ -68,7 +72,7 @@ Password=yourpassword Name=Water Tower ``` -Port names and monitor settings are also saved here automatically. +Port names, monitor settings, and port mask are saved here automatically when you change them in-program. ## Usage @@ -76,38 +80,63 @@ Port names and monitor settings are also saved here automatically. ./termtcp ``` +Press **Ctrl+A** to open the menu, then select an option. + ### Key bindings | Key | Action | |-----|--------| | Ctrl+A | Open menu | -| Ctrl+A C | Connect | -| Ctrl+A D | Disconnect | +| Ctrl+A C | Connect to a host | +| Ctrl+A D | Disconnect current session | +| Ctrl+A N | Open a new session | +| Ctrl+A X | Close current session | +| Ctrl+A 1–4 | Switch to session 1, 2, 3, or 4 | | Ctrl+A O | Config / host editor | | Ctrl+A M | Monitor options | | Ctrl+A L | Toggle session log | +| Ctrl+A F | Forms submenu (ICS-213, PKTNET check-in) | | Ctrl+A H | Help | | Ctrl+A Q | Quit | +| F1 | Connect | +| F3 | Monitor options | +| F4 | Config / host editor | +| F5 | Toggle log | +| F6 | Forms submenu | +| F7 | New session | +| F8 | Previous session | +| F9 | Next session | +| F10 | Quit | | Up / Down | Input history | | PgUp / PgDn | Scroll output window | | Home / End | Scroll monitor window | | Enter | Send line to server | +### Multiple sessions + +Open up to 4 connections simultaneously. All sessions receive data in the background — switch between them with F8/F9 or Ctrl+A 1–4. The status bar shows `[current/total]` session count. Close the current session with Ctrl+A X (if it is the last open session, the program exits). + +### Forms (Ctrl+A F) + +- **ICS-213 General Message** — fills in all numbered fields, sends via F2 in the background using silence-based prompt detection +- **PKTNET Packet Check-In** — pre-formatted check-in template + ### Monitor options (Ctrl+A M) -- Toggle TX, supervisor, nodes, and UI-only filtering +- Toggle TX, supervisor, nodes, and UI-only frame filtering - Toggle monitor pane visibility -- Select which RF ports to monitor (Tab to switch to port selection) +- Select which RF ports to monitor (Tab to switch to port list) -Port names are auto-populated from the BPQ server when you connect. +Port names are auto-populated from the BPQ server when you connect and saved to config. ## BPQ Protocol Notes -- Connects using BPQTermTCP protocol (same as QtTermTCP) +- Uses BPQTermTCP protocol (same wire format as QtTermTCP) - Sends trace options on connect to enable RF monitoring -- Port list is requested automatically via P8=1 parameter -- Monitor frames delimited by `0xFF` / `0xFE` byte markers -- NODES broadcasts filtered client-side via `>NODES` detection in AX.25 header +- Port list requested automatically via P8=1 on connect +- Monitor frames delimited by `0xFF 0x1B` / `0xFE` byte markers +- Port info delivered as `0xFF 0xFF` packet on connect +- NODES broadcasts filtered client-side via `>NODES` in AX.25 header ## Version