×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jan 2005
    Location
    France, Paris
    Posts
    56

    Bluetooth Name Request?

    Hello everyone.
    It's my first post, I'm new to symbian and bluetooth (I've just started some days ago...) and my problem is not as easy as it may seem.

    What are the means to get a remote device name, without doing a device discovery, just knowing a bluetooth address?

    I'd just like to know if it's possible in symbian.
    I read it's possible to connect directly to a bluetooth device, without a device discovery, but how to get its name then?

    All ideas are welcome, thanks a lot!

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    well, you can know its name for example from previous discovery that you saved somewhere so you are not forced to discover it again..:-)

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    37

    Re: Bluetooth Name Request?

    But what about filtering phonecell from an incoming

    bluetooth connection?

    I don't know how to catch the remote device's address

    and name, because I don;t use the

    TBTDeviceResponseParamsPckg package, right?

    I use this :
    =========================
    User::LeaveIfError(iSocketServer.Connect());
    TInt result = iListeningSocket.Open(iSocketServer,

    KServerTransportName);
    if (result != KErrNone)
    {
    iSocketServer.Close();
    User::Leave(result);
    }

    // Get a channel to listen on - same as the

    socket's port number
    TInt channel;
    User::LeaveIfError(


    iListeningSocket.GetOpt(KRFCOMMGetAvailableServerChann

    el, KSolBtRFCOMM, channel)
    );

    TBTSockAddr listeningAddress;
    listeningAddress.SetPort(channel);
    iLog.LogL(_L("Get port = "), channel);



    User::LeaveIfError(iListeningSocket.Bind(listeningAddr

    ess));


    User::LeaveIfError(iListeningSocket.Listen(KListeningQ

    ueSize));

    iAcceptedSocket.Close(); // close old

    connection - if any


    User::LeaveIfError(iAcceptedSocket.Open(iSocketServer)

    ); // Open abstract socket

    iState = EConnecting;
    iListeningSocket.Accept(iAcceptedSocket, iStatus);
    SetActive();

    iLog.LogL(_L("Accept next connection"));

    SetSecurityOnChannelL(EFalse, EFalse, ETrue,

    channel);

    iAdvertiser->StartAdvertisingL(channel);
    iAdvertiser->UpdateAvailabilityL(ETrue);

    ================================

    So, the remote device's data should be in

    iAcceptedSocket (RSocket), but I don't know how to get

    the name and address

    Please somebody help me

    Regards,

    Irma

Posting Permissions

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