From: Andreas Gaufer <Andreas.Gaufer@bluecellnetworks.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH]Re: multithreaded name resolution
Date: Mon, 1 Oct 2007 15:40:23 +0200 [thread overview]
Message-ID: <20071001154023.53e57c49@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.63.0708241410030.12067@redbean.intranet.gw-instruments.de>
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
On Fri, 24 Aug 2007 14:14:53 +0200 (CEST)
Peter Wippich <pewi@gw-instruments.de> wrote:
>
> Hi Matthias,
>
> On Fri, 24 Aug 2007, Matthias Becker wrote:
>
> > Hi,
> >
> > I tried to read the name of different devices parallel using multi
> > threading, but without success. If there is one bluetooth device I works
> > (as there is no real multi threading). If there are who devices, the
> > same name is reported for both devices. In another test with 6 devices
> > hci_read_remote_name returned something <0 so I did not get any name at
> > all.
>
> this won't work. Asking for the name of a device is some sort of
> connection setup, and most (all ?) Bt chips do not allow / can not handle
> parallel connection setups (even though parallel connections are
> possible).
>
> So don't try further, the problem is outside your code (and even BlueZ).
>
That's not true, the reported behavior is produced by bluez-libs. I already
sent a patch to fix it and will attach that patch again to this mail.
Please let me know if that Patch fixes your problem Matthias.
Greetings
Andy
See also:
http://thread.gmane.org/gmane.linux.bluez.devel/12491
[-- Attachment #2: bluez-libs-3.19-EVT_REMOTE_NAME_REQ_COMPLETE.patch --]
[-- Type: application/octet-stream, Size: 797 bytes --]
diff -ur bluez-libs-3.19-ORG/src/hci.c bluez-libs-3.19/src/hci.c
--- bluez-libs-3.19-ORG/src/hci.c 2007-10-01 11:06:18.013479576 +0200
+++ bluez-libs-3.19/src/hci.c 2007-10-01 15:19:36.301988528 +0200
@@ -1010,6 +1010,8 @@
while (try--) {
evt_cmd_complete *cc;
evt_cmd_status *cs;
+ evt_remote_name_req_complete *rn;
+ remote_name_req_cp *cp;
if (to) {
struct pollfd p;
@@ -1074,6 +1076,21 @@
memcpy(r->rparam, ptr, r->rlen);
goto done;
+ case EVT_REMOTE_NAME_REQ_COMPLETE:
+
+ if (hdr->evt != r->event)
+ break;
+
+ r->rlen = MIN(len, r->rlen);
+ memcpy(r->rparam, ptr, r->rlen);
+
+ rn = r->rparam;
+ cp = r->cparam;
+
+ if (bacmp(&rn->bdaddr,&cp->bdaddr) == 0)
+ goto done;
+ continue;
+
default:
if (hdr->evt != r->event)
break;
[-- Attachment #3: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- 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
next prev parent reply other threads:[~2007-10-01 13:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-23 13:12 [Bluez-devel] Multiple Bluetooth Dongles Williams, Richard
2007-08-23 20:40 ` Jeffrey Cuenco
2007-08-24 12:13 ` Marcel Holtmann
2007-08-24 14:06 ` [Bluez-devel] multithreaded name resolution Matthias Becker
2007-08-24 12:14 ` Peter Wippich
2007-10-01 13:40 ` Andreas Gaufer [this message]
2007-10-01 14:12 ` [Bluez-devel] Patch mh3 Olivier Le Pogam
2007-10-01 14:14 ` Marcel Holtmann
2007-10-01 14:50 ` Olivier Le Pogam
2007-10-01 15:56 ` Marcel Holtmann
2007-10-01 16:55 ` Mats Erik Andersson
2007-10-11 11:10 ` [Bluez-devel] [PATCH]Re: multithreaded name resolution Matthias Becker
2007-08-24 12:14 ` [Bluez-devel] Multiple Bluetooth Dongles Marcel Holtmann
2007-08-24 14:08 ` Williams, Richard
2007-08-24 14:25 ` Marcel Holtmann
2007-08-24 15:06 ` Williams, Richard
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=20071001154023.53e57c49@localhost.localdomain \
--to=andreas.gaufer@bluecellnetworks.com \
--cc=bluez-devel@lists.sourceforge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox