Why is tty1 not like tty0?

CB Genrich cb at bwilab3.UUCP
Tue Oct 23 08:36:45 AEST 1990


Help wanted, --> please <--

I have not been able to get anything to work on my Macintosh II
printer port.  I can do most anything I want with the modem port
and, you would think, the printer port should be the same except
that /dev/tty1 or /dev/printer should be used instead of the
/dev/tty0 or /dev/modem character special files.  Can anyone out
there talk to a terminal or modem connected to the printer port?

I am working with a "just installed" system, and have accepted
all the defaults along the way.  The bottom line is that I would
like to do the following command and get the expected results:

  setport -r tty1

If I do this with tty0 everything works just fine.  I have 
noticed the following:

  1> the major/minor numbers are:
     
     tty0: 0/0
     tty1: 0/1
  
  2> the following program gives different results for the two:

     /**************************** short program *********/
     #include <stdio.h>
     #include <errno.h>

     main()
     {
       int result;

       result = open("/dev/tty0",O_WRONLY);

       printf("RESULT IS %d, ERRNO IS %d\n",result,errno);
     }
     /****************************************************/

     I get:

       RESULT IS 3, ERRNO IS 0
     
     if I use /dev/tty0 as shown, but:

       RESULT IS -1, ERRNO IS 6
      
     if I use /dev/tty1 as desired.

     Investigating, errno 6 is ENXIO, described as:

       No such device or address.  I/O on a special file refers to a
       subdevice which does not exist, or beyond the limits of the
       device.  It may also occur when, for example, a tape drive is
       not online or no disk pack is loaded on a drive.

     I would surely think that it is not the subaddress problem,
     since A/UX made the node for me during installation, and the
     commando dialog and the instructions say to us whichever you
     want to.

     All I can think is that something has "grabbed" my printer
     port, but not my modem port...something like AppleTalk???

     Otherwise the vaguely described "for example" problem should
     not occur on the printer port only, since the two are so very
     similar.

     I am pretty sure that this is the same problem other tricks are
     having, because of the messages they print.  For example:

       ls >/dev/tty0
    
     works fine (no messages), whereas:

       ls >/dev/tty1
       ksh: /dev/tty1: cannot create
    
     Also, getty on tty1 complains something like:

       getty: tty1: cannot create, No such device or address


  3> Under the heading "could something else be holding the port",
     Boot MacOS, open Chooser, AppleTalk set to "inactive".

     Boot A/UX, open Chooser, NO APPLETALK selection
       (i.e. my display does not match the manual),
       do not select anything.

     Restart (MacOS boots), open Chooser, AppleTalk now set
       to "active", even though I selected nothing ever in
       either of the Chooser windows.

     NOTE: the problem persists, even if I ensure that the
	   MacOS Chooser shows inactive before and after.

-CB-

{gatech|emory}!galbp!bwilab3!cb



More information about the Comp.unix.aux mailing list