saturnus docs
Open the app

Kermit and XModem

The HP calculators move files over their serial port with Kermit (opens in a new tab). The 48G series, the 49G and the 39G and 40G also speak XModem (opens in a new tab). Both sides need the same speed and the same transfer mode; most failed transfers come from a mismatch there. For how Kermit works, see the Kermit Protocol Manual (opens in a new tab) by Frank da Cruz.

Which calculator speaks which

ModelKermitXModemWho starts a transfer
HP 48S, 48SXyes, with a servernothe computer, with the calculator in SERVER
HP 48G, 48G+, 48GXyes, with a serverXSEND and XRECV, binary onlyeither
HP 49Gyes, with a serveryes, and a server, XSERVeither
HP 38Gas a client onlynothe calculator, SEND and RECV
HP 39G, 40Gas a client onlyfor binary apletsthe calculator
HP 42S, 27S, 17B, 17BII, 19BII, 28Sno serial port

Kermit

Bill Catchings and Frank da Cruz designed Kermit at Columbia University in 1981. The calculator talks at 9600 baud, 8 data bits, no parity, 1 stop bit and no flow control.

Starting the server

A Kermit server waits for commands from the client: send a file, take a file, list a directory, run a command. Run the 48 and the 49G as servers, with the computer as the client; the Kermit Project says (opens in a new tab) the 48's own client commands are not reliable.

ModelKeys
HP 48S, 48SXtype SERVER and press ENTER
HP 48G seriesright-shift, then → (the right arrow)
HP 49Gtype SERVER and press ENTER; right-shift and → pressed quickly start it too, but with a pause between the two keys they start XSERV, the XModem server, which typing XSERV and ENTER starts as well

The display then says "Awaiting Server Cmd.".

The 38G, 39G and 40G have no server. The calculator is the client and the computer plays its "disk drive", a folder of aplets: choose SEND or RECV in the Aplet Library, then "Disk drive…".

XModem

XModem goes back to Ward Christensen (opens in a new tab)'s MODEM program of 1977. It sends one file in checked blocks, without its name.

Binary and ASCII

Flag −35 chooses the form a variable travels in: set for binary, clear for ASCII. On the 48G series and the 49G, FMT in the TRANSFER form sets it; on the 49G the form is under APPS, I/O FUNCTIONS.

Binary is the object as it sits in memory, after a header: HPHP48- and a letter on a 48, HPHP49- and a letter on a 49G. It is exact and faster. Both sides must treat the file as binary.

ASCII is the object as text, as the editor shows it, after a header such as %%HP: T(3)A(D)F(.);: the translation mode, the angle mode and the fraction mark. The calculator reads the text back packet by packet, so a syntax error stops the transfer at once, and an arbitrary text file cannot be received in ASCII mode.

A 48 and a 49G can be cabled together with the 49G's adapter. Set FMT to ASCII on both; only objects you created yourself transfer this way.

Translation modes

The translation mode says what happens to line ends and to characters such as →, « » and Σ:

ModeCalculator to computerComputer to calculator
0nothing translatednothing translated
1a line end becomes CR LFCR LF becomes a line end
2as 1, and characters 128 to 159 become codes like \->as 1, and the codes become characters
3as 1, and all characters 128 to 255 become codesas 1, and all codes become characters

Mode 1 is the default, mode 3 the safest for editing on a computer. Binary is never translated.

The settings that matter

These live in the variable IOPAR in HOME, apart from the flags; on the 48G series and the 49G the TRANSFER form sets them. Deleting IOPAR brings back the defaults.

Tips

When a transfer fails

Programs on the computer

A Kermit program

Any Kermit program works with the calculator as server. The Kermit Project's settings (opens in a new tab) for C-Kermit (opens in a new tab) and Kermit 95, with your serial port in place of COM1:

SET MODEM TYPE DIRECT
SET PORT COM1
SET SPEED 9600
SET CARRIER-WATCH OFF
SET FLOW NONE
SET PARITY NONE
SET CONTROL PREFIX ALL
SET BLOCK 3

Set the file type to binary or text to match flag −35. REMOTE DIRECTORY, GET and SEND then talk to the server, and FINISH ends it.

satx and Files

satx is the project's command-line tool for the Kermit server, and for XModem on the 48G series and the 49G. Files in the app runs the same code in Chrome, Edge or the desktop app, and is the disk drive for a 38G, 39G or 40G. Conn4x, by Bill Graves, is a Windows program for the 49G and, with its XModem server library, the 48.

HPComm and HPGComm

HPComm is a Windows program by Jean-Pierre "James" Bergamin, the author of saturnus, for moving files between a PC and an HP 48 or 49G. It shows the calculator's directories beside the PC's folders, as Windows Explorer does, and files move between them by drag and drop, over Kermit. Version 2.4 came out as open source in February 1999.

HP then approached the project. HPComm 3.0, written by James Bergamin and Mitch Davis of HP, became the software of HP's Graphing Calculator PC Connectivity Kit (F1897A) in 1999, for the 48 series and the new 49G, and HP agreed to release it under the GNU GPL (opens in a new tab). The last version, 3.0r4, came out in June 2000.

For the 38G, HPComm38 split off at the end of 1999 and shipped in HP's HP38G PC Connectivity Kit. Reworked for the 39G and 40G, it became HPGComm: version 2.0 in June 2001, 2.01 in July. It serves a folder as the calculator's "disk drive", shows the calculator's screen on the PC, and sends binary aplets to the 39G and 40G by XModem.

The dog on the splash screen and the program icon is Spot, drawn by ishadyn (opens in a new tab) (@ishadyn_comic (opens in a new tab) on Instagram).

The source code, the help and the hpcomm.org website are archived on GitHub (opens in a new tab). HPComm 3.0r4, the kit's version, as well as HPComm 2.4 and HPGComm 2.0 are still on hpcalc.org (opens in a new tab).

Sources