NetBSD-Users archive

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

Re: ldattach(8) alike util in NetBSD?



On Mon, Feb 16, 2015 at 08:14:07AM +0100, Marc Balmer wrote:
> Am 16.02.15 um 03:34 schrieb Christos Zoulas:
> > In article <CBA94F53-88B0-454D-950E-489E95899CBF%nordu.net@localhost>,
> > Fredrik Pettai  <pettai%nordu.net@localhost> wrote:
> >> On 09 Feb 2015, at 09:16 , Marc Balmer <marc%msys.ch@localhost> wrote:
> >>> Am 09.02.15 um 09:06 schrieb Fredrik Pettai:
> >>>
> >>>> OpenBSD has ldattach(8) for setting for instance baudrate on a serial
> >> device. 
> >>>>
> >> http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man8/ldattach.8?query=ldattach&sec=8
> >>>>
> >>>> Is there a similar util in NetBSD ?
> >>>
> >>> slattach(8). You can set the baudrate using the -s option.
> >>>
> >>> See http://netbsd.gw.com/cgi-bin/man-cgi?slattach++NetBSD-current
> >>
> >> Hmmm, it doesn?t seem to work well?
> >>
> >> rpi# slattach (-l) -n -s 460800 /dev/ttyU0 (or ttyU1)
> >> slattach: TIOCSLINED: Device not configured
> > 
> > slattach is for slip (Serial Line IP, the precursor to ppp). I don't
> > understand why Marc said it would do what you want. Perhaps you don't
> > have slip configured in your kernel and that's the error about the line
> > discipline.
> 
> Actually "our" slattach can attach any line discipline, not only slip.
> ldattach in OpenBSD supersedes slattach, which in contrast to ours can
> not attach arbitrary line disciplines.

You can set serial line speed with stty:

$ stty -f /dev/tty00 speed 115200

When the port is closed, the parameters (including speed) return to their
default values.

  -jm


Home | Main Index | Thread Index | Old Index