README.md

tinclib-config

CI Release License: Apache 2.0

TINCLIBC: Wi-Fi setup for the TI-84 Plus CE. A calculator program that connects your ESP8266 board to Wi-Fi, shows its status and tests the connection, so programs built with tinclib can get online. Apps that need setup hand off to it and get the result back.

  • Status screen: Wi-Fi state, board clock, slot, signal (RSSI) and IP.
  • Saved networks: as many slots as the board reports (up to 254). Five show at a time, and the list scrolls with a scrollbar when there are more. Each slot can be set (SSID, masked password, hidden network) or forgotten.
  • Connection test: Wi-Fi, the board clock, and one HTTPS GET of hello.txt from GitHub, printed on 200 (with the TLS failure reason if the handshake or certificate check fails).
  • Wi-Fi lock aware: if the board locks its Wi-Fi profiles (for example the PC build of the firmware), the slot list is greyed out, and selecting a slot shows a notice instead.
  • About: app, protocol, tinclib, firmware (with board name) and titrmlib versions.
  • Tested: host tests with ASan and UBSan, and emulator tests in CEmu.

How it fits together

tinclib-config is one part of four:

Repo What
tinclib The C library your calculator program links against
tinclib-firmware Firmware for the ESP8266 board, which does the networking
tinclib-config (this one) TINCLIBC, the calculator app for Wi-Fi setup
tinclib-protocol The wire protocol between calculator and board

See AGENTS.md for the design rules.

Quick start

  1. Flash tinclib-firmware v0.7 onto the board. Older firmware fails the handshake, and the status screen says to update it.
  2. Download TINCLIBC.8xp from Releases.
  3. Send it to the calculator with TI Connect CE or TILP, along with the CE C libraries (graphx, keypadc, fileioc, usbdrvce, srldrvce).
  4. Plug in the board, run prgmTINCLIBC, and add your network under saved networks.

Limits

  • Not in protocol 0.7 yet: scan, connect-now, and the insecure-TLS toggle.
  • Handoff is blocked: see Handoff.
  • Needs a lot of free RAM to start, even when archived: the program (36.5 KB in v0.6.1, 42.5 KB in v0.6.0) is copied into RAM, and LibLoad loads USBDRVCE, GRAPHX, SRLDRVCE, FILEIOC and KEYPADC next to it. 63 KB free wasn't enough on a real TI-84 Plus CE (ERR: MEMORY); after a RAM reset it started. The exact minimum isn't measured. An app that opens TINCLIBC needs this much on top of its own RAM.

Setup

Install the CE C toolchain (v15.0) and put CEdev/bin on your PATH. Dependencies are pinned git submodules under lib/:

Submodule Tag
tinclib v0.7.0
tinclib-protocol v0.7
titrmlib v0.4.2

tinclib has its own nested copy of the protocol, which isn't checked out or built here. CI fails if it pins a different commit than lib/tinclib-protocol.

git clone --recursive https://github.com/gavinhsmith/tinclib-config.git
# or, in an existing clone:
git submodule update --init

Build

make            # -> bin/TINCLIBC.8xp
make handoff    # -> bin/handoff/THANDOFF.8xp, a tinclib app for the handoff test
make clean

To run it, the calculator needs the CE C libraries (graphx, keypadc, fileioc, usbdrvce, srldrvce).

Typing on the keypad: [alpha] types one letter and [2nd][alpha] locks alpha. [mode] switches letters between lower and upper case. Only the symbols . : - ? + " * / , ( ) ^ and space can be typed.

Handoff (TINCHND appvar)

tinclib owns the byte layout (lib/tinclib/src/tinc_config.c), and src/handoff.h mirrors it. TINCLIBC only acts on a request whose result is still NONE. It writes back the result and a nonce echo, then exits. The app comes back through its own os_RunPrgm callback.

The result is:

  • OK if Wi-Fi is up (for TEST_CONN, if the test passed)
  • FAILED with the error code if there's no board
  • CANCELLED otherwise

Known blocker: in CEmu (OS 5.8.5), the handoff crashes the calculator (RAM Cleared) when the called program is bigger than the caller: on launch, or on the callback return. TINCLIBC is about 37 KB, so tests/handoff fails until this is fixed in tinclib or CEdev.

Test

Host tests (plain C, ASan + UBSan):

  • test_handoff: parsing and writing the handoff appvar
  • test_admin: admin command payloads, with the link stubbed
  • test_interop: tinclib's real tinc_openConfig() and tinc_takeSetupResult() against our parser, on tinclib's host stubs
make -C tests            # or: make host-test
make -C tests SANITIZE=  # toolchains without sanitizers (e.g. MinGW)

Emulator tests run in CEmu via cemu-autotester, which ships with the toolchain. You need a TI-84 Plus CE ROM dump (not included; it's copyrighted) with the CE C libraries installed, or set AUTOTESTER_LIBS_GROUP to clibs.8xg:

make && make handoff
AUTOTESTER_ROM=/path/to/ce.rom python tests/autotest.py autotest.json tests/handoff/autotest.json
  • autotest.json: the menu draws (no board in the emulator) and [clear] exits.
  • tests/handoff/autotest.json: THANDOFF calls tinc_openConfig(), TINCLIBC shows its hint, [clear] exits, and THANDOFF's tinc_init() reports FAILED (no board).

tests/autotest.py launches through AsmHook2 on arTIfiCE-jailbroken ROMs (OS 5.5+ has no Asm(), reusing titrmlib's runner. Failing screens are saved as PNGs under tests/build/. To re-record a CRC after a UI change, check the PNG, then copy the CRC the autotester reports into expected_CRCs.

CI/CD

.github/workflows/ci.yml checks the protocol pins match and runs the host tests. It then builds TINCLIBC and THANDOFF and runs the emulator tests.

  • Emulator tests run only when the CE_ROM_TOKEN repo secret is set. Otherwise they're skipped with a warning. The ROM is ~4 MB, far over the 48 KB secret limit, so it lives as ti-84ce.rom in the private repo gavinhsmith/ce-rom. CE_ROM_TOKEN is a fine-grained PAT with read-only Contents access to that one repo.
  • Releases: push a v* tag to publish a GitHub release with TINCLIBC.8xp attached. The release only happens if the emulator tests pass, so none is published while the handoff test is failing (v0.4.0 to v0.4.2 have no release for this reason; v0.6.0 and v0.6.1 were released by hand).

License

Apache 2.0

tinclib-config

TINCLIBC: Wi-Fi setup app for the TI-84 Plus CE. Configures the ESP8266 board, shows status and tests HTTPS, for programs built with tinclib.

C 0 stars 0 forks Updated Oct 20, 2026
8xpccalculatorcalculator-programscedevembeddedesp8266ez80httpsti-84-plus-ceti-84ceti84wifi
View on GitHub
Latest release
v0.6.1Sep 24, 2026
v0.6.1 View release