2008-02-13 16:25:14

by Robert Rawlins

[permalink] [raw]
Subject: [Bluez-devel] Asynchronous SDP With DBUS API

Hello List,

I've been playing around with the DBUS API over the past week or two and notice a large number of the methods implemented are asynchronous and send back signals when results from them are returned, however, this doesn't appear to be the case with an SDP enquiry placed through the service which appears to run synchronously.

What's the reason behind this? are we not able to have it emit a signal such as 'serviceFound()' or something to that effect? is this down to a limitation of the hardware? the stack? or am I just coding against the API incorrectly?

Has anyone been able to find an Asynchronous implementation for SDP enquiries? even if its some form of threaded work around.

Thanks for any advice you can offer.

Robert
_________________________________________________________________
Free games, great prizes - get gaming at Gamesbox.
http://www.searchgamesbox.com


Attachments:
(No filename) (228.00 B)
(No filename) (164.00 B)
Download all attachments

2008-02-13 16:58:28

by Robert Rawlins

[permalink] [raw]
Subject: Re: [Bluez-devel] Asynchronous SDP With DBUS API

Hi Marcel,

> Hi Robert,> > > I've been playing around with the DBUS API over the past week or two> > and notice a large number of the methods implemented are asynchronous> > and send back signals when results from them are returned, however,> > this doesn't appear to be the case with an SDP enquiry placed through> > the service which appears to run synchronously.> > > > What's the reason behind this? are we not able to have it emit a> > signal such as 'serviceFound()' or something to that effect? is this> > down to a limitation of the hardware? the stack? or am I just coding> > against the API incorrectly?> > > > Has anyone been able to find an Asynchronous implementation for SDP> > enquiries? even if its some form of threaded work around.> > actually D-Bus method calls are always asynchronous.> > Regards> > Marcel
Ok, I see.

Well, perhaps you can help me on an issue I've been having. At the moment I find myself having two problems, firstly, it appears that whenever I perform an SDP within the application on an adapter which is in the middle of an enquiry, the enquiry is terminated, is this usual behaviour? Should I perhaps be looking at using the periodic discovery (which i note is listed as non blocking) and then terminate it once I've acquired the devices I require?

The reason I'm after asynchronous behaviour in my SDP enquiry is that at present, if I have a device in the office such as one of the girls down at reception who is a long distance away then they're phone takes a long time to reply to an sdp request, resulting in the rest of my application having to wait upon its response and unable to do anything else like running SDP's on other devices. In an ideal world the application would continue through its processes able to perform service enquires on another device or two.

What would you suggest as the best way to implement that behaviour?

Thanks for your time Marcel,

Robert
_________________________________________________________________
Telly addicts unite!
http://www.searchgamesbox.com/tvtown.shtml


Attachments:
(No filename) (228.00 B)
(No filename) (164.00 B)
Download all attachments

2008-02-13 16:30:28

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Asynchronous SDP With DBUS API

Hi Robert,

> I've been playing around with the DBUS API over the past week or two
> and notice a large number of the methods implemented are asynchronous
> and send back signals when results from them are returned, however,
> this doesn't appear to be the case with an SDP enquiry placed through
> the service which appears to run synchronously.
>
> What's the reason behind this? are we not able to have it emit a
> signal such as 'serviceFound()' or something to that effect? is this
> down to a limitation of the hardware? the stack? or am I just coding
> against the API incorrectly?
>
> Has anyone been able to find an Asynchronous implementation for SDP
> enquiries? even if its some form of threaded work around.

actually D-Bus method calls are always asynchronous.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel