* [Bluez-devel] SPP connections
@ 2007-01-23 0:42 Mark S. Townsley
2007-01-23 4:20 ` Mayank BATRA
0 siblings, 1 reply; 2+ messages in thread
From: Mark S. Townsley @ 2007-01-23 0:42 UTC (permalink / raw)
To: BlueZ development
[-- Attachment #1.1: Type: text/plain, Size: 588 bytes --]
Dear All
I have a program and listen for connections from a device that uses SPP. My
program just opens RFCOMM socket and waits for connection to come in. The
device that connects into my program has a connection LED indicating a
successful connections.
I have noticed that if close my RFCOMM socket, even if I stop my listener
process, the connection LED on the device remains lit. The only thing I get
it to not lit (and thus indicates that it is giving up on that connection)
is to remove my USB bluetooth dongle.
Is there anyway I can do a full disconnect on SPP?
Thanks
Mark
[-- Attachment #1.2: Type: text/html, Size: 646 bytes --]
[-- Attachment #2: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bluez-devel] SPP connections
2007-01-23 0:42 [Bluez-devel] SPP connections Mark S. Townsley
@ 2007-01-23 4:20 ` Mayank BATRA
0 siblings, 0 replies; 2+ messages in thread
From: Mayank BATRA @ 2007-01-23 4:20 UTC (permalink / raw)
To: BlueZ development
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
Hi Mark,
> I have a program and listen for connections from a device that uses
> SPP. My program just opens RFCOMM socket and waits for connection to
> come in. The device that connects into my program has a connection LED
> indicating a successful connections.
>
> I have noticed that if close my RFCOMM socket, even if I stop my
> listener process, the connection LED on the device remains lit. The
> only thing I get it to not lit (and thus indicates that it is giving up
> on that connection) is to remove my USB bluetooth dongle.
I also faced the same problem sometime ago and Marcel gave me the
attached patch which fixed the problem.
By the way, which kernel are you using? This problem is there only in
older kernel versions.
Best Regards,
Mayank
--
Random Quote Follows:
Recursive, adj.; see Recursive
[-- Attachment #2: patch-rfcomm-incoming-session-refcount.txt --]
[-- Type: text/plain, Size: 1079 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/18 13:25:42+01:00 marcel@holtmann.org
# [Bluetooth] Fix session reference counting for RFCOMM
#
# When an incoming connection terminates, the signal DLC is never
# closed and thus the underlaying L2CAP connection stays open. This
# problem doesn't show up often, because most times the other side
# takes care of terminating the signal DLC.
#
# Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
#
# net/bluetooth/rfcomm/core.c
# 2005/03/18 13:24:00+01:00 marcel@holtmann.org +4 -0
# Fix session reference counting for RFCOMM
#
diff -Nru a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
--- a/net/bluetooth/rfcomm/core.c 2005-03-18 13:30:07 +01:00
+++ b/net/bluetooth/rfcomm/core.c 2005-03-18 13:30:07 +01:00
@@ -389,6 +389,8 @@
rfcomm_dlc_unlock(d);
skb_queue_purge(&d->tx_queue);
+ rfcomm_session_put(s);
+
rfcomm_dlc_unlink(d);
}
@@ -597,6 +599,8 @@
*err = -ENOMEM;
goto failed;
}
+
+ rfcomm_session_hold(s);
s->initiator = 1;
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-23 4:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 0:42 [Bluez-devel] SPP connections Mark S. Townsley
2007-01-23 4:20 ` Mayank BATRA
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.