11

I maintain an older Pentium III running Windows 98 as part of my collection of vintage machines. I named the box "Bridgette" because it basically is used to bridge my older machines into the modern world. In addition to having all kinds of old/weird hardware installed, my Apple //, Commodore 64 and Amiga 3000 are all connected via a serial cable to an A/B/C/D box which is then connected via NULL modem to COM1 on Bridgette. This makes it very convenient to download from the interwebs, copy the data to Bridgette, fire up HyperTerminal and use Zmodem to transfer the data to one of my older machines.

Now what I would like to do, if possible, is install something like PUTTY on Bridgette (the Windows 98 box) to establish an outbound Telnet session, but pipe the IO of that session to COM1. The idea being that from the terminal software of the older computer I should be able to 'telnet' to BBS over the internet.

I've seen this done using a Raspberry Pi because the GPIO on the PI can basically pipe the shell right to the TX/RX lines, and with a Max3232 in place you can easily drive an RS-232 connection. But I already have Bridgette sitting there and wired up, and well, it seems like it should be so easy.

So to recap, I am looking for a solution, that would work under Windows 98 to allow an external 'dumb' terminal connected to COM1 to interact with an 'telnet session' to an external server (most likely on the internet).

I hope I am making sense. Thanks!

3
  • Are you after an intermediate program or will something like "REDIR COM1 > STDOUT" do you?
    – Chenmunka
    Jul 5, 2016 at 12:46
  • Might NetSerial work for you?
    – user
    Jul 6, 2016 at 15:53
  • Since the question specifies Windows 98 this is not an answer, but if you have another PC available you can put BSD or Linux on it. Unix-like systems can do this task very easily since they were made with serial-attached terminals in mind.
    – Ken Gober
    Jul 7, 2016 at 18:30

2 Answers 2

13

In DOS, I remember being able to start COMMAND.COM on a COM port simply by doing this:

REM Set COM1 speed and settings
MODE COM1:38400,N,8,1

REM Hand over control to COM1!
COMMAND COM1

REM The remote typed "exit"...

You could then use a remote terminal connected to COM1 to give DOS commands on that machine - and simply type exit to return the machine back to the normal command line.

I used it so much that I don't remember whether I ever did it with Windows 95 or 98 though...

If it did work, you could then use your old machines' terminals to tell the PC what to do (such as dir or copy X.txt Y.txt), including using the command-line telnet.exe that came with Win98 rather than the putty.exe GUI program:

telnet bbs.com

Edit

It turns out that telnet.exe on Windows 98 isn't a true console application, so it doesn't redirect output. Sigh! So I asked "How hard could it be?" - and wrote one. It is available here:

https://github.com/JohnBurger/StdTel/blob/master/StdTel.zip

I don't claim it's the best program in the world - nor indeed that it works on Windows 98 (sorry, I couldn't test it on that). But I was able to connect over the Internet to some sites with it, and use redirected I/O to communicate. So: please tell me how it works?

To use it is easy: it doesn't require installation: just unZIP the .exe somewhere and run it. It has a command line that you can get by simply typing its name:

C:\>StdTel

Usage:
      StdTel <host> [<port>]
Communicate with <host> on <port> [default=23] over a network.
To exit, type <Ctrl><]><Enter>

C:\>StdTel www.google.com.au 80

Connecting to www.google.com.au on port 80.
Trying 216.58.199.35... Success!

GET /

HTTP/1.0 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.com.au/?gfe_rd=cr&ei=uy-BV7H9IqPM8gfo26OYBA
Content-Length: 262
Date: Sat, 09 Jul 2016 17:09:15 GMT

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.au/?gfe_rd=cr&amp;ei=uy-BV7H9IqPM8gfo26OYBA">here
</A>.
</BODY></HTML>

...for what it's worth. Any suggestions as to improvements will be gratefully received.

11
  • John, this looks like exactly what I am looking for. I knew about the MODE command, but I've never seen the redirection of command.com before. Unfortunately when I issue "COMMAND COM1" I get an error "Write fault error writing device COM1, Abort, Retry, Ignore, Fail". Same error if I just "ECHO BLEH > COM1". But I know if I load Hyperterminal the port, null modem and cables work, so I think your answer is right - but I've still got some mystery to solve here.
    – Geo...
    Jul 6, 2016 at 10:28
  • 2
    With the later versions of DOS, they added some extra parameters to MODE to permit finer control of the handshake. See technet.microsoft.com/en-au/library/bb490932.aspx - I think you want something like MODE COM1: baud=38400 parity=n data=8 stop=1 to=off xon=off odsr=off octs=off dtr=on rts=on idsr=off to basically ignore everything going in to the PC, but still provide lines for the other end. Jul 6, 2016 at 11:55
  • John, thanks again for the info. I don't think the extra parameters you describe were available in the version of the MODE command that shipped with Windows 98. However, some guesswork/troubleshooting revealed that the null modem was not passing or looping back the RTS/CTS lines. After shorting pins 4 & 5 on the PC side of the Null modem the Command COM1 trick works great. So i am tantalizingly close, but I can't seem to find an older telnet client that plays nice with STDIN/STDOUT.
    – Geo...
    Jul 7, 2016 at 11:09
  • You're sure that Win98's telnet isn't redirectable? Please check your config.sys, and ensure that ANSI.SYS isn't listed [That takes me back!] I have tried to repurpose one of my machines here to install Windows 98 (again). [Boy, does THAT take me back!!!] Unfortunately: "Insufficient memory to install Windows." It's got 4 GB... So I took out a DIMM... same thing. They don't make DDR3 much smaller! I have a 386SX with 1MB of memory - that won't work either. I'm sorry, I'm going to have to surrender my RetroComputing card - I've failed! Jul 7, 2016 at 13:57
  • John, sadly, I too must surrender my RetroComputing card. The version of Telnet installed on my two 98 boxes launches it own window and I've been unable to locate another telnet solution that works with DOS (or Windows 98) that uses STDIN/STDOUT for I/O. I thought I was really close with Michael Brutmans fantastic mTCP (brutman.com/mTCP) but in the end I had no luck. Right now, I don't think I am going to be doing this with 98 or DOS. Thanks to everyone for all the great ideas and help! I'll keep trying, and if I figure this out I will post my solution here.
    – Geo...
    Jul 9, 2016 at 10:26
3

You want TcpSerSharp. This is a program that allows you to map a COM port to an outbound internet connection. You can download it at:

https://github.com/sharpninja/tcpsersharp/releases

The installer may error out due to not having windows services available. If it does, let me know and I'll send you a binary you can run from Command Line to start the application.

** Full Disclosure ** I ported TcpSerSharp from Jim Brain's TCPSER4J. Please do not contact Jim about this program.

1
  • 2
    Come to think of it, TcpSerSharp requires .Net 4.6, which definitely won't run on Windows 98. I do not know if there's a reasonable solution for Windows 98. I would suggest using the Pi as you'll get more bang for your buck. Doing some fact checking, looks like the only version of .Net to run on Windows 98 is .Net 1.x. Since the source code for TcpSerSharp heavily depends on generics, which aren't available in .Net 1.x, it simply won't work on Windows 98. Jul 5, 2016 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .