I tried to run a BBS software using dosbox and discovered some issues with how softmodem implemented the escape characters handling to switch to command mode:
- Characters are swallowed instead of passed-through, this causes issue when transmitting strings with the plus character.
- Additional characters before and after the escape sequence don't reset the counters causing switch to command mode even if not intended. For example, connect to a remote and type a+++ it switches to command mode, it should not.
The attached proposed patch fixes the escape handling:
- Transmission pause is checked before and after the escape sequence, so <pause>+++<pause> is the correct sequence.</pause></pause>
- Extra characters cause the counters to be reset so no unwanted switch is triggered.
- Use register S12 to set the pause timer in 1/50th of seconds, default is 50 = 1 sec.
- Plus characters are passed to the remote.
With this fix I'm able to run a BBS software and do file transfers with XModem and ZModem without problems.
Marco,
I'm very interested in this fix, as I occasionally enjoy a bit of BBS nostalgia and using the old file-transfer tools like Omen's Z-Modem Moby Turbo and Z-Fast.
The patch applied cleanly against latest SVN, which I used to launch terminate 5.00. I connected to TheFileBank BBS and initiated a Z-Modem download, which auto-triggered Terminate to start the download.
I tested with two Z-Modem tools (Internal and external), but both get corruption that prevents the transfer from proceeding properly. This corrupt is how baseline SVN DOSBox operates as well; so this is not new.
I also don't see either log message printed Modem: Entering command mode(escape sequence)"; so I suspect your code isn't triggering? Here are a couple screenshots (attached).
Last edit: krcroft 2020-02-10
Most probably, the remote BBS requires telnet handling, have you tried issuing ATNET1 before connecting ?
Forgot to tell, this patch is mostly needed when operating a BBS with Dosbox, trasmitting files and data. Client terminals mostly receive data so are not affected by the escape bug, until you attempt to upload files to a BBS.
That fixed it Marco; thank you!
A custom dial prefix
ATNET1^MATDT
made it easy to apply to my phone-book entries. Now I just need to find a Telnet BBS that supports HS/Link and SModem; two other nice protocols and transfer clients from back in the day :-)added in 4351.
Thanks
Hi Marco,
After a lot of investigation on why my BBS wouldn't work with zmodem, I found this page.. I have downloaded and applied the patch, recompiled dosbox 0.74-3 on my linux install, but the problem still remains.. zmodem gives a CRC error and is stuck resending the first block continuously.
Is there anything further I should check? I have also tried the s12 register setting with values between 1 and 500, but it made no difference.
I'm using Remote Access 2.02 as the BBS, and NetRunner v.2.00 as the windows terminal client.
Thanks!
Chris
Last edit: Chris Milbourne 2021-01-22
One thing to check is how the terminal connects with the BBS, if it is using the Telnet protocol you need to add ATNET1 to the BBS modem initialization, if it is using a plain raw protocol you need to add ATNET0 to the BBS modem initialization. In other words, both the BBS and the Terminal must use the same connection protocol.
Hi Marco, thanks for the reply.. to confirm I had also included ATNET1 in the init strings of the BBS, and reveived a confirmation OK response.. my client is set by default to assume telnet as the protocol... so I believe both ends were set to this.
For the same I also tested with ATNET0 and had the same error on transfer with both strings... I checked the content of the softmodem.cpp file against the original, and this was succesfully applied... it compiled ok, ran make, then install... but no success...
I have checked the downloads using Syncterm (Linux) and Telix (DOSBox) and both works with the raw connection. Telnet connections have problems with both programs, I guess there is something weird with it.
Anyway, doesn't seems an issue with this patch, but with the telnet filter or some settings.
Thanks Marco, would this therefore assume that to work, the BBS should use ATNET0 to set it as raw connection, and the client would need to be the same?
i.e. a telnet enabled bbs will not work with zmodem...
Yes, with both set to raw it should work.
ZModem should work with telnet-enabled BBS (it was designed as such), there is something weird that prevents it from working. Don't know if it is DOSBox or something else, some ZModem implementations may not fully respect the protocol. Honestly I haven't experimented much with it due to this kind of problems, and was happy with raw connections. Most programs support it so it is just a matter of configuring the client.
Of course ZMODEM can work on a Telnet BBS. The issue (with Telnet) is that character 255 (Telnet IAC) must be doubled on the transmitting side. This behavior is not the default of behavior of DOSBOX. There's a lengthy discussion and patch set here:
https://github.com/dosbox-staging/dosbox-staging/pull/582
Thanks for this Rob... I checked out the link - installed the staging release of dosbox and tested, but with no success... conclusion is my BBS software is TCP to Serial, rather than telnet enabled... and zmodem does not work in this setup... (Remote Access 2.02 as the host)... thanks for the link and info, and thanks also Marco for the replies and info.
As it stands, I think I can give up on my dream of hosting files on my BBS.. but I learned a little along the way which is never a bad thing!