All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Fulghum <paulkf@microgate.com>
To: Paul Rolland <rol@as2917.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux 2.6.x - Serial port signalling not maintained when closing device
Date: Thu, 26 Mar 2009 09:57:18 -0600	[thread overview]
Message-ID: <49CBA5DE.6050206@microgate.com> (raw)
In-Reply-To: <20090326084220.4def5652@tux.DEF.witbe.net>

Paul Rolland wrote:
> I'm using small devices that are connected on the serial port, and powered
> using RTS and DTR.
> When using kernel 2.4.x (at least 2.4.31), I could easily control the
> powering of the device using :
>  stty -F /dev/ttyS0 ospeed 9600 (this would put RTS and DTR to 1 / power)
> and
>  stty -F /dev/ttyS0 ospeed 0 (this would turn it off).
> 
> I've recently updated one of the machine to a new 2.6.29 kernel, and this
> is not working anymore.
> As far as I can see, I need to have an application that keeps /dev/ttyS0
> open for this to work. As soon as no application is using the port,
> everything goes down again.

Are you explicitly clearing the HUPCL flag?
(stty -F /dev/ttyS0 -hupcl)

I just did a quick test on 2.6.22 and DTR/RTS are maintained
with your commands above, but only after clearing HUPCL.

-- 
Paul Fulghum
MicroGate Systems, Ltd.
=Customer Driven, by Design=
(800)444-1982
(512)345-7791 (Direct)
(512)343-9046 (Fax)
Central Time Zone (GMT -5h)
www.microgate.com

      parent reply	other threads:[~2009-03-26 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26  7:42 Linux 2.6.x - Serial port signalling not maintained when closing device Paul Rolland
2009-03-26  8:14 ` Alan Cox
2009-03-26 15:57 ` Paul Fulghum [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=49CBA5DE.6050206@microgate.com \
    --to=paulkf@microgate.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rol@as2917.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.