×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    4

    Question How can I know bluetooth activity?

    Hi to all,
    My question is if there are ANY API to know if bluetooh is activated AND it has any activity (send/receive data).

    I found this code from Symbian Place:

    -----------------------------------------------------
    //Define buffer for the number of connected devices
    TPckgBuf<TInt> theDevNo;

    // Get the number of ACL links
    TInt err = iSocket.GetOpt(KLMGetACLLinkCount, KSolBtLM, theDevNo);
    ------------------------------------------------------

    but is only for Symbian 7.0 or higher, and I need an N-Gage solution!!!!

    Please, help!!

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    11
    I would also like to know, how I can prompt the user
    that BT is not activated on the mobile device
    and whether the program can switch it on.

    I have seen a notifier with the following text:
    "Bluetooth is currently switched off. Switch on?" "yes, no"

    Thanks

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    14

    BT activation programatically

    did you find any answer to your question.

    I am just trying to do the same

    1- find out if BT is activated
    2 - prompt the user if he wants to activate BT
    3 - activate BT

  4. #4
    Registered User
    Join Date
    Oct 2004
    Posts
    4
    Yes, finally, i found it:

    ----------------------------------------------------------
    Q1.- Is Bluetooth active and in use?
    ----------------------------------------------------------

    I used the following code for Symbian 7:

    //Define buffer for the number of connected devices
    TPckgBuf<TInt> theDevNo;

    // Get the number of ACL links
    TInt err = iSocket.GetOpt(KLMGetACLLinkCount, KSolBtLM, theDevNo);

    I tested the code over Symbian 6.1(N-Gage), and works ok! (symbian backported,it's common)

    ----------------------------------------------------------
    Q2,3. Prompt and activate?
    ----------------------------------------------------------
    You must call RNotifier with KPowerModeSettingNotifierUid flag:

    #define KPowerModeSettingNotifierUid 0x100059E2

    It will show the question: Turn on bluetooth? to the user, and activate it (if the user select yes).


    Hope it helps you.

  5. #5
    Registered User
    Join Date
    May 2003
    Posts
    14
    thank you for your answer.
    That helps.

  6. #6
    Registered User
    Join Date
    May 2003
    Posts
    14
    by the way is there a list somewhere of the notifierUid developer can use ?

  7. #7
    Registered User
    Join Date
    May 2003
    Posts
    14
    other question : is there a way to turn it off ?

  8. #8
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    For getting various notifications you can use RSystemAgent class. Some of the constant you can use there are in sacls.h, but unfortunately not all....:-(

    I'm sure that for example IrDA is present, but I'm not sure about BT...

    How to use this stuff is shown for example here:

    http://kuca.webzdarma.cz/index.php3?...n&co=t7headmon

  9. #9
    Registered User
    Join Date
    May 2003
    Posts
    14
    thanks a lot guys.

  10. #10
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: How can I know bluetooth activity?

    In this example...

    //Define buffer for the number of connected devices
    TPckgBuf<TInt> theDevNo;

    // Get the number of ACL links
    TInt err = iSocket.GetOpt(KLMGetACLLinkCount, KSolBtLM, theDevNo);


    Do i need to Connect the iSocket before using it..as my program leaves on the line :-

    TInt err = iSocket.GetOpt(KLMGetACLLinkCount, KSolBtLM, theDevNo);


    Whats wrong in it..i am trying to get it working on Series60 3rd Edition.

    Cheers
    mayank

Posting Permissions

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