×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    12

    Question How To Incorporate A Wait Note With A BlueTooth Service Discovery?

    I'm writing a C++ code that displays a wait note while performing bluetooth device discovery and then service discovery for each discovered device. I used RHostResolver to do the device discovery. The wait note is working just fine with the device discovery that is because I used the sync version of RHostResolver::GetByAddress() & RHostResolver::Next() (Remember that wait note functionality is async.) so there is no conflect between wait note operation & device discovery.

    Now when it comes to the service discovery, it's a completely different situation. The CSdpAgent::NextRecordRequestL() does not have a sync version, instead it performs only async operation and when it's done it calls back the MSdpAgentNotifier::NextRecordRequestComplete(). The problem is that as long as the wait note is running, the MSdpAgentNotifier::NextRecordRequestComplete() will never be scheduled for execution.

    I searched the forums and the SDK documentation, the only thing realted that I found was this line from the documentation of CSdpAgent class:

    Note that queries are asynchronous, although this is hidden in the API. The implication is that the interface functions that receive responses are only called when the thread's active scheduler can schedule handling of the completion of the query.

    I'm not sure of what exactly that means in my situation so to sum up I have this very simple question:

    IS IT POSSIBLE TO USE WAIT NOTE AND SERVICE DISCOVERY TOGETHER (i.e. TO DISPLAY THE WAIT NOTE WHILE PERFORMING THE SERVICE DISCOVERY) ?

    And if the answer is YES, then how ?

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    England,UK
    Posts
    1,600

    Re: How To Incorporate A Wait Note With A BlueTooth Service Discovery?

    Hi,
    The answer in Java is to thread it by making the MIDP runnable and multi-threadable. Therefore it follows that you create a new thread to run the wait message.
    The threading in symbian is given in documentation at

    Introduction to threads and processes

    If I ever get a S60 series phone I will be trying some code like this the examples and documentation on bluetooth seem very interesting.
    See Bluetooth services
    http://www.symbian.com/developer/tec...oth/index.html

    Jim

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    12

    Re: How To Incorporate A Wait Note With A BlueTooth Service Discovery?

    Thank you jim, I was hoping that there would be some solution without using multithreading since multithreading is always not recommended in the symbian OS. Anyhow I guess that there is now way to put the wait note & the service discovery functionalties in one thread. What a big limitation hah!

Similar Threads

  1. Bluetooth service discovery???
    By leomil in forum Bluetooth Technology
    Replies: 1
    Last Post: 2006-10-26, 01:35
  2. Bluetooth service discovery NextRecordRequestComplete error
    By hclemson in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-07-18, 14:33
  3. java bluetooth service discovery with 6600
    By jdevmo in forum Bluetooth Technology
    Replies: 7
    Last Post: 2006-05-26, 16:08
  4. 6680 and bluetooth service profiles
    By ceruault in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-10-08, 22:24
  5. Service Discovery
    By jimdeal in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-09-25, 09:41

Posting Permissions

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