I have previously asked a few questions regarding more 'programmatic' inquiry into Bluetooth Device Inquiry (i.e. not using the User Interface provided by RNotifier) and have seen the example code and instructions regarding RHostResolver and I am very thankful for those pointers. However, I seem to be running into a small problem.
I start with the usual example code, for my test case:
hr.GetByAddress(addr, entry, status);
Then I successfully extract the devicename of the other BT device in my vicinity (I'm using the Emulator with BT card as the 'inquirer' and a Nokia 3650 as the other device). That is to say, the following code succeeds and properly prints the device's name.
if (status == KErrNone)
iEikonEnv->InfoMsg( deviceName );
However, I seem to be completely unable to extract the other device's Bluetooth Address. I am a bit unsure of where I should be looking? Do I extract the BT Address from the "entry" TNameEntry object like I have extracted the name? Would I do so in a fashion such as this:
TBTSockAddr testBTSockAddr = entry().iAddr;
I have tried that and it did not appear to succeed.
I suppose what I'm trying to ask is: after the proper completion of "RHostResolver::GetByAddress", while doing a Bluetooth Inquiry, where does the Bluetooth address of the remote device get placed and how do I properly extract it?
Many thanks in advance.