[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CDS-224 tone dialing patch from [DICK@DRACULA.B&W-LYN.DIALNET.SYMBOLICS.COM: PATCH FOR LYNCHBURG]



    Return-path: <@DIAL|DIAL|18043853135,@DRACULA.B&W-LYN.DIALNET.SYMBOLICS.COM:DICK@DRACULA.B&W-LYN.DIALNET.SYMBOLICS.COM>
    Received: from DRACULA.B&W-LYN.DIALNET.SYMBOLICS.COM (DIAL|DIAL|18043853135) by plover.wisdom.dialnet.symbolics.com via DIAL with SMTP id 8022; 28 Mar 88 15:29:04 EST
    Date: Mon, 28 Mar 88 15:38 EST
    From: Dick <DICK@DRACULA.B&W-LYN.DIALNET.SYMBOLICS.COM>
    Subject: PATCH FOR LYNCHBURG
    To: MBH@PLOVER.WISDOM.DIALNET.SYMBOLICS.COM
    Message-ID: <880328153828.2.DICK@DRACULA.B&W-LYN.DIALNET.SYMBOLICS.COM>

    I recieved the following patch for CDS-224 modems from one of our outlying sites. The
    CDS-224 seems to insist on using pulse dialing, or perhaps sometimes erroneously
    deciding to use pulse on a tone dial network. The patch seems to fix the problem.
    This will only be of use to persons assisting a new dialnet site of course......

	It has not been tested under Genera 7.2

    THE FOLLOWING CODE CHANGE IS THE PATCH I MADE TO FORCE THE USE OF
    TOUCH TONES IN DIALING FROM THE LYNCHBURG CDS-224.

    ;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: ZL-USER; Base: 10; Patch-File: T -*-
    ;;; Patch file for Private version 0.0
    ;;; Reason: Function (FLAVOR:WHOPPER :OPEN DIAL:CDS-224-MODEM): Fix is change "D ~A" to "DM ~A"
    ;;; Written by DICK, 3/28/88 15:19:03

    (NOTE-PRIVATE-PATCH "Force cds-224 to use touch tones for dialing.")


    ;=====================================
    (SYSTEM-INTERNALS:BEGIN-PATCH-SECTION)
    ; From buffer modems.lisp >rel-7>dialnet D: (35)
    (SYSTEM-INTERNALS:PATCH-SECTION-ATTRIBUTES
      "-*- Mode: LISP; Package: DIAL; Base: 8; Lowercase: Yes -*-")

    ;; Methods


    (defwhopper (:open cds-224-modem) ()
      (error-restart (error "Redial call to ~A." host)
	;; It is now safe to assert DTR, since we have waited long enough to hang up the phone.
	;; Be sure not to do any I/O to the modem before this point.
	(let ((starting-parameters
		(list :mode (send self :get :mode)
		      :parity (send self :get :parity)
		      :number-of-data-bits (send self :get :number-of-data-bits)
		      :number-of-stop-bits (send self :get :number-of-stop-bits)
		      :check-parity-errors (send self :get :check-parity-errors)
		      :baud (send self :get :baud)))
	      (succeeded))
	  (unwind-protect
	    (progn
	      ;;Set the modes the way we need them.
	      (send self :put
		    :mode :asynchronous
		    :parity :even
		    :number-of-data-bits 7
		    :number-of-stop-bits 1
		    :check-parity-errors nil
		    :baud 1200.)
	      ;;Open the serial line
	      (continue-whopper)
	      ;;Make sure we are reset
	      (send self :tyo (ascii-code :esc))
	      (send self :finish)
	      (process-sleep 10)
	      (send self :clear-input)
	      (condition-case ()
		  (cds-224-command 60. nil "OK" "

    B")
		(modem-not-responding			;Must be set for high speed
		  (send self :put :baud 2400.)
		  (send self :tyo (ascii-code :esc))
		  (send self :finish)
		  (process-sleep 10)
		  (send self :clear-input)
		  (cds-224-command 60. nil "OK" "

    B")
		  (send (si:thin-character-stream self) :string-out "S L
    ")
		  (send self :finish)
		  (send self :put :baud 1200.)
		  (process-sleep 10)
		  (send self :clear-input)))
	      ;;Get into command mode and set up parameters
	      (cds-224-command 60. nil "OK" "P")
	      (cds-224-command 60. nil "OK" "S ~:[U~;S~]" (typep self 'si:serial-hdlc-mixin))
	      ;; Need 40 seconds for international calls (well, at least to get to France)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;  Here is patch.  Change from "D ~A" to "DM ~A" causes cds-224 to use only touch tones 
    ;;;                  when dialing the remote host. Take my word for it.  This is usually in
    ;;;                  sys:dialnet;modems.lisp 

	      (cds-224-command (* 40. 60.) (format nil "Dialing ~A" host)
			       "IN" "DM ~A" phone-number)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	      (setf succeeded t)
	      (loop repeat 5 ; Five seconds for carrier to assert itself, then give up.
		    until (send self :get :carrier-detect)
		    doing (process-sleep 60. "Carrier detect")))
	    (progn
	      (lexpr-send self :put starting-parameters)
	      (if succeeded
		  (send self :put :data-terminal-ready t :request-to-send t)
		  (send self :close :abort)))))))