public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Ryan Underwood <nemesis-lists@icequake.net>
To: linux-msdos@vger.kernel.org
Subject: Re: Telnet to serial port
Date: Sun, 11 Jul 2004 18:58:56 -0500	[thread overview]
Message-ID: <20040711235825.GA25180@dbz.icequake.net> (raw)
In-Reply-To: <200407101129100240.0059FEC0@smtp.ebaana.net>

[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]


On Sat, Jul 10, 2004 at 11:29:10AM +0300, Juhani Pirttilahti wrote:
> 
> Ah, fine, this idea is somewhat better and sounds like that it will be much
> easier to build. So, If I write "hub" script, it would have to do these things:
> 1) Find a free node, (check if no lockfile exist) (for example, 2 is free)
> 2) Create a lock file for this session (lock.2 for node 2)
> 3) Launch dosemu with PCBoard using node2.bat (it contains node number
> environment variable and command line parameters)
> 4) Finally, when session is ended, we can delete lock file.
> 
> I need to know how do I launch dosemu? How telnet connection will go to COM1...?
> And I have to add $_com1 = "virtual" to dosemu.conf, right?

I did something like this for synchronet's usage of dos doors:

/usr/bin/env TERM=linux QUIET=1 DOSDRIVE_D=$NODE_TEMP dosemu.bin -I"video { none }"
	-I"keystroke \r" -I"serial { virtual com 1 }" -f/etc/dosemu/dosemu-bbs.conf
	-E"D:external.bat" -o/tmp/dosemu.log 2> /tmp/dosemu_boot.log >>
	$NODE_TEMP/dosevent.log

This all looks horrible.  Here are a few things to remember:
1) Keep track of whether you are on the DOS side or the Unix side.  If
you are writing a batch file or passing a -E, you are on the DOS side.
Otherwise, you are on the Unix side.

2) DOSDRIVE_D is a usual variable to determine where you are mounting
drive D from.  It is read via 'unix -s' once dosemu has executed,
usually in the autoexec.bat.  If you are using something besides a
standard freedos distribution, you will need to use unix -s and unix -e
yourself to check the environment, mount drives, and run the DOS command
given via -E.

$NODE_TEMP in this example should point to the PCBoard node's temp
directory on the Unix side.  It will be mounted as drive D on the DOS
side, so in PCBoard setup, be sure to point it to D for the node
temporary directory.  This needs to be a different directory on the Unix
side for every node.

3) the -I options add dynamically to dosemu's configuration when it has
started.
4) -f lets you give a configuration specifically for your BBS that is
separate from system dosemu configuration.

5) -E gives the command that dosemu is to execute on the DOS side when
'unix -e' is invoked.  In this case, we are running a command called
"external.bat" on the D: drive which was mounted via lredir after giving
DOSDRIVE_D to the DOS side autoexec.bat.  You will want here a batch
file to start PCBoard in frontend-mailer mode.  Optionally, in this
"bootstrap" batch file, you could mount other drives via lredir, i.e.
for access to door games or file areas.

6) The rest of the stuff at the end is just for logging on the Unix
side.  It can be useful for debugging.

Any more questions, please post.

-- 
Ryan Underwood, <nemesis@icequake.net>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-07-11 23:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-09 11:13 Telnet to serial port Juhani Pirttilahti
2004-07-09 14:28 ` Ryan Underwood
     [not found]   ` <200407091812480819.01F10C23@smtp.ebaana.net>
2004-07-10  8:29     ` Juhani Pirttilahti
2004-07-11 23:58       ` Ryan Underwood [this message]
2004-07-15 23:19         ` Juhani Pirttilahti
2004-07-17 22:23           ` Ryan Underwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040711235825.GA25180@dbz.icequake.net \
    --to=nemesis-lists@icequake.net \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox