How can i get the name incoming device

Login to reply to this topic.
Mon, 2007-10-15 06:55
Joined: 2007-04-19
Forum posts: 5

hi
my question is that i advertise my server, but i can't get the name device connecting to me?

thanks in advance!

ws07


Mon, 2007-10-15 13:50
Joined: 2006-09-15
Forum posts: 26
Re: How can i get the name incoming device

Hi i m not getting ur problem ..
can you explain it.. please.


Ruchi.

Mon, 2007-10-15 15:39
Joined: 2007-04-19
Forum posts: 5
Re: How can i get the name incoming device

OK

It is that i don't know how to get the name incoming device, after a remote device connect me and i accept it.
i can only use
TSockAddr tSockAddr;
iSock.RemoteName(tSockAddr);
TBTDevAddr tBTDevAddr = static_cast(tSockAddr).BTAddr();
to get the address.
but how can i get the name with any class and method??

thanks for u reply

Thu, 2007-10-18 11:49
Joined: 2006-09-15
Forum posts: 26
Re: How can i get the name incoming device

Please check the RServiceResolver API. It may help you.


Ruchi.

Fri, 2007-10-19 02:18
Joined: 2007-04-19
Forum posts: 5
Re: How can i get the name incoming device

thanks at first

the class RServiceResolver is "Provides an interface to resolver service names and ports."

but my question is that how to get the client's (master) name which connected to the server (slave)??

what will i do??

ws07

Sat, 2007-10-20 10:51
Joined: 2006-09-15
Forum posts: 26
Re: How can i get the name incoming device

If you are looking for which device(mobile Model) is connected to system then must be this link helps you.

http://www.newlc.com/How-to-identify-a-mobile-at.html


Ruchi.

Mon, 2007-10-22 02:54
Joined: 2007-04-19
Forum posts: 5
Re: How can i get the name incoming device

I am very sorry that i didnt express my meaning very well.
my meaning is that : supposing there several user and their bluetooth's name of mobile device is u1, u2, u3. etc. and u1 is server(slave) and the others are client (master), then u1 advertise its server and the other's connect to u1. i want to get use2, use3......'s name (u2, u3....), but i don't know how to do it.

i expect you help.

and i thank your reply very much , i have learned a lot about the devices.

thank u.

ws07

Wed, 2007-10-31 23:18
Joined: 2007-10-31
Forum posts: 1
Re: How can i get the name incoming device

Atleast I could get a connected device name like this:
TInquirySockAddr inqAddr;
inqAddr.SetIAC(KGIAC /*KLIAC*/);
inqAddr.SetAction(KHostResInquiry | KHostResName | KHostResIgnoreCache);
RSocketServ ss;
ss.Connect();
TProtocolDesc pInfo;
ss.FindProtocol(_L("BTLinkManager"), pInfo);
RHostResolver hr;
hr.Open(ss,pInfo.iAddrFamily,pInfo.iProtocol);
TNameRecord nameEntry;
TNameEntry namebuffer(nameEntry);
TInt error = hr.GetByAddress(inqAddr, namebuffer );
if ( error != KErrNone ) {
// error handling here if needed
return;
}
aName.Copy(namebuffer().iName);
hr.Close();
ss.Close();

In which the aName is TDes& type of argument to the function in which this code is located. This is the bt server side code as requested.

This example was partly taken from forum Nokia page here http://discussion.forum.nokia.com/forum/showthread.php?t=24873

--
Petech

Thu, 2007-11-01 16:16
Joined: 2007-04-19
Forum posts: 5
Re: How can i get the name incoming device

Thank u very much.
i have been gloomy for it.
i will try it . Eye-wink

  • Login to reply to this topic.