HP-IL: Using 82162A Printer and PIL-Box in Same Loop

I just received J-F Garnier's excellent PIL-Box which I am using with ILPer 1.35.3 to turn my PC into an HP-IL mass storage device.

What I want to do should be simple, but I can't figure out how. I have my 41CX, PIL-Box, and HP-IL printer connected (properly) in a loop. I want to figure out how to execute DIR (or any other printing command, for that matter) so that the listing goes to my real printer, not by default to the virtual one in the the left-hand pane in ILPer. Of course, if communication with PIL-Box is stopped in ILPer, certain things (not the mass storage directory, of course, since I took it off line) print fine to the real printer.

I am sure this has something to do with manually designating the 82162A in lieu of the ILPer display as the default printer, but in the documentation I have, courtesy of the MOHPCDVD, I don't seem to find what I am looking for.

Many thanks in advance.



Hi, Les.

When the calculator (or other controller) sets up the loop, it assigns numerical addresses to each device according to where they sit in the loop physically. The first device encountered in the direction that data flows around the loop is given a loop address of 1. The next one gets 2 and so on until all the devices are enumerated. The device with loop address 1 is designated the "primary" device.

Here's what occurs when you use the loop with the default AUTOIO mode set. If you try to print something, the interface will start at the primary device looking for a printer. (It looks for a device ID with the right numeric value for a printer.) The first one it finds gets the print job. The same thing happens with mass storage commands - the first disk-like device gets the data. You can select other devices by changing the calculator's idea of the primary device. If the 1st and 4th devices in the loop are printers, and you want to print to the one with address 4, you could execute AUTOIO, 4, SELECT. (The initial AUTOIO isn't needed if you are already in that mode, as you are by default.) After these commands, the calculator will start its search at device 4, and will find your desired printer first. You could also SELECT device 2 or 3 and it would have the same effect - your printer would be found first before the one at address 1.

So your calculator must be connected to the PIL-Box in such a way that its virtual devices are first in the loop from the HP-41's point of view. You could re-cable so that your printer was the first device the 41 sees. The male plug on the interface is the one that data will flow towards. But it's also easy to just 3 SELECT to skip the first two virtual devices when searching for the printer.

I think the museum DVD has the HP-IL interface manual. It should be called "HP82160A HPIL Module.pdf". I drew the above information from chapter 4, beginning on page 43, and especially page 46, which discusses SELECT. If you can't find it, drop me some mail, and I'll send you a copy.

Hope this helps.


I have both the Museum DVD and the hard-copy HP-IL Module manual (somewhere) and I just wasn't seeing the obvious.

In my loop, the PIL-Box comes first, so of course print commands would go to the ILPer window by default. 2 SELECT fixed everything.

Many thanks for the generous explanation.



Thanks from me too for the explanation which I've stored away for future use as I have a PIL box on my 'Stuff I need to get' list!




James, my HP-IL module went underused for ages until I invested in the PIL-Box. Purists may want a 9114 drive or tape drive for the retro cachet, but they are not as portable, versatile, easy-to-use, and cost-effective as the PIL-Box. I'd say treat yourself to one. I like mine so much I don't think I need the card reader or wand anymore, as I now have a cleaner and faster way to get programs into and out of the calculator.


Edited: 16 May 2012, 3:05 p.m. after one or more responses were posted


Hi Les

That's good to know, thanks for the added encouragement to buy! As well as my 41 I'm also planning to use it with a 71B in order to be able to experience the 71B Math Rom as suggested in this post.

I just need to let the bank balance recover a bit!




I still have a couple of 9114s, but I rarely use them because the PIL-Box is so effective at connecting the 1980s to the 21st century. I used to use my old HP OmniBook 800CT with the docking station. The expansion includes an ISA slot, so I filled that with the 82973A HP-IL card. I used EMU71 to emulate disk drives and transferred programs and data to and from my 71B and 41C. Rounding out the rig, I have an old Lucent WaveLan card, one of the first WiFi cards available. I stashed it in my miscellaneous box 13 years ago. (Actually, every box I have is a miscellaneous box :) That ca. 1999 802.11B PCMCIA card talks to my vintage 2010 router just fine. Finding the drivers for Windows 98(!) was a challenge, but they're still out there. I used a wired ethernet card to load them on the OmniBook. EMU41 and EMU71 both run fine on the real MS-DOS underlying that piece of crap OS.

Now things are much simpler and better all around. I can do everything I used to do with that monstrous stack of hardware and software, plus I can extend the loop over TCP/IP, which I just love. And it all takes place on a virtual Windows running on my Mac, so setting up a loop is much easier physically speaking. That means I play with it more.

I've said it before, but it bears repeating. I owe a debt of gratitude to JF for his efforts over the years. I used EMU41 from 2003 onward. I am delighted to be using his hardware today to connect my old calcs. (I still use EMU(4|7)1 as well.) My life is quite a bit more fun and satisfying as a result of all the time JF has put in to advancing the state of the HP-41 art.

Thank you, JF Garnier. :)


