Arcane modem configuration (was Re: Modems on Ultrix)

Chris Torek chris at umcp-cs.UUCP
Thu Aug 21 02:31:40 AEST 1986


I have a few points to make.  Overall, Dave's article is no doubt
very useful to Ultrix 1.1 sites.

In article <282 at cirl.UUCP> das at cirl.UUCP (Dave Steffens) writes:
>Ultrix as supplied does NOT support modem control on ANY terminal lines.

A nit: it is not `does not support', but rather `ignores'.  Ah well.

>In order to enable modem control you **must** do a sysgen.

Not so!  You can use adb on the kernel image.  It is possible to
change either the running kernel, or the flags in the boot image,
or both.  The first is the easiest, as the boot-time flags are
rather well buried.  And in any case, after doing this, you should
adjust your configuration file so that you need never do it again.

Assuming that you wish to enable modem signals on DZ1, line 3:

	% adb -w /vmunix /dev/kmem
	dz_flags/x
	_dz_flags:
	_dz_flags:		f3ff
[N.B.: the above number may vary; but the idea is to clear bit eleven.]
	dz_flags/w 0ff3f
	_dz_flags:		ffff	=	f3ff
	%

I do not know the proper offsets for the boot-time flags---indeed,
I cannot know them, as they are configuration-dependent as well as
system dependent---but the procedure is similar:

	ubdinit+<n>*<sizeof struct (ubadevice)>+<offset to ui_flags>?x
	...?w f3

The flags are stored separately for each DZ, thus the f3 above.
In the DZ driver they are collected together into one array, thus
the f3ff earlier.  The value of <n> can be found by looking at
ioconf.c from a previous sysgen.  Alternatively, it may be divined
by certain Elvish arts, whose details are too complex to explain
here.

I daresay a reconfiguration and recompile is far easier for most.

>Find the entry in the configuration file....  The bit in "flags"
>corresponding to each line which has a modem on it must be zero
>in order to get the driver to use the modem control signals.  If
>the bit is one, modem control is disabled

(Ignored: though this distinction matters only in the driver itself.)

>on the corresponding line.  The "flags" are in HEX (base 16).

Only because they are written as `0x...'.  Be sure not to delete
those first two characters!

>NOTE: you cannot just set the all the bits to zero because once
>a line is configured to use modem signals it will not be usable
>with a directly-connected terminal!

This is my real point of contention.  This is not in fact the case!
We run most of our terminal lines wired as follows:

	1-----1
	2-----3
	3-----2

	4-+ +-4
	5-+ +-5

	6-+--20
	8-+

	7-----7

	20--+-6
	    +-8

Some terminals demand different configurations; but typically,
both the host and the terminal are properly configured to plug
right into a modem.  The above constitutes a `null modem' cable,
crossing various signals around such that, while the terminal is
on, the host sees a modem `carrier detect' signal.

With this set-up, you need disable modem control on no lines---
that is, use `flags 0x0', or no `flags' word at all---and, more
importantly, one can turn off a terminal to break its connexion.
(Some people think this is a bad idea, but `naive users' tend
to believe that turning terminals off is just as good as logging
out.  This seems intuitively correct to me, and it has not proven
a problem at other times, as one can always use `stty mdmbuf'....)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.unix mailing list