Re: Serial driver changes from v5 to v7



In article <4Tb2i.6021$RX.5567@xxxxxxxxxxxxxxxxxxxxxxxxxx> bob
prohaska's usenet account <bp@xxxxxxxxxxxxx> writes:
Per Hedeland <per@xxxxxxxxxxxx> wrote:

For future dejagooglers, on comparing the defaults between 5.3 and 6.0,
I found that the difference was that these were set in 6.0 but not in
5.3 (or ever before):

lflags: icanon isig iexten
iflags: icrnl ixon ixany imaxbel brkint
oflags: opost onlcr


For the sake of my own edification, _where_ is this default set?
If it's the source, I'll plead that I'm not a programmer. If it's
in a config file, I'm guilty to something 8-)

The defaults are set in the kernel code. You can however see them, and
even modify them, via the "init" device - i.e. in 5.x:

stty -a -f /dev/ttyid0

in 6.x and later:

stty -a -f /dev/ttyd0.init

So, an alternative solution to your problem could have been to modify
the settings on the "init" device - but I think this is an inferior
solution since you'll need to have that done on each boot, and it's easy
to forget the relation between that and your use of the port for
printing. Better to have a "robust" printcap entry.

And of course the fact that you *can* modify the "effective defaults"
this way means that it is even more senseless to change the "default
defaults" inside the kernel.

Per above, icanon is set by default in 6.0 and later. The fact that your
initial attempt to unset it failed can probably be blamed on the pretty
arcane and picky syntax for *cap entries - you can see that in your old
entry, continuations are only done after ':', which is probably safest.
When you put a continuation immediately after 'ms=', the unfolded line
becomes something like 'ms= -icanon,...', which may confuse the
parser.

For some (possibly imaginary) reason I believed the : character denoted
a countable boundary which should be preserved. My mistake.

I'm not sure what you mean by "countable boundary", certainly the ':'
denotes a boundary between capabilities so you can't just insert one
somewhere at random, but the number of ':' doesn't matter since all
capabilities are named. *If* the problem really was the "embedded" space
int the 'ms' value, the safe way to avoid it would be to not have a line
break at all from 'ms=' to the last flag value.

That I'm the only one who can do the debugging [reconfiguring?] is
somewhat sad. If nobody of sufficient skill is using rs232 serial
ports they will not long survive in FreeBSD. However, they remain useful.

I didn't mean that you are the only one who can debug a serial port
problem:-), but you were the only one that could debug the particular
problem that occurred with the combination of your particular printer
and usage of 'lprps'. Well, someone else that had that particular
problem could probably debug it too, but no-one showed up.:-)

--Per Hedeland
per@xxxxxxxxxxxx
.



Relevant Pages

  • Re: How to Disable Ethernet
    ... you can use the serial port as an alternative method of getting debug. ... can disable KITL debugging and just read all of the messages that come out. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Debugging through UART0
    ... There is no way to share serial port between serial driver ... and debug output stuff. ... for the same UART port (ie. UART0). ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Can i use FFUART as Debug and Application serial port?
    ... You can't have a registry entry for the same port as a normal serial port ... Capturing the debug messages that are coming out that FFUART port would ... For your test with the BT serial port, display is getting what? ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Cant open Serial port
    ... serial port is opened, then start the debug output again when it closes. ... are you actually loading a serial driver ... After boot, I find my test program, double click it to run. ...
    (microsoft.public.windowsce.platbuilder)
  • [PATCH 09/12] i386/x86_64: EHCI usb debug port early printk support.
    ... With legacy free systems serial ports have stopped being an option ... to get early boot traces and other debug information out of a machine. ... EHCI USB controllers provide a relatively simple debug interface ... When the special feature of the EHCI is not enabled the port ...
    (Linux-Kernel)