From pelicano.dpi.udec.CL!news.concep.reuna.cl!news.ctcreuna.cl!tandemnet.tandem.cl!dcc.uchile.cl!uunet!in1.uu.net!nntprelay.mathworks.com!news-ge.switch.ch!news.rediris.es!news.uva.es!not-for-mail Mon May 25 09:36:31 1998
Path: pelicano.dpi.udec.CL!news.concep.reuna.cl!news.ctcreuna.cl!tandemnet.tandem.cl!dcc.uchile.cl!uunet!in1.uu.net!nntprelay.mathworks.com!news-ge.switch.ch!news.rediris.es!news.uva.es!not-for-mail
From: guile@gui.uva.es (EliuG)
Newsgroups: comp.sys.hp48
Subject: Re: KINUX AND HP
Date: 12 May 1998 17:21:48 GMT
Organization: Universidad de Valladolid - Spain
Lines: 105
Sender: guile@enete.gui.uva.es
Message-ID: <6ja0fc$f7b$1@simancas.cpd.uva.es>
References: <3557B8DC.6A9BD47B@psci.net>
NNTP-Posting-Host: enete.gui.uva.es
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
Xref: pelicano.dpi.udec.CL comp.sys.hp48:4499

Joe Alan Mackey (joealan@psci.net) wrote:
: Is there any software available to communicate from a LINUX computer and
: a HP calculator?
Yes, I posted for a year or so a script to upload files using x-modem
protocol to the hp, and Rune Mathisen enhanced it to receive files also.
I put his post here:

Hi!
To obtain some experience using my HP48 AND writing Unix shell
scripts, I wrote the script included below. It is a modification of a
script posted here earlier by Guile. It should be fairly well
documented and easy to use. Please email me if you have any comments
or suggestions, as I am not reading this group on a regular basis!
Enjoy! 
--8<--cut here--
#!/bin/sh
  
#  48trans 1.0
#  Written by Rune Mathisen <mathrune@online.no>
#  Based on a script made by GuiLe <guile@gui.uva.es>

#  Permission is granted to freely use, distribute, and/or modify 
#  this script for use on your system provided that credits to the 
#  author are maintained. I am *NOT* responsible for anything bad 
#  that might happen because of these scripts.  It doesn't do anything 
#  bad on my system, but it is not my fault if it does something bad 
#  on your system!

#  Purpose:
#  Send and receive data to/from a HP48 (or X48 :-) using the xmodem
#  protocol.

#  Requirements:
#  You will need the programs 'sx' and 'rx' to use this
#  script.  They are included in the package lrzsz (I use v. 0.12.14).
#  Go to http://ftpsearch.ntnu.no/ and do a case insensitive glob
#  search for 'lrzsz*' to obtain a copy of this package.
#
#  You will will need read/write access to the device you are trying
#  to send/receive data to/from (which is pretty obvious :-).
#  Your HP48 IO parameters must be { 9600 0 0 1 3 0 }.

#  Usage:
#  * Uploading data from your computer to your HP48:
#    Assuming that your HP48 is connected to cua1(com2), type:
#        48trans put filename /dev/cua1
#    where 'filename' is the name of the file you want to send to
#    your HP48.
#    Now prepare your HP48 for the transfer:
#      - Enter a variable name on the stack
#      - [leftshift] [I/O] [NXT]
#      - Press [xrecv]
#    The transferred data is stored in the variable name you entered.
#
#  * Downloading data from your HP48 to your computer:
#    Prepare your HP48 for the transfer:
#      - Enter the variable name you want to transfer on the stack
#      - [leftshift] [I/O] [NXT]
#      - Press [xsen]
#    Assuming that your HP48 is connected to cua1(com2), type:
#        48trans get filename /dev/cua1
#    The transfered variable is stored in 'filename' in your current
#    directory.

FILE=$2
DEVICE=$3
HELPMSG="Usage: 48trans get/put file device"

case $# in
    3)
    case $1 in
	    put) 
		(stty -evenp -cstopb cread clocal -crtscts\
			-inpck -inlcr -icrnl igncr ixon ixoff \
			-iuclc -ocrnl -onlcr -onocr -onlret 9600
		sx -vv $FILE) < $DEVICE > $DEVICE;
		echo -e "\n";
		;;
	    get)
		(stty -evenp -cstopb cread clocal -crtscts\
			-inpck -inlcr -icrnl igncr ixon ixoff \
			-iuclc -ocrnl -onlcr -onocr -onlret 9600
		rx -vv $FILE) > $DEVICE < $DEVICE;
		echo -e "\n";
		;;
	    *)
		echo $HELPMSG
	esac
	;;
    *)
    echo $HELPMSG
esac
--8<--cut here--

-- 
Rune Mathisen      "There is is no reason for any individual to have a 
                    computer in their home."
                    -- Ken Olsen (President of Digital Corp),
                       Convention of the World Future Society, Boston, 1977

-- 
Felix Ortega:  (\^/) Avoid the Gates of Hell.  Use Linux
e-mail: guile@gui.uva.es  -  FidoNet: None at the moment
This message was brought to you by Linux, the free unix.