I second Howard´s praise for JF, one of the key persons without whom this hobby wouldn´t be any near what it is today.

My, was that a serious hardware setup, and I though I had a complex situation just with my OmniBook 800 and the HP-IL ISA card :)


My, was that a serious hardware setup, and I though I had a complex situation just with my OmniBook 800 and the HP-IL ISA card :)

Mine was just like yours, with the addition of the WiFi card. I just used a lot of words to describe it, so it seems more complicated. :)

You've also helped keep me entertained with your software over the years, Ángel. Thanks for all you've added to my hobby. :)


I meant to ask in the previous post but went off my mind (quite a common occurrence these days...):

I can extend the loop over TCP/IP,

How's that feat achieved?? I think I must have missed all about it!





The second diagram on the page Cristoph links to shows the sort of thing possible with the TCP/IP bridge. As shown, both Ilper and Ilpilbox will accept TCP/IP connections, and route to a remote host. The two programs differ in how you set up the link. Ilpilbox's user interface consists of the configuration dialog for TCP/IP. Ilper's TCP/IP configuration dialog can be reached by clicking ther icon in the extreme upper left of the Ilper window. (This is how you get to configurations on Cristoph's calculator emulators too.)

The dialog asks for the hostname of the machine you will send HP/IL data to. ("Out TCP/IP Address") You also must enter the port number the remote Ilper or Ilpilbox software is listening on. ("Out Port") Then you must specify the port to listen to on the local system ("In Port") With Ilpilbox, you also select the serial device the PIL-Box is using. For Ilper, that is configured in the main dialog. Here's a screen shot showing the configuration dialogs.

Instead of "localhost" you would put the IP address or the hostname of the remote system, data will flow toward that system and port address. The in port will be open to receive the return traffic from the remote system. (Note that the remote system could forward traffic to another remote system which could then connect back to your host to complete the loop.)

I've tested all this locally. Using it over the Internet would involve punching holes in the firewall for both the in and out ports. It would not be a good idea to leave any holes open after you are through using them as that would be bad security practice. To give you one example of how this sort of setup could be abused. picture a bad guy connecting to your Ilpilbox and trying to make it crash with any of countless strategies for gaining control of your system. There are no access controls, so anyone could do this. It's much better to set up a link while communicating with the guy on the other end. That way you can verify that the connection is established end-to-end before letting data flow. Even so, you could be subject to man-in-the middle attacks. End-to-end encryption and authentication could help avoid those. Using a pair ssh tunnels could provide both of those security measures. The likelihood of this being a problem is directly proportional to the desirability of any information you have on the inside of your firewall. This is probably not a concern for home use, but in a work setting, it might be.

Hope this helps!


That helps immensely!

J-F's page is a bit out of date so I was working with ILPer 1.35. I was oblivious to all this virtual HP-IL material until I just learned of it and found the more recent utilities on Cristoph's page. It is easy as pie to set up a a loop on localhost, and I will experiment with remote hookups over my home wifi when I get the time. With this set up, one can emulate a loop with a tape drive, a disk drive, and more than one print, and play with switching between them.


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to copy files from 9114B to hard drive via PIL-box? Joe Horn 23 10,271 12-14-2013, 11:57 PM
Last Post: Geoff Quickfall
  PIL-box w/o IL cable = paper weight Joe Horn 15 4,937 11-26-2013, 01:05 AM
Last Post: Les Wright
  How to move lexfiles from PC to 71 w/o HP-IL? Joe Horn 9 3,258 10-18-2013, 03:50 PM
Last Post: Christoph Giesselink
  WP34s integration trapped in infinite loop Bernd Grubert 25 6,944 10-17-2013, 08:50 AM
Last Post: Dieter
  Box left at HHC Tim Wessman 1 1,594 09-26-2013, 11:05 PM
Last Post: Wlodek Mier-Jedrzejowicz
  New community-maintained version of "Calculators benchmark: add loop" Pier Aiello 20 6,162 09-12-2013, 02:42 AM
Last Post: Pier Aiello
  Hand Held Products RS232 to HP-IL aj04062 11 3,455 08-31-2013, 07:12 PM
Last Post: Paul Berger (Canada)
  HP IL over wifi ... (ILPer & go71b) Olivier De Smet 12 4,102 08-20-2013, 05:44 AM
Last Post: Olivier De Smet
  How to open 82162A Thermal Printer Chassis? Ron Fredericks 1 1,164 07-17-2013, 03:58 AM
Last Post: Tony Duell
  Calculator Speed Benchmark (Add Loop) Thomas Chrapkiewicz 2 1,439 01-20-2013, 11:24 AM
Last Post: Thomas Chrapkiewicz

Forum Jump: