USB41 :: Linux/Unix version



#18

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.


#19

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


#20

Good news indeed, well done Geir - increasing the number of users will build momentum for a NORM/TRACE support :-) Please?

Cheers,
'AM


#21

Quote:
...NORM/TRACE support :-) Please?

Yes, pretty-please?


#22

+1

#23

Hello Geir,

After some minor modifications it also works on Mac OSX Lion.

First you need Xcode ...
a) download & install xcode 4.3.2 (app store)
b) download & install Xcode command line tools (xcode/preferences/download)

Second you need mac port
c) download & install macport (http://www.macports.org/install.php)
d) sudo port selfupdate
e) sudo port upgrade outdated

Third you need Ruby + extensions
f) sudo port install ruby
g) sudo gem install ruby-serialport

Then the usb41 modifications ...
...
require "rubygems"
require "serialport"
port_str = "/dev/tty.usbserial"
...

then just type

./usb41

or

ruby usb41

and it's working! 8-)

Sylvain


#24

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.

#25

Updated the script again.


#26

New script tested and working perfectly on OSX.

Thanks!

Sylvain


#27

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.


#28

TRACE is the one I need.


#29

+1

#30

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).
For the USB-41 module, MAN mode is the mode that I will use.

b) for program execution the 3 modes have their own advantages

MAN = print functions only

NORM = input values, displayed values, fncs keys & print fncs

TRACE = NORM with program steps as they are executed

Currently, I use the 82143A/82162A printers either MAN or NORM
modes most of the time and TRACE mode when debugging is needed.

Also, I am using the NORM/TRACE mode of the 82143A with the
HP-IL Dev Module in SCOPE mode. When set to 1.5 sec delay,
all HP-IL RAW MSG are printed to the thermal printer.
Very handy for understanding how IL devices behaves on the interface loop.

Having the NORM and/or TRACE mode(s) added to the module will be great.
But then again, the current implementation of the USB-41 is very convenient
for me and covers most of my needs.

Best regards,

Sylvain


#31

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.


#32

Hello Diego,

I knew that for now only unidirectional communication was available,
but I did not expect that you needed bidirectional capability to implement the two other modes. So I was out of line and I am sorry for that.

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

#33

Please send the TRACE mode fix with instructions on how to upgrade. Thanks.

#34

Permanent link to the script "usb41" under "Other tools" on the UC-41 calculator page.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Is Linux common among us RPN types? db (martinez, ca.) 46 2,028 12-11-2013, 08:25 PM
Last Post: Paul Guertin
  EMU41; Dosbox on Linux; Excruciatingly sloooow Geir Isene 9 490 12-01-2013, 05:10 PM
Last Post: Geir Isene
  Building WP 34s emulator on Linux Eric Smith 3 222 07-25-2013, 03:03 PM
Last Post: Marcus von Cube, Germany
  trouble flashing wp34s under Linux Glenn Becker 8 398 07-23-2013, 02:21 AM
Last Post: Marcus von Cube, Germany
  Is there a HP50g emulator for Linux? Matti Övermark 2 206 07-03-2013, 07:40 AM
Last Post: Matti Övermark
  wp34s flashing with linux. Thomas Windisch 6 342 05-14-2013, 07:40 PM
Last Post: Harald
  wp34sflashcmd Linux problem Ole Streicher 1 152 05-09-2013, 07:25 AM
Last Post: pascal_meheut
  OT. Linux on a Ti Nspire. Matt Kernal 0 143 11-17-2012, 03:52 PM
Last Post: Matt Kernal
  off-topic question about linux photo software db (martinez, ca.) 7 335 07-01-2012, 06:35 PM
Last Post: Jeroen Van Nieuwenhove
  USB41 + 41CL connection to PC (for Linux/Mac). Here goes: Geir Isene 1 156 06-13-2012, 04:05 PM
Last Post: Geir Isene

Forum Jump: