Subject: Re: minor device numbers (was: Re: B&W install questions- ofdisk, internal modem)
To: Steven Kasow <kasow@panix.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-macppc
Date: 07/22/1999 15:40:39
On Thu, 22 Jul 1999, Steven Kasow wrote:
> On Thu, Jul 22, 1999 at 11:38:19AM -0700, Bill Studenmund wrote:
> >
> > Try "cd /dev; mknod dty00 c 12 524288", then chmod /dev/dty00 to something
> > you can use/what you want. Then try cu -l /dev/dty00.
>
> Done. Su to root, mknod as above, chmod ugo+rw /dev/dty00.
>
> cu reports 'write: Input/Output error'
> The -d output, in case it means anything:
> cu -d -l /dev/dty00 -s 38400
> cu: fconn_open: Opening port /dev/dty00 (speed 38400)
> cu: fconn_set: Changing settings to 0,0,2
> Connected.
> cu: fconn_write: Writing 1 "a"
> cu: write: Input/Output error
> Disconnected.
>
> I tried a variety of speeds - 38400, 57600, 115200, all with the same
> results. I'm running a 1.4D kernel and userland (from the most recent
> snapshot on netbsd.org)
Try tip. You'll need to define the device in /etc/remote. Try something
like
imodem:dv=/dev/dty00:br#38400:pa=none:dc:
at the end of the file, then tip imodem will try to connect. I've always
found cu to be buggy..
> I'm trying to get some clue about things, so I poked around in the
> sources and man pages trying to figure out where that mknod command
> you suggested comes from.
> And the dmesg output states 'zsc0 at obio0 offset 0x13000', and
> 'zstty0 at szc0 channel 0, zstty1 at zsc0 channel 1' which
> looks fairly close to the 0x13020 above, so I think I understand
> the '12'- But I haven't been able to track down where the '524288'
> comes from. Any hints?
mknod dty01 c 12 524289
printf "%x %x\n" 524288 524289
(note: that's printf(1), the program)
It'll output:
80000 80001
:-) Answer below
The difference between dialout and non-dialout lines is that the most
significant bit in the minor number is set.
Take care,
Bill