• UART communications question.

    From Ozz Nixon@1:275/100 to All on Thursday, November 16, 2017 15:35:51
    I am recoding my old mailer and quickbbs source. Dropping the FOSSIL stuff so I can migrate and release 16bit, 32bit and 64bit across all the platforms my compiler is able to work with.

    My problem is, accepting the connection in the mailer, and shutting down to hand off the connection to the BBS... my old code Lowered DTR and swapped to disk and called qbbs. This is not working (may have introduced new bug cleaning up this 20 yr old code)... but, could someone refresh me with the process for chaining A to B w/o dropping carrier?

    Thank you!
    Ozz
    * Direct reply available/welcome to: ozznixon@gmail.com
    --- SBBSecho 2.12-Win32
    * Origin: Shenk's Express, shenks.synchro.net (1:275/100)
  • From Ozz Nixon@1:275/100 to All on Thursday, November 16, 2017 16:13:51
    Re: UART communications question.
    By: Ozz Nixon to All on Thu Nov 16 2017 03:35 pm

    Okay, I changed the UART code to simply restore:

    DisableInterrupts;
    Port[$21] := OldPort21; {- Restore PIC status-}
    Port[$20] := $C7; {- IRQ0 1. priority-}
    EnableInterrupts;

    This allowed me to terminate the answering test app, as soon as the next app started it then dropped carrier. So this raises the question of, if I am doing this correctly - does the next app (BBS or DOOR) need to set the DTR on? (I think that is the line dropping me - rebuilding whie writing this).

    Ozz
    --- SBBSecho 2.12-Win32
    * Origin: Shenk's Express, shenks.synchro.net (1:275/100)
  • From Joaquim Homrighausen@2:20/4609 to Ozz Nixon on Thursday, November 16, 2017 23:22:06
    My problem is, accepting the connection in the mailer, and
    shutting down to hand off the connection to the BBS... my
    old code Lowered DTR and swapped to disk and called qbbs.
    This is not working (may have introduced new bug cleaning
    up this 20 yr old code)... but, could someone refresh me with
    the process for chaining A to B w/o dropping carrier?

    Well ... not knowing the intention behind doing so, but dropping DTR will typically tell your "modem" (or "emulated modem") to terminate the session.

    (There are other uses for DTR, but they were rare "way back" and probably T-Rex:ish nowdays)



    -joho

    ---
    * Origin: code.code.code (2:20/4609)
  • From mark lewis@1:3634/12.73 to Ozz Nixon on Friday, November 17, 2017 11:09:58

    On 2017 Nov 16 16:13:50, you wrote to All:

    This allowed me to terminate the answering test app, as soon as the
    next app started it then dropped carrier. So this raises the question
    of, if I am doing this correctly - does the next app (BBS or DOOR)
    need to set the DTR on? (I think that is the line dropping me -
    rebuilding whie writing this).

    we never did anything... leave the port as originally set up and fire up the next app with the same serial settings... don't init in the second app... just grab the port with the settings and go on... why (re)init what is already inited and active??? i never understood that...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... It's becoming hard to remain a legend in my own mind.
    ---
    * Origin: (1:3634/12.73)
  • From Scott Little@3:712/848 to Ozz Nixon on Saturday, November 18, 2017 17:59:56

    [ On 2017-11-16 at 15:35:50, Ozz Nixon wrote to All ]

    My problem is, accepting the connection in the mailer, and shutting
    down to hand off the connection to the BBS... my old code Lowered DTR
    and swapped to disk and called qbbs. This is not working (may have

    Add &D0 to your init string.

    &Dn - Controls data terminal ready (DTR) transition 0=Ignore DTR signal; 1=Return to command mode when after losing DTR; 2=Hang up, turn off auto answer, and return to command mode after losing DTR; 3=Reset after losing DTR.

    IIRC you can get away with leaving DTR high in DOS but in Windows you have to close the COM port before another program can open it which automatically lowers DTR. The only way around that is to pass the Win32 COM handle (instead of the port), but that needs to be supported by your other software.


    --- If this were an actual tagline, it would be funny.
    * Origin: sysgod@sysgod.org (3:712/848)