Device's MAC Address
| Sat, 2004-08-21 09:18 | |
|
Hello ! I know how to extract the MAC (Ethernet) Address of Bluetooth devices, but what about the MAC Address of my smartphone ? How can I found out the MAC Address of my mobile phone ? I need this because I need a unique identifier that will be avalaible on BT and Smartphones. The MAC Address would be the only solution, getting IMEI is not enough because not available on BT Devices. Can I extract the MAC Address using the etel libs ? If yes how, because I really have no id how it could work Thx a lot for your advices ! MatD:-) MatD |
|






Forum posts: 25
Forum posts: 93
Yes I read your post before posting this one. But unfortunately I can't get the Mac Address of my Smartphone, i face the same problem as you. By the way, if you have managed to get other digits than 00 00 00 00 it'll be nice if you could post a code snippet.
I've also read thread : http://forum.newlc.com/viewtopic.php?t=1768 but couldn't retrieve the Mac Address
It seems like the way to get the Mac Address of a symbian smartphone is a real mystery. Why
Thx for your help and explanations !
MatD:-)
MatD
Forum posts: 25
The only way to find out the address of my phone was from a remote device.
Forum posts: 93
I've finally found it out how to get the MAC Address on your device. It works fine and goes like this :
aSocketServer.Connect();
RSocket socket;
User::LeaveIfError(socket.Open(aSocketServer,_L("L2CAP")));
TPckgBuf<TBTDevAddr> devAddr;
TRequestStatus stat;
socket.Ioctl(KHCILocalAddressIoctl, stat, &devAddr, KSolBtHCI);
User::WaitForRequest(stat);
if(stat == KErrNone) {
TBTDevAddr localAddr=devAddr();
TBuf<1024> btAddr;
for(int i=0;i<localAddr.Des().Length();i++)
{
btAddr.AppendNumFixedWidth(localAddr[i],EHex,2);
}
// Outputs MAC Address
User::InfoPrint(btAddr);
}
else
{
User::InfoPrint(_L("Error :-( "));
}
socket.Close();
aSocketServer.Close();
You must use the HCI Commands
MatD:-)
MatD
Forum posts: 53
Forum posts: 214
RSocketServ socketserver;
RSocket ioctrlsocket;
User::LeaveIfError(socketserver.Connect());
User::LeaveIfError(ioctrlsocket.Open(socketserver, KServerIoCtrl));
TPckgBuf<TBTDevAddr> addr;
TRequestStatus status;
ioctrlsocket.Ioctl( KHCILocalAddressIoctl, status, &addr, KSolBtHCI);
User::WaitForRequest(status);
//status=-5
ioctrlsocket.Close();
socketserver.Close();
"I only know that I know nothing." (Socrates)
Forum posts: 3
Hi,
I am trying to get MAC(Media Access Control ) address of a mobile connected in Bluetooth network programmatically through C#.I am using Visual Studio 2005. Please help me. Thanks in advance.
Jayanth
Forum posts: 3
Hi All,
I am trying to get MAC(Media Access Control ) address of a mobile connected in Bluetooth network programmatically through C#.I am using Visual Studio 2005.
if u find anything just send me a mail to . it's very urgent. please help me.
Thanks in advance.
Jayanth
Forum posts: 695
See my reply to your duplicate post in this thread: http://www.newlc.com/forum/how-find-mac-address-mobile-device