* Telnet to serial port
@ 2004-07-09 11:13 Juhani Pirttilahti
2004-07-09 14:28 ` Ryan Underwood
0 siblings, 1 reply; 6+ messages in thread
From: Juhani Pirttilahti @ 2004-07-09 11:13 UTC (permalink / raw)
To: linux-msdos
I've got to run PCBoard under dosemu, works like a charm in local mode.
There is still a problem. Lets say I want to run 5 instances of dosemu + pcboard, I need then
a telnet server, which maintains connections to these 5 instances.
In dosemu, first instance of PCBoard should be on port COM1 and second on COM2 and so on...
In telnet server there should be a virtual modem emulator for each port. (done by threads)
When someone connects to server, it checks for first free instance/port and it should then send
commands to the serial port like a modem while PCBoard should answer to incoming "call".
How it would work:
Internet <-> Telnet server <-> Node selection (one from 1..5) <-> Virtual modem emulation layer #1..5
<-> dosemu #1..5 (redirects virtual modem device/file to COM1..5) <-> PCBoard #1..5 on COM1..5
Telnet server software (for linux) working like this does not yet exist. Someone will have to write one. :)
Do you people have any other ideas or thoughs about this?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Telnet to serial port
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>
0 siblings, 1 reply; 6+ messages in thread
From: Ryan Underwood @ 2004-07-09 14:28 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 2434 bytes --]
On Fri, Jul 09, 2004 at 02:13:04PM +0300, Juhani Pirttilahti wrote:
> I've got to run PCBoard under dosemu, works like a charm in local mode.
> There is still a problem. Lets say I want to run 5 instances of dosemu + pcboard, I need then
> a telnet server, which maintains connections to these 5 instances.
Sure. standard telnet/ssh will do this. Unless you are trying to
multiplex all these connections onto one listening telnet port. Then you will
have to write your own "hub" program to direct the user to the right
node.
To me, it makes more sense to have each listening node associated
with a particular listening IP port (:2323, :2324, :2325, :2326 ... ).
Then it is simple. Create a sh script which starts dosemu and the BBS
in the "already connected" mode, like if a frontend mailer such as
FrontDoor was used to pass control to the BBS. Then have that script
file executed as a login script when a user telnets in. You can use
exactly the same virtual com port for each node, then you only need one
port configured as virtual (COM1). Every time you run a new dosemu,
COM1 is corresponding to the telnet connection for _that_ dosemu. So
you can have e.g. 16 dosemus running at once for all your 16 nodes, all
configured to run on COM1, and each COM1 a particular node is using,
corresponds to the telnet connection which initiated the DOS session
that the BBS instance runs in.
If that is confusing, just ask for clarification. I use this method to
run DOS doors through Synchronet (for Unix). The idea is the same. One
thing that may confuse you is that there is no modem emulator (like
vmodem for OS/2), only a COM/FOSSIL emulator, which takes
console/terminal I/O on the outside and redirects it to appear as if it
was received on a COM port (or from FOSSIL driver) on the inside of the
DOS box. The virtual COM port on the DOS box corresponds to no physical
COM port, only to the I/O from the outside. It also has nothing in
common with any other virtual COM ports in any other concurrently
running DOS boxes. This is why you can just set COM1 for every PCBoard
node and it will work fine if executed as if the COM port has a modem on
it that is already connected. What you _cannot_ do is run PCBoard and
have it "answer the phone". That would require a modem emulator which
we do not have (and don't really need).
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Telnet to serial port
[not found] ` <200407091812480819.01F10C23@smtp.ebaana.net>
@ 2004-07-10 8:29 ` Juhani Pirttilahti
2004-07-11 23:58 ` Ryan Underwood
0 siblings, 1 reply; 6+ messages in thread
From: Juhani Pirttilahti @ 2004-07-10 8:29 UTC (permalink / raw)
To: linux-msdos
On 9.7.2004 at 9:28 Ryan Underwood wrote:
>On Fri, Jul 09, 2004 at 02:13:04PM +0300, Juhani Pirttilahti wrote:
>> I've got to run PCBoard under dosemu, works like a charm in local mode.
>> There is still a problem. Lets say I want to run 5 instances of dosemu +
>pcboard, I need then
>> a telnet server, which maintains connections to these 5 instances.
>
>Sure. standard telnet/ssh will do this. Unless you are trying to
>multiplex all these connections onto one listening telnet port. Then you
>will
>have to write your own "hub" program to direct the user to the right
>node.
>
>To me, it makes more sense to have each listening node associated
>with a particular listening IP port (:2323, :2324, :2325, :2326 ... ).
>Then it is simple. Create a sh script which starts dosemu and the BBS
>in the "already connected" mode, like if a frontend mailer such as
>FrontDoor was used to pass control to the BBS. Then have that script
>file executed as a login script when a user telnets in. You can use
>exactly the same virtual com port for each node, then you only need one
>port configured as virtual (COM1). Every time you run a new dosemu,
>COM1 is corresponding to the telnet connection for _that_ dosemu. So
>you can have e.g. 16 dosemus running at once for all your 16 nodes, all
>configured to run on COM1, and each COM1 a particular node is using,
>corresponds to the telnet connection which initiated the DOS session
>that the BBS instance runs in.
>
>If that is confusing, just ask for clarification. I use this method to
>run DOS doors through Synchronet (for Unix). The idea is the same. One
>thing that may confuse you is that there is no modem emulator (like
>vmodem for OS/2), only a COM/FOSSIL emulator, which takes
>console/terminal I/O on the outside and redirects it to appear as if it
>was received on a COM port (or from FOSSIL driver) on the inside of the
>DOS box. The virtual COM port on the DOS box corresponds to no physical
>COM port, only to the I/O from the outside. It also has nothing in
>common with any other virtual COM ports in any other concurrently
>running DOS boxes. This is why you can just set COM1 for every PCBoard
>node and it will work fine if executed as if the COM port has a modem on
>it that is already connected. What you _cannot_ do is run PCBoard and
>have it "answer the phone". That would require a modem emulator which
>we do not have (and don't really need).
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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Telnet to serial port
2004-07-10 8:29 ` Juhani Pirttilahti
@ 2004-07-11 23:58 ` Ryan Underwood
2004-07-15 23:19 ` Juhani Pirttilahti
0 siblings, 1 reply; 6+ messages in thread
From: Ryan Underwood @ 2004-07-11 23:58 UTC (permalink / raw)
To: linux-msdos
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Telnet to serial port
2004-07-11 23:58 ` Ryan Underwood
@ 2004-07-15 23:19 ` Juhani Pirttilahti
2004-07-17 22:23 ` Ryan Underwood
0 siblings, 1 reply; 6+ messages in thread
From: Juhani Pirttilahti @ 2004-07-15 23:19 UTC (permalink / raw)
To: linux-msdos
On 11.7.2004 at 18:58 Ryan Underwood wrote:
>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>
How do I (or is it possible to without modifications to source) suppress dosemu's bootup messages?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Telnet to serial port
2004-07-15 23:19 ` Juhani Pirttilahti
@ 2004-07-17 22:23 ` Ryan Underwood
0 siblings, 0 replies; 6+ messages in thread
From: Ryan Underwood @ 2004-07-17 22:23 UTC (permalink / raw)
To: linux-msdos
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
On Fri, Jul 16, 2004 at 02:19:22AM +0300, Juhani Pirttilahti wrote:
> How do I (or is it possible to without modifications to source) suppress dosemu's bootup messages?
If you refer to the messages printed by the 'dosemu' startup script,
using -quiet or env QUIET=1 is sufficient. Otherwise, if you are
talking about the copyright and disclaimer, you will need to mkdir
$HOME/.dosemu && touch $HOME/.dosemu/disclaimer
--
Ryan Underwood, <nemesis@icequake.net>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-07-17 22:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2004-07-15 23:19 ` Juhani Pirttilahti
2004-07-17 22:23 ` Ryan Underwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox