linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* pxa320: change uart configuration
@ 2010-01-12 17:30 Judith Baumgarten
  2010-01-12 17:36 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Judith Baumgarten @ 2010-01-12 17:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

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.

Any ideas?

Regards
Judith

P.S.: I'm using the 2.6.28.7 kernel.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* pxa320: change uart configuration
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-01-12 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* pxa320: change uart configuration
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Judith Baumgarten @ 2010-01-14 10:52 UTC (permalink / raw)
  To: linux-arm-kernel

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.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* pxa320: change uart configuration
  2010-01-14 10:52   ` Judith Baumgarten
@ 2010-01-14 11:24     ` Russell King - ARM Linux
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-01-14 11:24 UTC (permalink / raw)
  To: linux-arm-kernel

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-14 11:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).