Discussion:
pcboard over telnet with linux and dosemu
(too old to reply)
Trifle Menot
2010-03-13 21:55:17 UTC
Permalink
I wondered if there was a simple way to get PCBoard working over telnet
with dosemu on linux. Turns out there is. Docs on this are scarce and
so working through it the first time took a lot of trial and error. But
once you understand what pieces are required, and how they fit together,
the recipe is not hard for an experienced cook.


Ingredients:

pcboard
linux (2.6.32 crashed, so i used an older kernel)
xinetd
telnetd
gcc, flex, bison, etc.
svn
dosemu source code


Steps:

svn co https://dosemu.svn.sourceforge.net/svnroot/dosemu/trunk dosemu
adjust compiletime-settings to your liking
./configure
make
make install

install xinetd and telnetd
service telnet
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.telnetd
server_args = -h -n -L /usr/local/bin/bbs
disable = no
}
You may want to change "root" to some other user. Unless you like
living dangerously, heh.
#!/bin/sh
export HOME=/root
exec /usr/local/bin/dosemu.bin "c:\pcb\node1.bat"
HOME is required, dosemu won't run without it. But here again, same
caveat about "root" user.

Fix up your autoexec.bat file to start the dosemu fossil. Mine looks
@echo off
rem autoexec.bat for DOSEMU + FreeDOS
path c:\pcb;z:\bin;z:\gnu;z:\dosemu
set HELPPATH=z:\help
set TEMP=c:\tmp
blaster
prompt $P$G
unix -s DOSDRIVE_D
if "%DOSDRIVE_D%" == "" goto nodrived
lredir del d: > nul
lredir d: linux\fs%DOSDRIVE_D%
:nodrived
rem uncomment to load another bitmap font
rem loadhi display con=(vga,437,2)
rem mode con codepage prepare=((850) z:\cpi\ega.cpx)
rem mode con codepage select 850
rem chcp 850
lredir e: linux\fs/media/cdrom c
unix -s DOSEMU_VERSION
echo "Welcome to dosemu %DOSEMU_VERSION%!"
fossil.com
unix -e
Fix up your /etc/dosemu/dosemu.conf with these settings:

$_external_char_set = "iso8859-1"
$_com1 = "virtual"

char_set suppressed some unwanted console messages that appeared because
I didn't have LANG set. com1 = virtual is the main idea here.

Now configure PCBoard like so:

Modem Information
Modem Setup
Comm Driver : F (fossil)
Comm Port : 1
Opening Baud Rate : 57600

You may also want to lock the baud rate, but I did not.

Modem Information
Configuration Switches
Packet-Switch Network : Y
Force 16550A Usage : Y

Configuration Options
Switches
Exit to DOS After Each Call : Y

Tweak your PCBoard batch files to use COM1. Running more than one node
will require more batch file work, and dosemu work too.

Well that's all I can remember at the moment. Hopefully I didn't leave
out anything important.

Bon appetit.
--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
Bo Simonsen
2010-03-24 13:25:17 UTC
Permalink
Post by Trifle Menot
I wondered if there was a simple way to get PCBoard working over telnet
with dosemu on linux. Turns out there is. Docs on this are scarce and
so working through it the first time took a lot of trial and error. But
once you understand what pieces are required, and how they fit together,
the recipe is not hard for an experienced cook.
With dosbox you should get it working easily. DOSBOX can make a "vmodem"
by accepting connections to a TCP port you define in the config, and then
send it to the serial port and emulate the AT command set. So if I telnet
to the port listened by DOSBOX, dosbox will send a RING to the serial Ãport
and upon ATA it would accept.

