2 posts / 0 new
Last post
Supra 128 BBS in 2019: need help with modem routines (I think)

If you read this at Lemon64 I apologize for cross-posting but I figured there would be a different braintrust on a 128-centric board than a 64-centric one.

I am working to get Supra 128 BBS back online. I have been playing with the stock version posted at Bo Zimmerman's site but have a heavily modified version I ran in the early 90's I'm looking to put up once I can get it work to with BBS Telnet server. And hey, if Julian Burger or Jim Abraham are around let's chat! I still have my original serial number!

Anyway, here's the problem - and why no one can get the waiting for call screen to populate.

Using version 4.5n:

In -main (or -ma)

Code:

31225 gosub32800:i$=i$+left$("h0", tx%(11)and2):gosub34610:i=56586:goto31285

The underlined subroutine is where things freeze up.

Now, here i$ is the modem string from config + "h0". In setup I configured the modem string to be *ati. * denotes 2400 only. tx%(11) is bitmapped so tx%(11)and2 is a system variable for "allow 80 column users?"

Line 34610 contains a loop:

Code:

34610 poke2584,peek(2585):print#5,i$:i=ti:p$="":do:get#5,op$:p$=right$(p$+op$,2):loopuntilp$="ok"orti-i>119:ifp$="ok"thenreturn:else34610
I believe I have broken it down to this:

1. [Poke the Peekd value - unsure what these are)

2. print#5,i$ - this looks like it is sending the init string (i$) to the modem

3. i - I assume i is "idle time" as in the time since the last call and this is ti "time idle" - since an event has occurred. Remember, this is my assumption. The documentation for it doesn't explicitly detail these variables.

4. get#5,op$ - this is getting the response from the modem

5. $p$=right$(p$+op$,2) - Later on we see that we are looking for p$ to equal "ok" so I am assuming this is prepending p$ to the modem response (op$) so if there is no response it will not be a zero length evaluation.

6.
Code:

loop unti lp$="ok" or ti-i > 119
This is where it is interesting. Since there is no modem (a Telnet BBS line, yes, but no actual Hayes command modem) nothing is ever returned so we never get OK. I'll explain in a bit what happens if I set p$="ok"

I also set up some debugging code to print the values of ti, i and ti-i. ti-i always equal 124, 125 or 126.

Right now, for example, here are a few sequential values of ti and i after I let it sit and run for about 5 hours:

TI - I - TI minus I
1103850 - 1103729 - 124
1103988 - 1103866 - 125
1104127 - 1104004 - 126
1104263 - 1104142 - 124

The rest is self-explanitory - nothing breaks the loop until p$ comes back "ok".

When I set p$="ok" before "loop until" the system goes into a loop of "Saving variables" then "Ready" so I am guessing incrementing ti and i is important.

I assume if I had an actual modem this wouldn't be an issue but I don't. I have a null modem cable and some frankencables I made up.

Any assistance is greatly welcome!
 
---
I received the following inquiry:
 
What happens if you skip all the p$ operation by changing the line to have a return right after the poke2584,peek(2585) 

It looks like to me the ti=current time and the i is the value of ti at that specific time. Then during the loop it is looking for a timeout where the value would be greater than 119 which should break the loop.
 
To which I replied:
When I return before the p$ stuff it goes through a "ring" loop every second. At least from there I can log in locally/go to offline commands. I am thinking that something about that loop should tell the system if it should listen for a ring, save variables or do midnight routines.
 

Edited by: Commodork on 2019-01-21 00:53
An update...

I beleve I have figured out some of the issue but may have a bigger problem.
It seems the issue I was having above is that the BBS is polling the modem every second and is expecting an "ok" in return. Now that I have Telnet BBS Server up and running and responding to it properly we are past that.
Now the issue is that the BBS thinks there is constantly a call coming in. Even if I telnet into it all I get is "ata".
I honestly think my null modem cable is screwed up and am getting a new one tomorrow. All of the other connectors I have built (USB to User Port, Serial to User port) work fine for outbound calling but don't do inbound well. I also think I got sent the wrong null modem cable.
More as I find it.

Log in or register to post comments