Serial port activity?
#1
Hey. I was just wondering if anyone knows if there's a way to set the WiModem 232
to auto hang-up (disconnect) if there's no activity on the serial port for X amount of
time?

Thanks.
Reply
#2
No, but I can look at adding that feature.  How about AT*AD[time in seconds] for an auto-disconnect command?  Your BBS would have to be looking at the DCD state to know that it disconnected, but that would have to be the case also if someone hung up on the BBS so that is probably not going to be a problem.
Reply
#3
(08-25-2021, 12:21 PM)admin Wrote: No, but I can look at adding that feature.  How about AT*AD[time in seconds] for an auto-disconnect command?  Your BBS would have to be looking at the DCD state to know that it disconnected, but that would have to be the case also if someone hung up on the BBS so that is probably not going to be a problem.

Right, that should pretty much cover it.

Thanks!  Smile
Reply
#4
Well, it turns out that I already have the interface code for this!  Register S30 is the inactivity timer.  However, I do not have this enabled in the code.  I will add that for the next update!

The Wiki for the AT Command set (which I follow with the WiModem series) is located here: https://en.wikipedia.org/wiki/Hayes_command_set

You can see the entry for S-Register 30:

S30 Inactivity Disconnect Timer 0–255 tens of seconds 0 (disable)

So, setting S30=1 would set the connection inactivity timer for 10 seconds.  ie

ATS0=1 <RETURN>

If  you wanted to set the disconnect timer to 5 minutes (300 seconds) you would use ATS0=30  (which is 300/10).  Using a value of 0 (the default) disables the Inactivity Disconnect Timer.
Reply
#5
Awesomeness!

I humbly and patiently await the next update. Smile
Reply
#6
Ok, new version has been released. The default time for S30 was 30 in all previous versions. If you do AT&F to do a factory reset then S30 will be set to 0 (disabled). Otherwise, don't be surprised if after 300 seconds (5 minutes) of no serial activity (in or out) that it disconnects!!
Reply
#7
Coolness! I'll update here shortly and play around with it on my BBS.

Thanks so much for all the hard work - appreciated! Smile
Reply
#8
Okay, things look pretty good here.

I updated the firmware - the default setting for S30 was 5 mins (as you mentioned)
and that should be fine.

I logged in and deliberately set up the same scenario that led me to ask for this update.

I went to the file download area, batch marked a bunch of files, set them to download,
then walked away (actually went and watched some Netflix). Normally, when the file
download ends, the BBS software will report success and ask the caller to hit <return>.

In this case (and what happened with a caller) was that they weren't there to hit the
<return> key. So the BBS software just keeps asking for the <return> key endlessly.

Now, I always include a "IF TIME_EXCEEDED" snippet of code in all my scripts but it
doesn't seem to want to kick in here, for some odd reason. (still looking into that)

But...this time....when I came back about 15 minutes later, the BBS had returned to
its' normal "waiting on a caller" screen, ready to answer. SyncTerm, which I had used
to call in with was still showing a screen full of "hit <return> please" 's but when I did,
it popped a message up saying we were disconnected.

Success! Smile

I'll keep monitoring it of course but it looks like this problem is solved.

Thanks Jim!
Reply
#9
Yeah, I noticed that your BBS keeps outputting that Press RETURN text over and over. I wasn’t sure if that only occurs so many times before it stops.
Reply
#10
The problem is also easily handled another way if people would use it.

It directly asks if the caller wants to logoff after the download is finished.

Just to make sure, I tried it a half dozen times or so and it logs you off
after the download without any problems.

Oh well, either way should have all the bases covered for the moment.

But like anything where Humans are involved, there will *always* be that
one that does something you never expected... Smile
Reply




Users browsing this thread: 1 Guest(s)