However it does not support telnet.. :(

Bo
Trifle Menot
2010-03-24 18:14:22 UTC
Permalink
Post by Bo Simonsen
Post by Trifle Menot
I wondered if there was a simple way to get PCBoard working over telnet
with dosemu on linux. Turns out there is. Docs on this are scarce and
so working through it the first time took a lot of trial and error. But
once you understand what pieces are required, and how they fit together,
the recipe is not hard for an experienced cook.
With dosbox you should get it working easily. DOSBOX can make a "vmodem"
by accepting connections to a TCP port you define in the config, and then
send it to the serial port and emulate the AT command set. So if I telnet
to the port listened by DOSBOX, dosbox will send a RING to the serial Ãport
and upon ATA it would accept.
However it does not support telnet.. :(
Telnet wants a tty, or at least a pty.

What's needed is a tool to splice a telnet session onto a virtual serial
port. Sounds fantastic, but a tool named "socat" can do it. I was able
to use it for connecting qmodem (which only understands com ports) to a
telnet BBS.
--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
Bo Simonsen
2010-03-25 14:22:29 UTC
Permalink
Post by Trifle Menot
Post by Bo Simonsen
Post by Trifle Menot
I wondered if there was a simple way to get PCBoard working over telnet
with dosemu on linux. Turns out there is. Docs on this are scarce and
so working through it the first time took a lot of trial and error. But
once you understand what pieces are required, and how they fit together,
the recipe is not hard for an experienced cook.
With dosbox you should get it working easily. DOSBOX can make a "vmodem"
by accepting connections to a TCP port you define in the config, and then
send it to the serial port and emulate the AT command set. So if I telnet
to the port listened by DOSBOX, dosbox will send a RING to the serial
Ãport
Post by Bo Simonsen
and upon ATA it would accept.
However it does not support telnet.. :(
Telnet wants a tty, or at least a pty.
What's needed is a tool to splice a telnet session onto a virtual serial
port. Sounds fantastic, but a tool named "socat" can do it. I was able
to use it for connecting qmodem (which only understands com ports) to a
telnet BBS.
What I meant when saying DOSBOX does not support telnet is that, the
data send is not encoded properly according to the telnet protocol which
will make filetransfers fail. The most significant problem is that
your telnet client expect that char 255 (IAC according to the protocol)
is escaped such that it is send twice, else the telnet client will
interpret it as a command.

Bo
Trifle Menot
2010-03-28 05:34:29 UTC
Permalink
Post by Bo Simonsen
What I meant when saying DOSBOX does not support telnet is that, the
data send is not encoded properly according to the telnet protocol which
will make filetransfers fail. The most significant problem is that
your telnet client expect that char 255 (IAC according to the protocol)
is escaped such that it is send twice, else the telnet client will
interpret it as a command.
RFC 856 says that if the IAC byte appears in the data, it is transmitted
as IAC IAC. The receiver is supposed to translate IAC IAC back into
normal data of IAC, rather than treat it as a command (another way of
understanding this is that IAC IAC is a command to put the IAC byte in
the received data).
http://fixunix.com/networking/36044-telnet-zmodem.html

Sounds like he said the telnet drivers should transparently escape IAC,
so the user app can send whatever it wants. I read that portion of the
rfc, but still don't have a clear understanding of its intent.
--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
Bo Simonsen
2010-03-28 15:34:05 UTC
Permalink
Post by Trifle Menot
Sounds like he said the telnet drivers should transparently escape IAC,
so the user app can send whatever it wants. I read that portion of the
rfc, but still don't have a clear understanding of its intent.
Exactly, but since you connect directly to the DOSBOX there is no such
"telnet driver". I tried using terminate to connect to my BBS and transfer
a file it didn't work out, simply because char 255 wasn't escaped.

However if I connected my "vmodem" (no modification of the data send) it
worked out great, so my conclusion was that DOSBOX would not handle
telnet.

Bo
Trifle Menot
2010-03-28 23:36:39 UTC
Permalink
Post by Bo Simonsen
Post by Trifle Menot
Sounds like he said the telnet drivers should transparently escape IAC,
so the user app can send whatever it wants. I read that portion of the
rfc, but still don't have a clear understanding of its intent.
Exactly, but since you connect directly to the DOSBOX there is no such
"telnet driver". I tried using terminate to connect to my BBS and transfer
a file it didn't work out, simply because char 255 wasn't escaped.
You mean terminate running in DOSBOX? How are you connecting to a linux
telnet BBS from DOSBOX?
Post by Bo Simonsen
However if I connected my "vmodem" (no modification of the data send) it
worked out great, so my conclusion was that DOSBOX would not handle
telnet.
dosemu does not directly handle telnet either, but I configured my linux
telnet server to invoke an instance of dosemu.

telnetd creates a pty and calls dosemu as the login program. dosemu
talks to the pty, and telnetd relays the data across the socket to the
remote client, encapsulated in telnet protocol.

This works. A remote telnet client can connect to DOS PCBoard, which
knows nothing about telnet. The only thing PCBoard understands is that
it's talking to a (virtual) serial port provided by dosemu. dosemu
grabs the slave side of the pty (which telnetd created) and makes it
look like a serial port to PCBoard.

Works fine for browsing, where no control characters sent across the
link. zmodem using a kermit client partly works, if the file is text.
If it's a binary, it fails. I'm not sure if the problem is due to the
telnet encapsulation, or flow control problems.

I don't know much about DOSBOX, I have only tried dosemu.
--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php
Bo Simonsen
2010-03-30 23:58:48 UTC
Permalink
Post by Bo Simonsen
Post by Bo Simonsen
Post by Trifle Menot
Sounds like he said the telnet drivers should transparently escape IAC,
so the user app can send whatever it wants. I read that portion of the
rfc, but still don't have a clear understanding of its intent.
Exactly, but since you connect directly to the DOSBOX there is no such
"telnet driver". I tried using terminate to connect to my BBS and
transfer
Post by Bo Simonsen
a file it didn't work out, simply because char 255 wasn't escaped.
You mean terminate running in DOSBOX? How are you connecting to a linux
telnet BBS from DOSBOX?
Dosbox emulates a modem which accepts Hayes AT commands, so I simply write

ATDTnightexp.no-ip.org

To call my BBS using DOSBOX and Terminate.
Post by Bo Simonsen
telnetd creates a pty and calls dosemu as the login program. dosemu
talks to the pty, and telnetd relays the data across the socket to the
remote client, encapsulated in telnet protocol.
Very clever solution, I use something similar in order to run DOS doors
from my BBS.
Post by Bo Simonsen
Works fine for browsing, where no control characters sent across the
link. zmodem using a kermit client partly works, if the file is text.
If it's a binary, it fails. I'm not sure if the problem is due to the
telnet encapsulation, or flow control problems.
Make sure that you don't use the netkit-telnetd, it's not 8-bit clean.
Hmm.. I am not sure but there is some telnetd which isn't 8-bit clean.

I have wrote a basic telnetd my self for Daydream BBS which is 8-bit
clean. In fact it cannot do 7-bit ;)

http://nightexp.no-ip.org/cgi-bin/viewvc.cgi/SRC/net/ddtelnetd.c?revision=1.1&

root=cvs&view=markup

Feel free to modify it for your needs.
Post by Bo Simonsen
I don't know much about DOSBOX, I have only tried dosemu.
Ok! I think dosbox is worth trying, however you would get a problem
with file transfers.

Bo

Loading...