All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Multithread Service Discovery
@ 2007-03-30 19:33 Robert Rawlins
  2007-03-30 19:45 ` Malte Steiner
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Rawlins @ 2007-03-30 19:33 UTC (permalink / raw)
  To: bluez-users


[-- Attachment #1.1: Type: text/plain, Size: 825 bytes --]

Hello Chaps,
 
I'm currently running a C program for service discovery on a list of devices. The function loops through the list elements and performs an SDP enquiry on each device and returns the results to the screen, but I'm finding that if i get a slow device in the list it can hold things up a little, and in general it would be fantastic to hit all the devices with an enquiry simultaneously.
 
What's the best method for multithreading this procedure to perform a discovery on several devices at once?, is this even possible? I'd appreciate any suggestions of tales of previous experiences,
 
Thanks again,
 
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted

[-- Attachment #1.2: Type: text/html, Size: 1020 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 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-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [Bluez-users] Multithread Service Discovery
@ 2007-03-31 19:58 Robert Rawlins
  2007-03-31 20:44 ` Loreno Oliveira
  2007-04-01  7:01 ` Marcel Holtmann
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Rawlins @ 2007-03-31 19:58 UTC (permalink / raw)
  To: bluez-users


[-- Attachment #1.1: Type: text/plain, Size: 1600 bytes --]

Hello Guys,
 
Thank you both for your replies, this is interesting stuff.
 
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.
 
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?
 
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.
 
Thanks again for any help guys,
 
Rob
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted

[-- Attachment #1.2: Type: text/html, Size: 1923 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 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-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [Bluez-users] Multithread Service Discovery
@ 2007-04-01 10:25 Robert Rawlins
  2007-04-01 12:58 ` Marcel Holtmann
  2007-04-01 14:04 ` Malte Steiner
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Rawlins @ 2007-04-01 10:25 UTC (permalink / raw)
  To: bluez-users


[-- Attachment #1.1: Type: text/plain, Size: 1467 bytes --]

Hi Guys,
 
Thanks again for your help, I'm glad that i now know simultaneous service requests is -not- an option, which means that my current solution isn't so bad. At the moment i run an HCI enquiry and then loop through the results, SDP each device for the obex channel and initiate a push to them. The speed is pretty good, we just have the problem that if we've got a slow 1.1 device in range, they can hold up the queue a couple of seconds.
 
Basically i'm looking to build a small application which distributes calendar information to people as they walk past my clients pub. But as people are walking past it is important that we discover the device and its services as quickly as possible, so they dont walk out of range before we get chance to push the file to them.
 
Have any of you had experience of working with this before? or have any advice on it?
 
With regards to pushing a file to them, is ObexObjectPush my best option? or is ObexFTP replacing this now?
 
Using python wont be an issue, I find that most of these top level languages are very similar so learning the syntax for python wont be an issue, its just a case of finding some good examples to look it.
 
Thanks again for your help guys, i look forward to hearing from you.
 
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted

[-- Attachment #1.2: Type: text/html, Size: 1701 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 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-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [Bluez-users] Multithread Service Discovery
@ 2007-04-01 14:00 Robert Rawlins
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Rawlins @ 2007-04-01 14:00 UTC (permalink / raw)
  To: bluez-users


[-- Attachment #1.1: Type: text/plain, Size: 2202 bytes --]

Thanks for the advice Marcel, It'll prove invaluable i'm sure.
 
2 Dongles makes good sense, so i'll defiantly work with that arrangement to get things working fluidly. Is a single dongle able to handle a device enquiry and an SDP at the same time? or is that asking too much? I'm just trying to find the limitations of the hardware, just so i know what to expect as top performance.
 
>> Modify the page timeout and link supervision timeout to faster>> detect page failures and disconnected links.
 
I've seen you speak about this before and sounds like its a good way of managing the resources and speeding up the process. Could you explain a little more about modifying those page and link supervision time outs? is this something i do with my code or an alteration i need to make to the bluez stack? and are there any negative effects to making a change like this?
 
>> No. OBEX Push is for pushing files and OBEX FTP is for FTP like access>> to a file storage.
 
This is as i expected it would be, that's absolutely fine, i will continue to use our own USSP-Push like tool for doing the obex push, unless you have any other recommendations on doing this.
>> The inquiry and service discovery is kinda simple via D-Bus and Python.>> For pushing the actual file, we don't have a real Python binding.
 
I'll agree that the Python and D-Bus certainly appears simpler on the face of things, from the samples i've seen, many written by yourself, the code certainly seems less complex that the alternative C methods. Do i need to look into PyBluez to use the python d-bus method, or is the PyBluez wrapper something else all together?
 
I've noticed while reading through the API documentation is lists a function for 'periodic' enquiry, is this something i should be looking to use in my application? my guess is that its a 'yes' and this function just repeatedly looks for devices in range?
Thanks again for all your help Marcel, and thanks to you other guys for your suggestions.
 
Rob
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted

[-- Attachment #1.2: Type: text/html, Size: 2518 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 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-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-04-01 14:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-30 19:33 [Bluez-users] Multithread Service Discovery Robert Rawlins
2007-03-30 19:45 ` Malte Steiner
2007-03-31 13:44   ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2007-03-31 19:58 Robert Rawlins
2007-03-31 20:44 ` Loreno Oliveira
2007-04-01  7:01 ` Marcel Holtmann
2007-04-01 10:25 Robert Rawlins
2007-04-01 12:58 ` Marcel Holtmann
2007-04-01 14:04 ` Malte Steiner
2007-04-01 14:00 Robert Rawlins

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.