linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Bluez-users] rfcomm stty -echo
       [not found] <DD755978BA8283409FB0087C39132BD1023FBACD@fmsmsx404.fm.intel.com>
@ 2003-07-30 10:08 ` Marcel Holtmann
  0 siblings, 0 replies; only message in thread
From: Marcel Holtmann @ 2003-07-30 10:08 UTC (permalink / raw)
  To: Pering, Trevor; +Cc: BlueZ Mailing List

[-- 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");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-30 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <DD755978BA8283409FB0087C39132BD1023FBACD@fmsmsx404.fm.intel.com>
2003-07-30 10:08 ` [Bluez-users] rfcomm stty -echo Marcel Holtmann

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).