You Are Here:

Community: Developer Discussion Boards

#1 Old Any tips on implementing a system that alternates between discovery and advertising? - 2003-11-16, 18:21

Join Date: Jun 2003
Posts: 318
advocatee
Offline
Regular Contributor
Hi,

I read that you cannot discover and advertise from the same device at once, but you can take turns, perhaps advertising for a random period of time and doing a discovery in between advertising.

Does anyone have tips on how to implement that? Timers? Anything?

- aDvo -
Reply With Quote

#2 Old 2003-11-17, 09:59

Join Date: Mar 2003
Posts: 27
stevecotton
Offline
Registered User
Just put an advert in the SDP database, leave it there until your app exits, and do occasional discovery.

The problem isn't that you can't advertise and discover. The problem is (roughly) that while you are making an outbound connection for the discovery, the phone will not accept an inbound connection from another device trying to read the SDP database.
Reply With Quote

#3 Old 2003-11-17, 15:10

Join Date: Nov 2003
Posts: 50
ThreeSixFiveOh
Offline
Regular Contributor
Hi steve,

I wish to ask 2 questions based on what u said...

You said:
"while you are making an outbound connection for the discovery, the phone will not accept an inbound connection from another device trying to read the SDP database"

1) Does this mean that i do not even have to set the following to deny inbound connections, when doing a discovery?:

iSdpDatabase.UpdateAttributeL(iRecord, KSdpAttrIdServiceAvailability, state); //state is =0x00, deny inbound connections

What i mean is, does the phone automatically become deaf to other phones when it is speaking(discovery),
or do i have to explicitly update its service record availability to become not available as shown in the code above?

2) Suppose i'm advertising, and i wish to perform my periodic discovery,. Do i have to first do anything to the service record, or close the sdp database session, or anything? Or do i straightaway do a discovery leaving the SDP DB as it is, that is, still advertising?

Sorry for the long questions, just wanted to make things as clear as possible =)

Thanks steve
Last edited by ThreeSixFiveOh : 2003-11-17 at 15:18.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia