From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Multithread Service Discovery
Date: Sun, 01 Apr 2007 09:01:55 +0200 [thread overview]
Message-ID: <1175410915.23136.64.camel@aeonflux.holtmann.net> (raw)
In-Reply-To: <BAY124-W139C835870F41AFA3D794AF0620@phx.gbl>
Hi Robert,
> I spent some time this afternoon playing around with multithreading an
> SDP enquiry, whilst i've almost got it working, when i use the loop to
> initiate the threads they all seem to get their arguments mixed up, so
> when i loop through the join i get the wrong details returned, they
> all list the same mac address but with different channels,
> unfortunately i'm away from my code at the moment so cant post any
> samples.
>
> Basically i'm trying to do a device discovery, and then SDP each of
> the devices to obtain the obex channel, which i can then use to push a
> file to, and i'm looking to have it do this as quickly as possible.
if you only have one Bluetooth adapter then you have to do SDP service
search for one device at a time. There is no other way. You can't do
this simultaneous. Period. And explained why.
> What would you recommend the best method for something like this? At
> the moment i'm using a C program, a large amount of the code from it
> is stripped out of an excellent article written by Albert Huang found
> here http://people.csail.mit.edu/albert/bluez-intro/c401.html.
>
> I note that a lot of people recently have been talking about the D-Bus
> API, is this something i should perhaps be using? does it suite my
> requirements?
The D-Bus API makes this a lot easier since it takes care of all the
stuff that otherwise you have to think about. For example the different
Bluetooth versions etc. You can also sort the device list after inquiry
via the RSSI to check the devices near by you first.
> I've looked through the API documentation and it appears to have some
> excellent functions, however as novice C programmer, I'm a little bit
> lost as to where i might start with integrating the API into my
> application.
The bluez-utils source package contains enough examples on how to use
D-Bus within C code. However it is faster to use it from within Python.
Regards
Marcel
-------------------------------------------------------------------------
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
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next prev parent reply other threads:[~2007-04-01 7:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-31 19:58 [Bluez-users] Multithread Service Discovery Robert Rawlins
2007-03-31 20:44 ` Loreno Oliveira
2007-04-01 7:01 ` Marcel Holtmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-01 14:00 Robert Rawlins
2007-04-01 10:25 Robert Rawlins
2007-04-01 12:58 ` Marcel Holtmann
2007-04-01 14:04 ` Malte Steiner
2007-03-30 19:33 Robert Rawlins
2007-03-30 19:45 ` Malte Steiner
2007-03-31 13:44 ` Marcel Holtmann
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=1175410915.23136.64.camel@aeonflux.holtmann.net \
--to=marcel@holtmann.org \
--cc=bluez-users@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