From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: pxa320: change uart configuration
Date: Thu, 14 Jan 2010 11:24:32 +0000 [thread overview]
Message-ID: <20100114112432.GA21385@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20100114115225.94334g603pqhe1d5@webmail.tu-cottbus.de>
On Thu, Jan 14, 2010 at 11:52:25AM +0100, Judith Baumgarten wrote:
> Zitat von Russell King - ARM Linux <linux@arm.linux.org.uk>:
>
>> On Tue, Jan 12, 2010 at 06:30:00PM +0100, Judith Baumgarten wrote:
>>> I want to change the uart configuration of the pxa serial ports in order
>>> to be able to connect to different devices. The problem is, that it jumps
>>> back to its initial configuration, when it receives some data. I used
>>> stty of busybox 1.14.3 as well as the termios-structure to change the
>>> configuration, but it always remained the same. I could protect some
>>> configurations by using the TIOCSLCKTRMIOS ioctl, but the baudrate still
>>> jumps back.
>>
>> Something will be changing it back. A getty maybe?
>
> We have no getty on our system. Inittab contains just the following entries:
>
> ::sysinit:/etc/init.d/rcS
> ttyS0::respawn:-/bin/sh
> ttyS1::respawn:-/bin/sh
> tty1::respawn:-/bin/sh
> tty2::respawn:-/bin/sh
> ::ctrlaltdel:/bin/umount -a -r
>
> and a "ps ax | grep tty" has no result.
You have two shells - one on ttyS0 and one on ttyS1. While these are
running on these ports, they will want to control the settings - so
if you try to make use of these two serial ports, you're going to
cause confusion.
Firstly, the shells will fight you with your termios settings. Secondly,
any received characters will be delivered randomly between the shell and
your program - some characters will be seen by the shell, others will
be seen by your program.
This is just something you do not want to do. If you want to control a
port, you need exclusive access to it - which means not starting any
other program on the port. In the case of serial ports, there's a
locking mechanism for programs for serial ports (getty, uucp, minicom,
etc) which involves creating lock files - eg, /var/lock/LCK..ttyS0.
http://tldp.org/HOWTO/Serial-HOWTO.html#toc14.2
covers some of the issues there.
prev parent reply other threads:[~2010-01-14 11:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-12 17:30 pxa320: change uart configuration Judith Baumgarten
2010-01-12 17:36 ` Russell King - ARM Linux
2010-01-14 10:52 ` Judith Baumgarten
2010-01-14 11:24 ` Russell King - ARM Linux [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100114112432.GA21385@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).