Post Reply 
making HP39GS Serial Cable (RS-232)
05-02-2019, 04:26 PM
Post: #1
making HP39GS Serial Cable (RS-232)
Hello

What is the proper type of HP39GS serial port connector, does anyone know? Looked for Fuji 4P Mini-B USB cables (usb2-119fcam) but it looks like to be not very good.

I managed to build serial cable between two 39GS's using quite inexpensive Fuji Cables. Warning! I also managed to fry one of my calculators when connecting it to my mac. It is risky, eventhough cable connector do get into after "removing some plastics" it is not perfect fit and looks like it might lead to short circuit as I did. The connectors do not fit so it can be somewhat not straight, which is of course bad.

What I did was to buy 2 Fuji cables, and female-to-female usb connector. Also I opened one of the cables and connected white and green wires (data+ and data- in usb cables, which are the pin numbers #2 and #3, and also are connected to HP39GS rs-232 port's data recv and send pins) in order to get crossover cable. Then I put all these together with calculators, and send the Snake game to other calculator using "send/receive to HP39GS (serial)" functionality. First it didnt work, because of apparent short-circuit or other stuff but then it finally started sending when I managed to get connectors straight and the "cross-over" connection better (didnt solder for this demo!).
Find all posts by this user
Quote this message in a reply
05-02-2019, 09:14 PM
Post: #2
RE: making HP39GS Serial Cable (RS-232)
You are asking the SERIAL port and not the USB port, right? (it has both)

Assuming you mean the serial port, see notes on this page:

https://commerce.hpcalc.org/serialcable.php

This is about the 50g, but the serial port in the 39gs is the same h/w as the 50g.

Also, more details here:

https://www.allenwan.com/hpcalcserialcable/

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
05-03-2019, 02:45 AM (This post was last modified: 05-06-2019 03:16 AM by ilkka777.)
Post: #3
RE: making HP39GS Serial Cable (RS-232)
(05-02-2019 09:14 PM)rprosperi Wrote:  You are asking the SERIAL port and not the USB port, right? (it has both)

Assuming you mean the serial port, see notes on this page:

https://commerce.hpcalc.org/serialcable.php

This is about the 50g, but the serial port in the 39gs is the same h/w as the 50g.

Also, more details here:

https://www.allenwan.com/hpcalcserialcable/

Yes, a Serial port. I thought it could be hiroso connector, but im not sure anymore.

The first page you are referring sells the correct cable, but still its mystery what is the correct connector. maybe there is no name for it. allenwan.com refers to cable product in the commercial site selling these, but the product is disappeared so it didnt help.

samson cables do sell some cables but im not sure are these the correct ones
http://www.samsoncables.com/catalog/prod...MiniB-USBA
Edit: Samson cables responded it's a standard mini usb b to usb a, so im quite sure it is not the right cable. strange, in the picture it looks like to be the correct one with non-standard connector -- maybe it just looks like it
Find all posts by this user
Quote this message in a reply
05-06-2019, 03:22 AM
Post: #4
RE: making HP39GS Serial Cable (RS-232)
(05-02-2019 09:14 PM)rprosperi Wrote:  You are asking the SERIAL port and not the USB port, right? (it has both)

Assuming you mean the serial port, see notes on this page:

https://commerce.hpcalc.org/serialcable.php

This is about the 50g, but the serial port in the 39gs is the same h/w as the 50g.

Also, more details here:

https://www.allenwan.com/hpcalcserialcable/

I wonder what is the protocol used? looks like to be full duplex, and not right rs-232. RTS and CTS signals looks like to be used. Receiver pulls its TX line up (CTS? send as RX for sender) and sender pulls its TX line up (RTS?), maybe I got signal level problem since I cant get HP39GS (around 5V Vcc) sending anything to my arduino (3.3V). I dont understand what is wrong?

I found this one for HP48, gives a hint that perhaps some kind of "proportional negative voltage levels" are used (?): https://www.keesvandersanden.nl/calculat...System.pdf
Find all posts by this user
Quote this message in a reply
05-06-2019, 04:25 AM
Post: #5
RE: making HP39GS Serial Cable (RS-232)
RS-232 uses voltages between -15 V and +15 V and negative logic. What you know as "RS-232" or "serial connection" uses the same binary encoding, but inverted, positive logic and TTL levels (0 V to 5 V or 3.3 V). You should always include some kind of level converter or you might destroy your components.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-06-2019, 04:38 AM
Post: #6
RE: making HP39GS Serial Cable (RS-232)
(05-06-2019 04:25 AM)SammysHP Wrote:  RS-232 uses voltages between -15 V and +15 V and negative logic. What you know as "RS-232" or "serial connection" uses the same binary encoding, but inverted, positive logic and TTL levels (0 V to 5 V or 3.3 V). You should always include some kind of level converter or you might destroy your components.

Thanks, is there also some kind of handshake before data is sent?
Find all posts by this user
Quote this message in a reply
05-06-2019, 04:43 AM (This post was last modified: 05-06-2019 04:48 AM by ilkka777.)
Post: #7
RE: making HP39GS Serial Cable (RS-232)
(05-02-2019 09:14 PM)rprosperi Wrote:  You are asking the SERIAL port and not the USB port, right? (it has both)

Assuming you mean the serial port, see notes on this page:

https://commerce.hpcalc.org/serialcable.php

This is about the 50g, but the serial port in the 39gs is the same h/w as the 50g.

Also, more details here:

https://www.allenwan.com/hpcalcserialcable/


This post had good set of links, some of those you mentioned too:
https://www.hpmuseum.org/forum/thread-75...rial+cable

Still too little information around the web or im not finding any.

So far I gathered
* Voltage levels all positive (as claimed), 3.3V and Vcc from battery around 5-6V
* USB connector is same as Minolta DiMAGE S-304/404/414
* bits are sent like 8N2 as far as I understand?: no parity, two stop bits, 8 bit data, one start bit
-> technical interfacing guide explains how to create HP objects, like lists or matrices *)
* idle state between byte transmissions (stop bits)
* not sure how end of transmission is signaled?
* still unsure how handshake is done when transmitting serial (from menu send to another HP39GS thru serial)

