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

slip for 3640?

[Slug removed]
    Date: Tue, 22 Oct 1991 14:28 EDT
    From: Bill@CASSIOPEIA.mystech.dialnet.symbolics.com (Bill Anderson)


    has anyone tried to run slip (or some other form of "network") on a 3640
    over a highspeed modem (v.32bis)? if not, what other options are available?
Currently we at Symbolics are experimenting with SLIP in what will become 8.2
and currently it only runs on Ivories.  There are several people interested in
getting it to run on OBS (myself among them) but it hasn't been done yet due to
time pressure.  It is unlikely that it will be useful to back-patch the code
into an earlier release because it pointed out several tuning problems in TCP/IP
which we are still struggling over.

    i seem to remember some discussion on this occuring several months back, i
    appologize for not archiving.

    also, does anyone have a modem definition for a usrobotics courier v.32bis modem
    or will the hayes definition work?
The Hayes definition won't work.  I don't know about the v.32bis US-Robotics, but I
have a definition for the HST 9600 which seems to work (although I've only had this
borrowed modem for a week now and so haven't used it very extensively).  You can
probably modify this to make it work for you.  If you send me the result, I'll see
about getting it included in future releases of Genera.

    thanks, -ba

The file is called usr-9600-modem.lisp.  The contents are below.

;;; -*- Mode: LISP; Package: DIAL; Base: 8; Lowercase: Yes; Patch-File: Yes -*-

   This file implements minimalist support for USR 9600 HST modems

;;This should rightly go in SYS:DIALNET;MODEMS.LISP

(defflavor usr-9600-modem () (modem)
    (t serial-rubout-escape-translating-stream)
    (nil serial-no-translation-stream))))

(define-modem-type :usr-9600 usr-9600-modem t)

(defun-in-flavor (usr-9600-modem-command usr-9600-modem)
		 (timeout whostate expected-response string &rest args)
  ;;If string is NIL, we are just waiting for unsolicited response
  (when string
    (lexpr-funcall #'format (si:thin-character-stream self) string args)
    (send self :tyo (ascii-code :cr))
    (send self :finish)
    (loop for echo = (modem-read-response-line self "Read echo of command" timeout t)
	  for null-echo? = (string-equal "" echo)
	  unless null-echo?
	    do (let ((at-start (string-search "AT" echo)))
		 (unless (and at-start (zerop at-start))
		   (error 'modem-bad-response ':response echo)))
	  until (not null-echo?)))
    (loop for response = (modem-read-response-line self
						   (or whostate "Usr-9600 Command") timeout t)
	  until (if (listp expected-response)
		    (loop for er in expected-response
			  thereis (string-equal response er))
		    (string-equal response expected-response))
	  unless (string-equal response "")
	    do (if expected-response
		   (selector response string-equal
		     ;; ++ To some extent, these should be call failures rather than refusals;
		     ;; ++ do this right someday.  -- joseph
		     (("4" "ERROR")
		      (ferror "Programming error talking to Usr-9600 modem"))
		     ;;no answer or busy for usr-9600-1200; no answer for usr-9600-2400
		     (("3" "NO CARRIER")
		      (error 'modem-call-refused :foreign-host host :connection self
			     :reason "No carrier."))
		     ;;only on usr-9600-2400
		     (("7" "BUSY")
		      (error 'modem-call-refused :foreign-host host :connection self
			     :reason "Busy."))
		     (("8" "NO ANSWER")
		      (error 'modem-call-refused :foreign-host host :connection self
			     :reason "No answer."))
		     (("6" "NO DIALTONE")
		      (error 'modem-call-refused :foreign-host host :connection self
			     :reason "No dial tone."))
		       (error 'modem-bad-response ':response response)))
		   ;;if expected-response was NIL, we want whatever response modem sends.
		   (return response))))

(defmethod (:dial-the-phone usr-9600-modem) ()
  (error-restart (error "Redial call to ~A." host)
    (send self ':ensure-open)
    ;; 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 (succeeded)
	    (send self :clear-input)
	    (usr-9600-modem-command (* 5 60) "Set fixed speed" '("0" "OK") "AT&B1")
	    (usr-9600-modem-command (* 80. 60.) (format nil "Dialing ~A" host)
			   '("1" "CONNECT"
			     "5" "CONNECT 1200"
			     "10" "CONNECT 2400"
			     "CONNECT 9600"
			     ) "ATD~A" phone-number)
	    (setf succeeded t))
	(if succeeded
	    (send self :put :data-terminal-ready t :request-to-send t)
	    (send self :close :abort))))))

(compile-flavor-methods usr-9600-modem)