Subject: RS232 connection via PORT program

From: "Michael Zapf" <[email-masked]>
Date: Sat, 06 Aug 2011 23:41:45 -0000

Hi all,

I'm happy to announce that obviously the serial connection between the MESS Geneve emulation and the real Geneve is now working with handshaking! This should also work for an attached TI, but has not been checked by me.

I just tested positively transferring a file from the emulated to the real system and back, both at 38400 baud, using the PORT program on both sides. It worked without errors (or maybe one while synchronizing). As sample file I'm using the text file UPDATE_200, 161 sectors long. I believe that this proves the correct operation of the handshaking because this would not have worked without handshaking at this speed. 

Between the PC and the TI/Geneve, a 1-1 cable must be used (2 on 2, 3 on 3, ... 20 on 20). Within MESS I have the chance to emulate a special cable by defining the mapping between pins. So for PORT I emulated the "JEFF cable" which seems to work. However, this cable does not work for other terminal programs like MYTERM. So I will add a configuration switch in MESS which allows for choosing the pin mapping as desired. 

It may well be that this first complete implementation still shows some deficiencies and unrealiability, so please be patient while we get the wrinkles ironed out as we gain more experience. 

I asked another MESS developer to port the SDL implementation of the socket connection to the Windows API, so this will hopefully soon be available for MESS in Windows.

Michael

---

From: Jeffrey White <[email-masked]>
Date: Sun, 7 Aug 2011 07:51:25 -0700 (PDT)

Too bad I did not come up with the "JEFF cable" sooner.  Then maybe other TE's 
like Telco, Gen-Tri, FastTerm, etc. -- there were many -- would have used it.  
Maybe it would have opened the door to TCP/IP stack usage on dial-up systems -- 
they still exist.

Mike Maksimik came up with the "MIKE cable" which requires slight hardware 
modification.  Jeff Brown came up with a cable nearly identical to the "JEFF 
cable" about the same time that I did.

Back to the topic of Mess with Port.  I am perplexed that a straight-through 
cable is used between the PC and Geneve/TI.  Surely this is a Mess-construct, 
and such a cable would not work between PC Hyperterminal and Geneve Port.  What 
about a 9-pin COM port?

With regards to the "JEFF cable" not working with MYTERM, the AT&D0 command 
should allow it to work with Hayes-compatible modems.  A slight modification to 
the cable might also work, and still allow handshaking:

RS232  Modem  Name 
  1      1    Protective Ground 
  2 <--  3    Receive Data 
  3 -->  2    Transmit Data 
  5 -->  4    Request to Send 
  8      -    No connection 
  7      7    Logical Ground 
  6 --> 20    Data Terminal Ready 
 20 <--  5    Clear to Send 

I have simply swapped pins 6 and 8 at the TI RS232, so that the toggle of 9902 
"RTS" does not disconnect.  The RS232 stuff sure is messy.  I propose to name 
the above configuration the "MESS Cable" should you decide to adopt it.

Jeff White

________________________________
From: Michael Zapf <[email-masked]>
To: [email-masked]
Sent: Sat, August 6, 2011 7:41:45 PM
Subject: [TI994A] RS232 connection via PORT program

Hi all,

I'm happy to announce that obviously the serial connection between the MESS 
Geneve emulation and the real Geneve is now working with handshaking! This 
should also work for an attached TI, but has not been checked by me.

I just tested positively transferring a file from the emulated to the real 
system and back, both at 38400 baud, using the PORT program on both sides. It 
worked without errors (or maybe one while synchronizing). As sample file I'm 
using the text file UPDATE_200, 161 sectors long. I believe that this proves the 
correct operation of the handshaking because this would not have worked without 
handshaking at this speed. 

Between the PC and the TI/Geneve, a 1-1 cable must be used (2 on 2, 3 on 3, ... 
20 on 20). Within MESS I have the chance to emulate a special cable by defining 
the mapping between pins. So for PORT I emulated the "JEFF cable" which seems to 
work. However, this cable does not work for other terminal programs like MYTERM. 
So I will add a configuration switch in MESS which allows for choosing the pin 
mapping as desired. 

It may well be that this first complete implementation still shows some 
deficiencies and unrealiability, so please be patient while we get the wrinkles 
ironed out as we gain more experience. 

I asked another MESS developer to port the SDL implementation of the socket 
connection to the Windows API, so this will hopefully soon be available for MESS 
in Windows.

Michael

---

From: Insane Multitasker <[email-masked]>
Date: Sun, 7 Aug 2011 10:39:32 -0500

