NetBSD-Users archive

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

Re: TTL/USB converter usage question



El lun, 14 oct 2024 a las 15:11, RVP (<rvp%sdf.org@localhost>) escribió:
>
> On Mon, 14 Oct 2024, Robert Elz wrote:
>
> >  | $ stty -f /dev/ttyU0 9600 raw; cat /dev/ttyU0
> >
> > The terminal device needs to be held open, otherwise when it
> > closes (when stty exits) all the modes are reset back to
> > the default for the next open.
> >
>
> Ah yes--had a feeling I was forgetting something...
>
> > Something like
> >
> >       (stty 9600 raw; cat) </dev/ttyU0
> >
> > might work, perhaps.
> >
>
> Shell might get stuck on open. This should work, I think:
>
> $ { sleep 1; stty -f /dev/ttyU0 ... ; } & cat /dev/ttyU0
>
> -RVP

Hello again.

netbsd-raspa4$ { sleep 1; stty -f /dev/ttyU0 ... ; } & cat /dev/ttyU0
stty: /dev/ttyU0: Resource temporarily unavailable
^C
netbsd-raspa4$ { sleep 1; stty -f /dev/ttyU0 9600 ; } & cat /dev/ttyU0
stty: /dev/ttyU0: Resource temporarily unavailable
^C
netbsd-raspa4$ { sleep 1; stty -f /dev/ttyU0 9600 raw; } & cat /dev/ttyU0
stty: /dev/ttyU0: Resource temporarily unavailable
^C
netbsd-raspa4$ { sleep 1; stty -f /dev/ttyU0 9600 raw clocal cread
-crtscts; } & cat /dev/ttyU0
stty: /dev/ttyU0: Resource temporarily unavailable
^C

Thanks, but nothing outputs...

Regards.


Home | Main Index | Thread Index | Old Index