TCPSER4J Modem Emulator development

Jim Brain brain at
Sat Apr 2 00:33:49 CST 2005

To address some limitations in my tcpser modem emulator
(, I've been working on a new
version that is Java based.

Firstly, comments about any hate of Java should be directed to /dev/null
or similar :-)

tcpser4j is a piece of software that runs on a PC/Mac/Workstation and
turns a regular rs232 port into an emulated Hayes compatible modem.
Instead of dialing out over phone lines, this modem uses TCP/IP for the
connection.  tcpser4j can handle both incoming and outgoing calls.  It
is most useful to place vintage BBS systems online as telnet BBSes.

The original version of tcpser was a single 'C' codebase, but to get
Win32 support I needed cygwin1.dll.  That is a problem at times, and
there are a number of older versions of the DLL out there that do not
work with the app.  As well, baud rates less than 300 seem to be
non-functional in the DLL.  I can't legally redistribute the DLL in my
archive either.

Moving to Java addressed those issues, and it also allowed the codebase 
to become more dynamically loadable, or reloadable.

The new version contains the following features found in the original:

o Multi-platform support
o Support for all normal and extended Hayes AT commands, including
multi-command strings
o Proper S register support, including changing line terminator,
linefeed char, guard time, etc.
o Correct AT command response codes, including abbreviated numeric codes
and Hayes Smartmodem limited response code emulation.
o Tracing abilities (see what is being sent on the wire)
o Phone book aliases (alias 555-1212 to servername:portnumber)
o Multi-line support (multiple "modems" listen on one IP port, like
modem pool)
o Proper DCD support (with modified null modem cable)
o Very good Hayes modem emulation
o Inbound and outbound call support
o Support for sending text files or raw text to local and remote sides
for events like BUSY, ANSWER, TIMEOUT, NO_ANSWER, etc.
o Support for inverting the DCD line
o Proper support for +++ Hayes escape sequence
o Support for handling NVT sequence negotiation when "dialing" telnet

The new version hopes to better the original in a number of ways:

o Java codebase, can be run on any platform with a 1.2+ JRE
o Uses the RXTX Comm Library, available for most platforms.
o Extensive logging flexibility.  Users should be able to cater logging
to their heart's desire
o Better support for AT command set.  Default S register setting and
querying now supported, for example.
o Multi-modem bank support (configure 2 modems on 1 port, 3 on another,
o XML based configuration file easier to use than command line switches
o Phone book aliases now loaded from file.
o Multiple Phone books, with phone book delegation.  Modem has a modem 
book, which checks pool book if no results.  pool book checks master 
book if no match found in pool book.
o Support for remote administration GUI
o TCP232 option.  Connect to the server via TCP/IP port and issue AT
modem commands.  This is best used with an emulator like VICE that
emulates a rs232 interface by conecting to a TCP/IP port.  It can also
be used to test modem operation.  DCD operation is not supported in this
o Remote232 option.  This allows one to use RS232 ports on on the local
machine.  If your BBS or vintage PC is by another PC, but you want
tcpser4j to run on a server, use this option.  the RS232 port need only
be on a machine reachable via TCP/IP, so it could be across the house,
the state, the country, or the world.  All control lines are preserved
in this mode.
o captive modem support.  If configured, soft-modem will listen to IP
port and real modem.  This will allow existing dialup BBS systems to add
telnet option while preserving dialup user support.  In this mode, if
telnet access is active, captive modem will be placed off-hook, and will
be placed on-hook when telnet user logs off.  Outbound calls will also
be routed, so will go out over IP, while atdt431-7754
will use modem. (this is still under development)
o Better support for +++ sequence timing.
o Support for extended error code reporting (i.e.: "NO CARRIER (Server
Refused Connection)")
o Support for adding new modem commands to better emulate specific modem

I'm pretty much done with the base code, and am looking for some folks
who would be interested in helping to test this codebase in some
situations with different vintage platforms and send bug reports.  As
it's an all-new codebase, I need to do a shakedown.  Initial testing has
been good, but I only have so many test scenarios here.

I'm also interested in ideas folks might have.  Some have asked for
hooks to add a chat room in the unit for folks who get busy signals when
dialing in.  I'm looking into that option, and some others.  Most will
be support via dynamic classes.

Finally, I'm looking for someone to help with the Remote GUI
Administration component.

The codebase is available at:

Windows users need only unzip and execute run.bat.  Other platforms need 
to install the appropriate RXTXComm JNI library 
( for that platform and tweak the run 
script to suit.  Since I can redistribute the RXTX codebase, I may add 
the various libraries in a later release.  Please send run scripts for 
other platforms.


I preloaded all of the telnet BBS systems I know of into the master 
phone book.  Please help me add to the list.

As well, I created my own protocol for encapsulating serial line status 
into a TCP/IP datastream with the serial data.  I had once saw another 
application that provided remote serial ports, but was unsuccessful in 
finding a current reference.  If someone has a link and the existing 
protocol will work for this project, I will change my code to use the 
existing protocol.

I have not prepared a proper README file for tcpser4j as yet.  Please 
use information from the current tcpser project archive, or email me if 
you have trouble.

I have tested the IP232 port option with the WinVICE emulator configured 
to send serial data to a remote IP port.  VICE 1.16 has bugs with TCP/IP 
serial option, but 1.15 works.  However, I have not yet been able to 
test the ACIA IP emulation in 1.15, and the user port emulation fails if 
custom RS232 routines (the George Hug routines, for example) are used. 
Normal KERNAL RS232 works fine.

Jim Brain

Jim Brain, Brain Innovations
brain at                      
Dabbling in WWW, Embedded Systems, Old CBM computers, and Good Times!

More information about the cctalk mailing list