How about naming it the "MESSy JEFF" cable?  ;)_

To: [email-masked]
From: [email-masked]
Date: Sun, 7 Aug 2011 07:51:25 -0700
Subject: Re: [TI994A] RS232 connection via PORT program

Too bad I did not come up with the "JEFF cable" sooner.  Then maybe other TE's like Telco, Gen-Tri, FastTerm, etc. -- there were many -- would have used it.  Maybe it would have opened the door to TCP/IP stack usage on dial-up systems -- they still exist.
 
Mike Maksimik came up with the "MIKE cable" which requires slight hardware modification.  Jeff Brown came up with a cable nearly identical to the "JEFF cable" about the same time that I did.
 
Back to the topic of Mess with Port.  I am perplexed that a straight-through cable is used between the PC and Geneve/TI.  Surely this is a Mess-construct, and such a cable would not work between PC Hyperterminal and Geneve Port.  What about a 9-pin COM port?
 
With regards to the "JEFF cable" not working with MYTERM, the AT&D0 command should allow it to work with Hayes-compatible modems.  A slight modification to the cable might also work, and still allow handshaking:

RS232  Modem  Name 
  1      1    Protective Ground 
  2 <--  3    Receive Data 
  3 -->  2    Transmit Data 
  5 -->  4    Request to Send 
  8      -    No connection 
  7      7    Logical Ground 

I have simply swapped pins 6 and 8 at the TI RS232, so that the toggle of 9902 "RTS" does not disconnect.  The RS232 stuff sure is messy.  I propose to name the above configuration the "MESS Cable" should you decide to adopt it.
 
Jeff White

Hi all,

Michael

---

From: "Michael Zapf" <[email-masked]>
Date: Sun, 07 Aug 2011 17:23:59 -0000

Hi Jeff, 

> and such a cable would not work between PC Hyperterminal and Geneve Port.  What 

OK, I was a bit unclear on that. I have a 9-pin on the PC and the 25-pin on the TI. What I meant is that you have to connect 1-1 on a 25-to-25 connection, and if one side is a 9-pin you have to use the corresponding pins at their new location.

For a 25/25 connection:

2 - 2
3 - 3
5 - 5
6 - 6
7 - 7
8 - 8
20 - 20

This is the wiring as suggested by TI in the manual when you connect the TI with a terminal. The MESS-emulated TI/Geneve looks like a terminal to the real one, as it speaks through the PC's serial port. For that reason you cannot use a TI/TI cable. 

I have begun to document the stuff on the MESS Wiki; it's a bit long to go into details here. I hope I'll complete that until next week-end.

I admit I have not tested this using PC programs like HyperTerminal (anyway, would require me to connect a second PC or to get another serial port). I'm surprised that they would not work here, as you claim - supposed that we have the wiring as said (including the relocation for 9-pin). 

Michael

---

From: "Beery" <[email-masked]>
Date: Mon, 08 Aug 2011 23:41:34 -0000

Michael,

Just saw this post this evening after my earlier post on the Geneve group.

Thanks for the update.

Beery

---

From: "Beery" <[email-masked]>
Date: Mon, 08 Aug 2011 23:49:16 -0000

Michael,

Is/Will your configuration work when connecting to an onboard modem on a PC?  I'm just now sure how your handshaking would work since it's not exactly a serial port, but something close.

Beery

---

From: Jeffrey White <[email-masked]>
Date: Mon, 8 Aug 2011 17:51:19 -0700 (PDT)

Hello, Michael.

I supposed I assisted in confusing myself.  To quote a prior message from me:

"Here is the new cable I would try with a TI-to-TI connection:

TI RS232  TI RS232  Name defined by "left" pin 
  1      1    Protective Ground 
  2 <--  3    Receive Data 
  3 -->  2    Transmit Data 
  5 -->  20    Request to Send 
   7      7    Logical Ground 
  20 <--  5    Clear to Send"
 
Not obviously, the TI is DCE and the PC is DTE.  Thus, the crossed connections 
between a TI and TI would be uncrossed (straight-through) with TI and PC.
 
However, on the 25-pin DTE port, pin 20 is DTR.  Pins 4 and 5 are RTS and CTS.  
Thus, if we connect straight-through as you suggest with MESS, where you can 
move pin 4 to pin 20, it works.  With Hyperterminal, I expect pin 20 would work 
as DTR.
 
I am not going to confuse the issue by giving the pin diagram for Geneve to PC, 
Port to Hyperterminal.  But I think it is different.  I may be missing 
something.
 
Jeff White 

________________________________
From: Michael Zapf <[email-masked]>
To: [email-masked]
Sent: Sun, August 7, 2011 1:23:59 PM
Subject: [TI994A] Re: RS232 connection via PORT program

Hi Jeff,

> and such a cable would not work between PC Hyperterminal and Geneve Port.  What 

OK, I was a bit unclear on that. I have a 9-pin on the PC and the 25-pin on the 
TI. What I meant is that you have to connect 1-1 on a 25-to-25 connection, and 
if one side is a 9-pin you have to use the corresponding pins at their new 
location.

For a 25/25 connection:

2 - 2
3 - 3
5 - 5
6 - 6
7 - 7
8 - 8
20 - 20

This is the wiring as suggested by TI in the manual when you connect the TI with 
a terminal. The MESS-emulated TI/Geneve looks like a terminal to the real one, 
as it speaks through the PC's serial port. For that reason you cannot use a 
TI/TI cable. 

I have begun to document the stuff on the MESS Wiki; it's a bit long to go into 
details here. I hope I'll complete that until next week-end.

I admit I have not tested this using PC programs like HyperTerminal (anyway, 
would require me to connect a second PC or to get another serial port). I'm 
surprised that they would not work here, as you claim - supposed that we have 
the wiring as said (including the relocation for 9-pin). 

Michael

---

From: "Michael Zapf" <[email-masked]>
Date: Sun, 14 Aug 2011 18:51:23 -0000

Another update ...

Some good and some bad news. Well, not that bad, but not satisfying either. 

The transfer of data from the emulated TI/Geneve to the real TI/Geneve and back works reliably up to 38400 baud. This is what I recently reported about, but my conclusions were not correct. In fact, handshaking did not have anything to do with this success - it is just the efficient implementation of PORT and the direct polling of the UART.

Handshaking could not work since I emulated a wrong cable. I connected pins 8 (DCD) and 20 (DTR) although I actually wanted to connect 5 (CTS) with 20 (DTR). The bad thing is that with this configuration it does not work at all, which indicates that there is still a bug around.

I created a test program (for MDOS) which tests handshaken transmissions (see the file repository in this group). It works this way: A sender program continues sending 00, 01, 02, ... ff, and again from the start, over the serial connection (until you press ESC). The receiver program gets these values over the link, displays them, and when it gets the 00, it deactivates the CTS line. But it continues polling the UART to show whether the other side has immediately stopped sending. To resume transfer, the space key must be pressed on the receiver side. This activates CTS again. The receiver can be stopped with ESC.

I have found some issues, but not all yet. Somehow some bytes are slipping through, although CTS has already become inactive. 

It seems as if the price for getting a perfect serial connection is getting higher than expected. Maybe we will have to get along with the fact that we won't have a rock-solid handshaking, while we get 38400 baud with PORT or 9600 with TELCO, which is sufficient in most situations. (Actually it's quite fun to watch PORT transfer a set of files via YModem-G between the real system and the emulation and back, without any errors. I'm using it now regularly for file exchange between both.)

Going to continue next weekend; I think I can clean up some issues still.

Ah, the good news: The sdlsocket has been ported to the Windows API, so the next update should allow the Windows users among you to enjoy the serial link.

Michael

---

From: "Beery" <[email-masked]>
Date: Mon, 15 Aug 2011 15:54:43 -0000

Glad to hear things are progressing....  Just waiting for the windows version of the sdlsocket........

Beery

---

From: "Michael Zapf" <[email-masked]>
Date: Tue, 16 Aug 2011 10:37:28 -0000

> Glad to hear things are progressing....  Just waiting for the windows version of the sdlsocket........

Right now: MESS 0.143u3. Remember that you must have a Java Runtime Environment and RXTX. Also see http://www.ninerpedia.org/index.php/Technical_details#Setting_up_RXTX_for_Java . And please download the latest TIImageTool from the Files section of this forum.

Michael

---

From: "Beery" <[email-masked]>
Date: Mon, 22 Aug 2011 21:14:12 -0000

Michael,

I finally got the right parts all talking to one another this weekend.  My-Term no longer locks up when I communicate with the terminal program.

Will there be an option to use a standard PC serial port to talk to a standalone modem using the normal PC serial cable?  Or, perhaps, talking directly with a Windows internal Modem card?

Myself, as a MESS user, I don't have the real hardware and I am looking at being able to use MESS/Geneve/Myterm to call a BBS.  That's my first goal, then, I want to play around with some other "protocols" as time permits.

Beery