Various products for transferring data between PCs and the HP-48 have appeared that include our MS-DOS Kermit software without our permission. People often complain to us that these products stopped working when they upgraded their PCs to Windows 9x, ME, NT, 2000, or XP. That is because MS-DOS Kermit is a DOS program, not a Windows program. The Kermit software for Windows 95/98/ME/NT/2000/XP is Kermit 95. See:
http://www.columbia.edu/kermit/msk95.html http://www.columbia.edu/kermit/k95.html
The following hints come from discussions on the comp.sys.hp48 newsgroup, and seem to reflect a concensus among HP-48 users (but with no guarantees). Special thanks to Andy Fox, John H. Meyers, Skip Collins, Diego Berge, Eric Rechlin, Joe Horn, Dan Kirkland, and David Porter.
COMMUNICATIONS SETTINGS
PROTOCOL SETTINGS
PROGRAMS VERSUS DATA
WINDOWS TAPI
HP-48 KERMIT PROTOCOL NOTES
SUMMARY
FURTHER INFORMATION
The maximum speed of the HP-48's built-in Kermit program is 9600 bps, and this is also its default speed. By default, it also uses 8 data bits, no parity, 1 stop bit, and no flow control. In case the defaults have been changed, they can be restored by deleting the IOPAR variable in the HP-48 HOME directory.
The IOPAR variable contains six fields (perhaps fewer in earlier models):
The instructions below apply to MS-DOS Kermit, C-Kermit, and Kermit 95 when used with a COM port (as opposed to a Windows TAPI device). For Windows TAPI instructions, see the TAPI section.
SET MODEM TYPE DIRECT ; (C-Kermit or Kermit 95 only)
SET PORT COM1 ; (Or other communication port)
SET SPEED 9600
SET CARRIER-WATCH OFF
SET FLOW NONE
SET PARITY NONE
Most users recommend that the HP-48 Kermit program be run in server mode. In the following discussion, we assume the HP-48 is the server, and the other Kermit program (on the computer to which the HP-48 is connected by its serial cable) is the client. (We do not recommend configuring the HP-48 as the client; some of its client commands, such as REMOTE DIRECTORY, might not work as expected.)
SET BLOCK 3 ; (or 2)Otherwise, the two Kermits automatically fall back to Type 1.
SET CONTROL PREFIX ALL
The remaining settings depend on the type of file that is being transferred and the direction of transfer.
The HP-48 Kermit implementation embeds two extra services not normally considered part of Kermit; if the HP-48 is told to send in "ASCII mode," it both "decompiles" (translates an internal binary object into ASCII words) and translates some or all of the ASCII characters having decimal value 128-255 into "backslash-prefixed" codes (some digraphs, some numeric codes); carriage returns may also be inserted before linefeeds as this occurs.
Conversely, if the HP-48 is told to receive in "ASCII mode," it performs character translation (backslash-prefixed codes into single characters) and then also "compiles" on the fly (translating text words into binary internal objects), in which case any syntax error terminates the transfer immediately (thus compiling is performed per packet, rather than after receipt of the entire file). Therefore, it is not possible to send an arbitrary file to the HP-48 in text mode.
The HP-48 allows you to select the "character translation mode": 0, 1, 2, or 3, which determines how the HP-48 should apply backslash notation during ASCII (text-mode) sends. The translation modes are:
Options 1, 2 and 3 cause each ASCII 10 (Linefeed) to be converted to a 10 and a 13 (Carriage Return and Linefeed). Options 2 and 3 convert one backslash character to two backslash characters. Option 2 translates characters 128 through 159, while option 3 translates characters 128 through 255. The actual translation characters are in the Owner's Manual.
When sending in "binary mode," no translation occurs, and no slowdown occurs. When receiving in "binary" mode, the entire file is received as a string; however, the appending of each new packet to the string, copying the entire received string each time, causes a slowdown (every now and then it may suddenly revert to the original speed, perhaps after storing a large chunk of the received string, or else after an internal "garbage collection").
Only after the entire "binary" file is received does the HP-48 take one more step, unrelated to Kermit, in which it checks to see whether the received file begins with a specific prefix "HPHP48-x" and if so, whether all the rest of the received bytes constitutes a valid internal HP-48 binary object; if so, the HP-48 delivers the extracted binary object as its result, and otherwise it leaves the received string as the result (thus allowing any computer file to be received literally as a string, even if it does not represent anything meaningful to the HP-48).
Because the HP-48 slows down when receiving data, it might be necessary to tell the client to increase its timeout, and/or to pause before sending each packet, for example:
SET SEND TIMEOUT 20 ; Number of seconds SET SEND PAUSE 100 ; Number of milliseconds
To connect Kermit 95 with Windows Telephony (TAPI) to the HP-48, install a modem with the type "Dial-Up Networking Serial Cable between 2 PCs" into the Modems Control Panel. Then set the Properties:
In the K95 Dialer, create a Modem Object for the "Dial-Up Networking Serial Cable between 2 PCs" modem and then select that modem in the connection entry you define for use with the HP-48.
Or from the K95 command prompt:
SET TAPI LINE Dial-Up_Networking_Serial_Cable_between_2_PCs
Reportedly the following command, rather than REMOTE CD, must be given to the Kermit client to change the HP-48 Kermit server's working directory:
REMOTE HOST { relative_directory_name } EVAL
(The remainder of this section is from Joe Horn, http://holyjoe.net/hp/HP48.htm).
The Owner's Manual is sparse regarding the HP 48's response to Kermit packets when in Server Mode. It's even sparser regarding Server Mode's response from MS-DOS Kermit. So here's the whole scoop. This will let you use the HP 48's PKT command to control another HP 48 or a PC. Note: Set a TIO mode > 0 for proper CR/LF translation.
HP48 Kermit SERVER Mode responses:
The "I", "S", and "E" packet types generate useless responses.
No other packet types or "G"-type commands are recognized.
MS-DOS Kermit Server responses (when MS-DOS Kermit is in server mode and the HP-48 is the client):
The "S" and "E" packet types generate useless responses.
The "GE" and "GT" commands work, but require length encoding for the filename. It is easier to use "DEL options" "C" PKT and "TYPE options" "C" PKT instead, respectively.
No other packet types or "G"-type commands are recognized.
Note: MS-DOS Kermit sends "C" commands to the DOS command-line interpreter. If you have something other than DOS's COMMAND.COM running as your primary shell (such as 4DOS, which I use), then you can use whatever commands it can handle.
Put the HP-48 in Kermit server mode. Set up the Kermit client like this:
SET MODEM TYPE DIRECT ; (C-Kermit or Kermit 95) SET PORT COM1 ; (Or other communication port) SET SPEED 9600 ; (Serial port speed) SET CARRIER-WATCH OFF ; (Don't require carrier) SET FLOW NONE ; (Don't use flow control) SET PARITY NONE ; (8 data bits, no parity) SET BLOCK 3 ; (if desired, or 2) SET CONTROL PREFIX ALL ; (Necessary in Kermit 95)
For file transfer, use binary mode unless you are exporting or importing HP-48 objects:
SET FILE TYPE BINARY
To transfer files:
SEND filename ; Send file(s) to the HP-48 GET filename ; Get file(s) from the HP-48
To change directory on the HP-48:
REMOTE HOST { relative_directory_name } EVAL
To shut down the HP-48 Kermit server:
FINISH
If file transfers fail, try:
SET SEND TIMEOUT 20 ; (Or other number of seconds) SET SEND PAUSE 100 ; (Or other number of milliseconds)
If you have corrections or additional information to contribute, please send them to kermit@columbia.edu.