From: Marcus von Cube on
Hello friends!

As a computer professional and hobbyist, I've spent considerable time in
writing communication software, from serial lines to TCP/IP, RMI, MqSeries,
SNA and the like.

It's time to do it again in a completely foreign environment (at least for
me).

I plan to create a library for the 39G/40G (should work on the 39GS/40GS,
too) which enables the user to transfer assorted items (real and complex
variables, lists, arrays, matrices, notes) from the calculator to another
calculator of a different family, that is, the 49G series (49G, 49g+, 50g).
Transfers should be possible in both directions.

Connections can be made in the following ways:

o 39G/40G to 49G: RS232 unit to unit cable (10 pin)
o 39G to 49g+/50g: IrDA (is that possible or are protocols different?)
o 39GS/40GS to 50g: 3.3V serial unit to unit cable (comes with 40GS!)
o 39GS to 49g+/50g: IrDA.
o 39GS/40GS to 49g+/50g: USB (unit to unit cable as provided with some TI
calcs).

The protocol should be XMODEM. I think the best transfer mode will be ASCII
but the SysRPL gurus here might think different (are these machines using the
same binary representation?). ASCII mode has the advantage of a universal
transfer header ("%%HP" if I remember correctly.)

I was able to send a note from my 40GS to the 50g with the supplied cable. It
arrived as a string object with binary contents on the 50g, still containg
the 39G header. There is no way yet to use the data or to transfer something
back.

I can't start with my little project because I'm missing crucial information
on the topic. I have no idea of the following:

o How do I select and configure the communication port ?
o Can I use the built in XModem routines or do I have to create my own?
o If I have to implement XModem myself, how do I access the communication
port(s)?
o Can USB be used in a peer-to-peer fashion ?

A good starting point could be some SysRPL source. I found some programs by
Jean Yves Avenard to exchange data between a 48G and the 38G
(http://etud.epita.fr/~avenar_j/hp/38.html). They are just the binaries. In
order to get started, the source code would be a gem! I hope I can learn
something about communication programming from the XMODEM server for the 38G!

I've skimmed through hundreds of pages of SysRPL documentation and tutorials
but have yet to create my first program. I'm pretty sure I will if the
community comes up with some hints...



Marcus von Cube
Wehrheim, Germany
--------------------------------------------------------------
http://www.mvcsys.de Cruising with eComStation and PMINEWS/2
--------------------------------------------------------------



From: John H Meyers on
On Thu, 19 Oct 2006 11:08:34 -0500, Marcus von Cube wrote:

> I plan to create a library for the 39G/40G (should work on the 39GS/40GS,
> too) which enables the user to transfer assorted items (real and complex
> variables, lists, arrays, matrices, notes) from the calculator to another
> calculator of a different family, that is, the 49G series (49G, 49g+, 50g).
> Transfers should be possible in both directions.

> The protocol should be XMODEM. I think the best transfer mode will be ASCII.

The 49G series already has a completely built-in capability
to send and receive source-text-based files using Kermit protocol;
the Conn4x USB-based software also permits ascii transfer
using the calcs' built-in "Xmodem server," but if
that system relies on a piece of software which
Conn4x must first send in binary to the calc,
then you'll likewise need to install a program or library
into the 49-50 series calc before talking
to any other Xmodem-based device for ascii transfer,
whereas no additional software is currently required
for ascii transfer using Kermit (provided that it
properly "negotiates down" at the outset to accept
the dumbest original level of Kermit capability).

If you do create a new similar library, you might want
to consider protecting against any transferred text
being directly executed as commands instead of stored
(the last Conn4x I've used would execute all transferred text
as if entered into the command line -- if it happened
to produce an object that could be stored into
a legally named variable, fine; if instead it executed
and produced nothing left over to be stored, then not only
would the calc obey and perform any commands sent to it,
but the procedure also produced an error and did not
complete the restoring of flag settings in the calc).

Various suggested means for doing this have been posted
and can be searched at Google Groups if you can access that
(currently we can not).

Best wishes from http://www.mum.edu
and http://www.maharishischooliowa.org