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

Re: Debian/Mac and serial ports

> >The kernel doesn't do any initilization like on the PC for standard serial
> >ports?
> Sure it does!  Or, its supposed to.  In this case it is apparently NOT
> doing it.  The script does not run, thats for certain.

dmesg will tell you for sure whether the kernel found the serial ports

the script definitely WILL run, I don't know how come it's not in
your case, it runs on my m68k box, and they all use the same base
files. (I run 2 i386 pc's and a 68040 Amiga with Debian Linux)

/etc/init.d/rcS contains -
#       For compatibility, run the files in /etc/rc.boot too.
[ -d /etc/rc.boot ] && run-parts /etc/rc.boot

If you change the first line of /etc/rc.boot/0setserial from
#!/bin/sh -vx

You will get some extra output, ie. it will show you the lines it is
executing as it is done.  This will be displayed to the console as
you boot up.  Try it also in the rcS script.  If the rcS script isn't
being run then your system probably has far worse problems than a
serial port not working.

There is only one echo line in there, it will not echo anything unless
the result code of setserial is false. Under m68k, especially on a mac,
you may find the result code is incorrect. (I wouldn't know how or why,
just an inference).

The other thing is that setserial doesn't necessarily have to be run
to initialise a serial port, however from the man page, you may use
it to set/get Linux serial port information.

> >Did you find kermit and try it?
> >
> No, I didn't look for it yet.  I don't expect the behavior to be any 
> different anyway.  The problem is that the ports are not being setup
> at boot time, so they're not yet initialized and functional when I run
> minicom, and thats why I have to select it and change something because
> the result of doing that init's the port and it starts working.  Kermit
> will make no difference.
> > wo> I don't even think the script that should run, gets called, and I
> > wo> don't know why.
> >
> >I not yet familiar with the debian way of doing things (on the pc I use 
> >redhat) but you could try /etc/rc.d/rc.serial which is called from rc.sysinit
> That is not what happens in Debian's init...and I have no idea what is
> supposed to run this script in the first place, but it has to be one of
> the Sscripts for runlevels two or three.  I just haven't looked at all
> of them to find which it is...whichever one it is, it isn't doing it 
> anyway...so I might not find it there afterall.  If its not there, looking
> for it will do no good.


> Whatever, but since I've already tried setserial, which is really what is
> run by the script, it doesn't work with the Mac ports either, apparently.
> Setserial is intended to talk to UARTs and since Mac serial ports are not
> UARTs it doesn't work, is my guess.  It certainly doesn't write the Mac
> ports registers, because if it did the port would work after running it, 
> and then launching minicom.  It doesn't.  Not until you do it with minicom
> anyway.

Setserial is there to init serial ports of _whatever_ type, not just
UART's, it may even set the serial TIO structure itself, but it's true that
it may not (yet) support the Mac ports.

If it is already initialised by the kernel somehow you should see the
serial port(s) listed in /proc/interrupts in /proc/ioports. Otherwise
minicom is doing the initalising for you, oh well :)

Hopefully this will end somewhat most of this thread, it's repeating
itself over and over :)

Steve Hardman

Reply to: