USB41 :: Linux/Unix version - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: USB41 :: Linux/Unix version (/thread-223398.html) |
USB41 :: Linux/Unix version - Geir Isene - 05-30-2012 Diego's wonderful USB41 module has just gotten a Linux/Unix upgrade :) With this USB41 Ruby program, you can get the HP-41 to print to your Linux/Unix machine. Simply run the program as root, and any printing from your HP-41 will go to Standard Out. To print whatever comes from the HP-41 straight onto the screen, simply run the program:
usb41 You can of course do all kinds of tricks on the PC side like piping the output or redirect it to a file, etc. To print a program on the HP-41 to the file "myprogram.txt" on the PC, do:
usb41 > myprogram.txt The program defaults to input from /dev/ttyUSB0, but you may specify another input device by simply adding it as an argument to the program:
usb41 /dev/ttyUSB1 Just make sure the program is "runable" (with "chmod a+x") and drop it in your "bin" folder of choice and you are ready to go. Except for ending the program with a "Control-C" on the PC, you may also print the message "PREND", and the program will terminate (just enter "PREND" into Alpha and do XEQ"PRA")
You must have Ruby installed as well as "ruby-serialport" (on Ubuntu or Debian, do "sudo apt-get install ruby-serialport") Edited: 30 May 2012, 5:52 p.m.
Re: USB41 :: Linux/Unix version - Diego Diaz - 05-30-2012 Hi Geir, That's great! Seems that you've found the time for things other than the wonderful Norwegian sky... :-) Although I don't have a linux machine to run it; I'm pretty sure many users out there will find this a really valuable addition to the posibilities of the USB-41 printer simulation. Thanks a lot for yet another improvement to the Clonix/NoV series funtionality. All the best from Caribbean Sea. Diego
Re: USB41 :: Linux/Unix version - Sylvain Cote - 05-30-2012 Hello Geir, After some minor modifications it also works on Mac OSX Lion.
First you need Xcode ...
Sylvain
Re: USB41 :: Linux/Unix version - Ángel Martin - 05-31-2012 Good news indeed, well done Geir - increasing the number of users will build momentum for a NORM/TRACE support :-) Please?
Cheers, Re: USB41 :: Linux/Unix version - Geir Isene - 05-31-2012 Thanks :) Update; I just tweaked the code slightly so that those who have with ruby-serialport installed via RubyGems (not only Mac users) will not have to go in and change the code. To use it on a Mac without any code change, you may use the new version like this:
./usb41 /dev/tty.usbserial or
ruby usb41 /dev/tty.usbserial
Updated version available from the OP link above. Edited: 31 May 2012, 2:56 a.m.
Re: USB41 :: Linux/Unix version - Geir Isene - 05-31-2012 Quote:
Yes, pretty-please?
Re: USB41 :: Linux/Unix version - Sylvain Cote - 05-31-2012 +1
Re: USB41 :: Linux/Unix version - Geir Isene - 05-31-2012 Updated the script again.
Re: USB41 :: Linux/Unix version - Sylvain Cote - 05-31-2012 New script tested and working perfectly on OSX. Thanks!
Sylvain
Re: USB41 :: Linux/Unix version - Diego Diaz - 05-31-2012 Hi all, And thanks a lot for your effort in expanding the platform range available for the USB-41 interface module. I know the lack of a TRACE (see below on NORM) mode in the current implementation of the HP-82143A is a major drawback, and I'm working to overcome such limitation; regerettably, I have not the time nor the tools in my current location but will try my best with available resources. It may take a few weeks though, since I'm "officially" on vacation from next Monday ahead... ;-) My last idea is about using the "doble width" printing flag (useless in the simulator) to switch from MAN to TRACE mode. Suggestions and comments are welcome as usual. I'll keep you posted on any advance regarding this issue. All the best from Dominican Republic. Diego. NOTE: As far as I can tell NORM mode is just intended for paper saving purposes, which has not much sense on a "virtual" printer. Please correct me if I'm wrong but I think that TRACE & MAN modes will be enough to fulfil the text printing needs.
Re: USB41 :: Linux/Unix version - Geir Isene - 05-31-2012 TRACE is the one I need.
Re: USB41 :: Linux/Unix version - Sylvain Cote - 05-31-2012 Hello Diego,
The following describe how I use the thermal printers today.
a) for program listing I use the MAN mode (left align) or the TRACE mode (compact).
b) for program execution the 3 modes have their own advantages
Currently, I use the 82143A/82162A printers either MAN or NORM
Also, I am using the NORM/TRACE mode of the 82143A with the
Having the NORM and/or TRACE mode(s) added to the module will be great. Best regards,
Sylvain
Re: USB41 :: Linux/Unix version - Diego Diaz - 05-31-2012 Hi Sylvain, Thanks for the details on the different printing usage. In its final version, the 82143A simulation should allow user to select any of the three modes. Howevevr, it will need a new firmware including bidirectional transfer, which has not been developed yet. In the meantime I'm trying to find a suitable workaround using unidirectional transfer. For users who prefer the TRACE mode, I can send a replacement file "Clonix-P.asm" with fixed TRACE mode. Although "off topic" I still remember your issue with Double X-MEM emulation, and think I've got a (temporary?) fix: just proceed to [MEMORY LOST ] after inserting your NoV-64/Clonix-D; it has worked for me even at 372KHz. I confess I found this by accident and have only a guess on why it happens but hope this is also usefull for you, and any other user interested in trying the Double X-MEM configuration. Best wishes from the Tropic of Cancer. Diego.
Edited: 31 May 2012, 9:31 p.m.
Re: USB41 :: Linux/Unix version - Sylvain Cote - 05-31-2012 Hello Diego,
I knew that for now only unidirectional communication was available, Trace mode fix already available! Wow that was fast! Yes I am interested :-) I will try your X-MEM fix with both modules (Clonix-D and NoV-64) this week-end and come back to you with the result. Since nobody seemed to use this feature and it understandably had a low fix priority, I have bought on eBay 4 X-MEM modules that will be modified to become 2 Double X-MEM modules. Thanks for everything and I wish you great vacations! Best regards,
Sylvain
Re: USB41 :: Linux/Unix version - Ángel Martin - 06-01-2012 +1
Re: USB41 :: Linux/Unix version - Geir Isene - 06-01-2012 Please send the TRACE mode fix with instructions on how to upgrade. Thanks.
Re: USB41 :: Linux/Unix version - Geir Isene - 06-01-2012 Permanent link to the script "usb41" under "Other tools" on the UC-41 calculator page.
|