Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@rvs.uni-bielefeld.de>
To: "Pering, Trevor" <trevor.pering@intel.com>
Cc: BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] rfcomm stty -echo
Date: 30 Jul 2003 12:08:59 +0200	[thread overview]
Message-ID: <1059559745.26914.145.camel@pegasus> (raw)
In-Reply-To: <DD755978BA8283409FB0087C39132BD1023FBACD@fmsmsx404.fm.intel.com>

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

Hi Trevor,

> Basically, if I connect to my BlueZ device (acting as an "rfcomm listen"
> server), it connects ok but the /dev/rfcomm0 serial port is in "stty
> echo" mode -- which means that any data sent from the remote client get
> echoed back -- which is not what I want in this case. 
> 
> To fix this, one would normally type "stty -F /dev/rfcomm0 -echo" --
> which works nicely *after* the connection has been formed. However,
> before the connection has been made, I get a "no such device" error on
> /dev/rfcomm0.  
> 
> Any thoughts on how to get around this problem?  Is there some way to
> fix this cleanly? Is this the behavior rfcomm should have? 

the problem is that we use the default termios settings for RFCOMM.
Maybe it is bad to enable echo by default. Every application which sets
their own termios is working fine, but others will get problems.

The attached patch disables echo for every terminal.

Regards

Marcel


[-- Attachment #2: patch-rfcomm-tty-no-echo --]
[-- Type: text/x-patch, Size: 711 bytes --]

diff -urN linux-2.4.21/net/bluetooth/rfcomm/tty.c linux-2.4.21-mh/net/bluetooth/rfcomm/tty.c
--- linux-2.4.21/net/bluetooth/rfcomm/tty.c	Fri Jun 13 16:51:39 2003
+++ linux-2.4.21-mh/net/bluetooth/rfcomm/tty.c	Wed Jul 30 12:01:29 2003
@@ -905,8 +905,8 @@
 
 	/* Register the TTY driver */
 	rfcomm_tty_driver.init_termios = tty_std_termios;
-	rfcomm_tty_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-	rfcomm_tty_driver.flags = TTY_DRIVER_REAL_RAW;
+	rfcomm_tty_driver.init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
+	rfcomm_tty_driver.init_termios.c_lflag = 0;
 
 	if (tty_register_driver(&rfcomm_tty_driver)) {
 		BT_ERR("Can't register RFCOMM TTY driver");

           reply	other threads:[~2003-07-30 10:08 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <DD755978BA8283409FB0087C39132BD1023FBACD@fmsmsx404.fm.intel.com>]

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=1059559745.26914.145.camel@pegasus \
    --to=marcel@rvs.uni-bielefeld.de \
    --cc=bluez-users@lists.sourceforge.net \
    --cc=trevor.pering@intel.com \
    /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