Discussion Board
Bluetooth Name Request?
2005-01-31, 17:59
#1
Regular Contributor
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!
Super Contributor
well, you can know its name for example from previous discovery that you saved somewhere so you are not forced to discover it again..:-)
Re: Bluetooth Name Request?
2005-09-12, 02:48
#3
Registered User
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
Forum Rules