*) downloaded some HP objects, in hex editor there can be easily seen the header, file name and HP Object with prolog & epilogue (please notice it uses 4bit nibbles, LSB (or should I say "least significant nibble") first, so it is harder to read when two nibbles of different fields are located in one same byte)
Find all posts by this user
Quote this message in a reply
05-07-2019, 05:10 AM
Post: #8
RE: making HP39GS Serial Cable (RS-232)
Hello,

Depending on the cals, the higher level protocols will be either an improved version of X-modem or Kermit...
Some other logical data can be exchanged to do directory listing and the like.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
05-07-2019, 05:51 AM (This post was last modified: 05-07-2019 08:14 AM by ilkka777.)
Post: #9
RE: making HP39GS Serial Cable (RS-232)
(05-07-2019 05:10 AM)cyrille de brébisson Wrote:  Hello,

Depending on the cals, the higher level protocols will be either an improved version of X-modem or Kermit...
Some other logical data can be exchanged to do directory listing and the like.

Cyrille

Hp39GS, HP40GS and HP50, assuming they all use the same. These are newer calculators, what do you think about the protocol?

Also the Baud rate would be important to know in order to sniff the protocol details, if you know it?

now im getting like 2 bytes of data or so from receiving calculator (clear to send signal??) but not sure is it correct because it looks like question mark mirrored (?, but mirrored), In HEX its like 3E3E so it looks like a pattern. Not sure it is just gibberish though. Tried to use several different baud rates.

Edit: I had error, corrected
Find all posts by this user
Quote this message in a reply
05-07-2019, 08:18 AM (This post was last modified: 05-08-2019 12:01 AM by ilkka777.)
Post: #10
RE: making HP39GS Serial Cable (RS-232)
(05-07-2019 05:51 AM)ilkka777 Wrote:  
(05-07-2019 05:10 AM)cyrille de brébisson Wrote:  Hello,

Depending on the cals, the higher level protocols will be either an improved version of X-modem or Kermit...
Some other logical data can be exchanged to do directory listing and the like.

Cyrille

Hp39GS, HP40GS and HP50, assuming they all use the same. These are newer calculators, what do you think about the protocol?

Also the Baud rate would be important to know in order to sniff the protocol details, if you know it?

now im getting like 2 bytes of data or so from receiving calculator (clear to send signal??) but not sure is it correct because it looks like question mark mirrored (?, but mirrored), In HEX its like 3E3E so it looks like a pattern. Not sure it is just gibberish though. Tried to use several different baud rates.

Edit: I had error, corrected

Ok, I was wrong (got bug with character conversions), it sends first character "D" three times and then NAK, could it be possibly negotiating the protocol this way? Tried to send NAK the receiving HP39GS but it sends weird set of frames -- does not look like X-Modem to me? Can anyone know the protocol?

https://pythonhosted.org/xmodem/xmodem.html

http://web.mit.edu/6.115/www/amulet/xmodem.htm

Edit: removed some text which was error, my program read false characters leading to wrong conclusion
Find all posts by this user
Quote this message in a reply
05-07-2019, 08:04 PM
Post: #11
RE: making HP39GS Serial Cable (RS-232)
(05-02-2019 04:26 PM)ilkka777 Wrote:  What is the proper type of HP39GS serial port connector, does anyone know? Looked for Fuji 4P Mini-B USB cables (usb2-119fcam) but it looks like to be not very good.

The 4-Pin Mini-B is the correct connector. There's plenty of different cable brands out there with that connector. Unfortunately, it's been a long time since I bought mine so I can't recall the brand but it was a nice fit. Just keep trying other brands.
Find all posts by this user
Quote this message in a reply
05-07-2019, 11:35 PM (This post was last modified: 05-07-2019 11:37 PM by ijabbott.)
Post: #12
RE: making HP39GS Serial Cable (RS-232)
The USB Mini-B connector connects to a simple USB-to-serial adapter device inside the calculator, but there is another serial port like on the 50g, as mentioned by Bob in post #2 above.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
05-08-2019, 12:00 AM
Post: #13
RE: making HP39GS Serial Cable (RS-232)
(05-07-2019 08:04 PM)Claudio L. Wrote:  
(05-02-2019 04:26 PM)ilkka777 Wrote:  What is the proper type of HP39GS serial port connector, does anyone know? Looked for Fuji 4P Mini-B USB cables (usb2-119fcam) but it looks like to be not very good.

The 4-Pin Mini-B is the correct connector. There's plenty of different cable brands out there with that connector. Unfortunately, it's been a long time since I bought mine so I can't recall the brand but it was a nice fit. Just keep trying other brands.

Hiroso is best fit! I just got that one, after trying couple. Just connect black side up so that pins are correct.

I confirm, that X-modem can be used as serial protocol. Possibly Kermit can be used too.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 7 Guest(s)