Skip to content

calcterm 0.3-alpha: file transfer

Pre-release
Pre-release

Choose a tag to compare

@ctorkildson-netizen ctorkildson-netizen released this 12 Nov 20:46
· 23 commits to main since this release
4c2f667

calcterm 0.3 adds file transfer by ZMODEM: send a short script or config file between the host and the PicoCalc's card over the same serial line you're logged in on, without taking the card out.

It's still an alpha: used daily by one person on one PicoCalc.

What's new

  • sz file on the host sends a file to the PicoCalc. calcterm sees the transfer start and takes it, into /calcterm/files on the card; the bottom line shows how it's going, and says when it's there. Several at once work too: sz *.sh.
  • rz on the host fetches one from the PicoCalc. calcterm opens a list of the card's files: the arrows choose, Enter sends it (or opens a folder), Backspace goes up a folder.
  • Esc stops a transfer at any point, and the terminal comes back clean, with the host's prompt.
  • A damaged packet is sent again, so a noisy line slows a transfer down rather than spoiling it.

The host needs lrzsz (sudo apt install lrzsz, if sz isn't found; Ubuntu has it already).

BOTH WAYS, A FILE OF THE SAME NAME IS REPLACED WITHOUT ASKING: on the card by sz, and in the host's folder by rz. That's deliberate, for small files sent back and forth while you work on them, but there's no undo.

How long it takes

At 115200, a 10 KB script takes about a second, 100 KB about 10 seconds, 1 MB about a minute and a half. It's a serial line: for anything big, the card in a reader or FTP is the better way.

Installing

Copy calcterm.uf2 to the card's pico2-apps folder, replacing 0.2, and start it from UF2 Loader or the shell. Your settings carry over. calcsize.sh and the terminfo entry calcterm.ti are attached as before; the README has the Linux set-up, and now a note on logging out and on keeping the serial login running when the PicoCalc is unplugged.

Known limits

  • After rz, the host's prompt takes another two or three seconds to come back while rz closes up.
  • The line has to carry all eight bits (8N1, as it is unless changed in the setup menu).

Next

0.4 brings telnet: calcterm over Wi-Fi as well as serial.

Built on Blair Leduc's picocalc-text-starter and picocalc-shell; tested against lrzsz's sz and rz. The build is ff566b6 (shown on the sign-on line).