×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    3

    SdpAgent in console application

    All,

    I have a problem with my Bt service discovery running in a console application.
    • Aim:
      I want to check in a list of Bt devices, if a device offers a PanU, PanGn or PanNap service.
    • My way:
      i have a methode
      Code:
      DiscoverServiceOnDeviceL(TBtDeviceData)
      . In this methode i first do a reset on the
      Code:
      CSdpSearchPattern
      and cancel the
      Code:
      CSdpAgent
      if their were in use and delete both objects. Afterwards i create a new instance of both initialise the
      Code:
      CSdpSearchPattern
      and start my service discovery by calling
      Code:
      CSdpAgent::NextRecordRequestL()
      .

      in my
      Code:
      NextRecordRequestComplete
      1. i check first if the record is done with
        Code:
        (aError == KErrEof)
        . In case true, i call my
        Code:
        TRAP(aError, DiscoverServiceOnDeviceL(iBtDeviceData)
        again to proceed with the next device, if there is any left. If all devices done i reset my
        Code:
        CSdpSearchPattern
        and call my
        Code:
        TRAP(aError, DiscoverServiceOnDeviceL(iBtDeviceData)
        again, if there are any more services to check. If
        Code:
        (aError == KErrEof)
        equals false i do nothing.
      2. second i catch other errors with
        Code:
        (aError != KErrNone)
        . In case true i do a return after reporting the error.
      3. Last i request the attributes if
        Code:
        aTotalRecordsCount
        is greater then zero.

    • My problem:
      i don't return to the callee when i recall my.
      Code:
      TRAP(aError, DiscoverServiceOnDeviceL(iBtDeviceData)
      That means my application works fine if i only have one device and one service to check. Otherwise i get my report promt but the application is blocked.
    • My assumption:
      is that i don't deal correctly with the active schedular or cleanupstack. Unfortunately i'm not very familiar with both. And all my trials to solve the problem were ineffective.


    ___
    Kind regards

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    London
    Posts
    41

    Re: SdpAgent in console application

    In your RunL, you need to re-issue the asynchronous request and SetActive() all over again in order to get another result, otherwise you'll be waiting some time.

Similar Threads

  1. Replies: 2
    Last Post: 2013-02-19, 10:37
  2. How to autostart console application in Symabian?
    By rohanwaugh in forum Symbian
    Replies: 25
    Last Post: 2009-03-25, 07:46
  3. Cannot run console application on S60 3rd gen (nokia 6110 navigator)
    By mcbure in forum Series 40 & S60 Platform Feedback Archive
    Replies: 2
    Last Post: 2008-07-14, 19:01
  4. Please help.. regarding simple hellotext console application
    By sajidraheemsheikh in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-03-05, 17:02
  5. Replies: 3
    Last Post: 2006-08-17, 10:48

Posting Permissions

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