Go Back   TechArena Community > Technology > Technology & Internet
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , , ,

Sponsored Links



How to get MAC address of a WLAN device?

Technology & Internet


Reply
 
Thread Tools Search this Thread
  #1  
Old 28-01-2010
Member
 
Join Date: Jun 2009
Posts: 3,633
How to get MAC address of a WLAN device?

Hi
I use windows vista as operating system and I use Nokia N900, and in my phone I activated WiFi utility and in my home I use WLAN for connecting my computer and my laptop and also I use to connect my mobile phone also now I want to get the all the network information of my mobile like get MAC address of a WLAN device and also know the IP address of my mobile device, I don’t if it’s possible or not please give me suggestion for that.
Reply With Quote
  #2  
Old 28-01-2010
Jackson2's Avatar
Member
 
Join Date: Apr 2008
Posts: 2,268
Re: How to get MAC address of a WLAN device?

Hey I give you best solution for that because I also face this same query for that I search lots of site then I got following code I tried on network and it will properly work and give perfect response to me.

Quote:
#include <in_sock.h>
LIBRARY insock.lib

RServrsockt servrsockt;
User::LeaveIfError(servrsockt.Connect());
CleanupClosePushL(servrsockt);

// Open a soktserv
RSoktserv soktserv;
User::LeaveIfError(soktserv.Open (servrsockt,KAfInet,KSockStream,KProtocolInetTcp));
CleanupClosePushL(soktserv);

// Start enumerating the interfaces
TPckgBuf<Intrfcdetail> info;
soktserv.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl);
TBuf<32> macadres;

while(soktserv.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, info) == KErrNone)
{
if(info().iName.FindF(_L("Wlan")) == KErrNotFound)
continue;

macadres.Zero();
for(TUint i = sizeof(SSockAddr) ; i < sizeof(SSockAddr) + 6 ; i++)
if(i < (TUint)info().iHwAddr.Length())
macadres.AppendFormat(_L("%02X:"), info().iHwAddr[i] );

if(macadres.Length()) // remove trailing ':'
macadres.Delete(macadres.Length()-1, 1);
}
CleanupStack:opAndDestroy(2);
Reply With Quote
  #3  
Old 28-01-2010
johnson22's Avatar
Member
 
Join Date: May 2008
Posts: 2,107
Re: How to get MAC address of a WLAN device?

In Windows you get the winipcfg utility, using this utility you able to displays the computer's MAC address. And ipconfig utility will you can use in currently latest version of windows operating system. Using both 'winipcfg' and 'ipconfig' of windows utility may you able to display multiple MAC addresses for one computer. In windows at one computer you get only one MAC address which computer installed network card.
Reply With Quote
  #4  
Old 28-01-2010
Trio's Avatar
Member
 
Join Date: May 2008
Posts: 2,754
Re: How to get MAC address of a WLAN device?

you get the MAC address using IP address also for that you have to send one packet in the network with the help of IP address, if you want to know the MAC address of your WLAN then you have to know the IP address of receivers or those device which device you want to know the MAC address, for that you have to do one thing send broadcast the packet in network with receivers IP address, after some some time you get the response or you get the acknowledgment from this computer and with this acknowledgment you get the MAC address of this computer, use this solution and I sure this solution will definitely help you.
Reply With Quote
  #5  
Old 28-01-2010
deveritt's Avatar
Member
 
Join Date: Apr 2008
Posts: 2,525
Re: How to get MAC address of a WLAN device?

I think for knowing the MAC address of WLAN device then you have to take help of ipconfig, using this command line utility, this utility available on all versions of Microsoft Windows. This utility design for run on the Windows command prompt and using this utility you able to get the IP address information of a Windows computer and using IP address you easily find out the MAC address of you WLAN device. It also allows some control over active TCP/IP connections. ipconfig is an alternative to the older 'winipcfg' utility.
Reply With Quote
Reply

  TechArena Community > Technology > Technology & Internet


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to get MAC address of a WLAN device?"
Thread Thread Starter Forum Replies Last Post
Bypass Export address table Address Filter (EAF) Dwarner Software Development 4 25-12-2010 08:06 AM
how to disable usb device through mac address 8davidh Windows Server Help 1 18-10-2010 04:44 PM
device eth1 has different mac address than expected LinuxeD Operating Systems 3 07-08-2009 08:18 PM
How to ping a network device using mac address Pragnya Networking & Security 3 03-08-2009 11:35 AM
Download LanCalculator: To calculate the subnet, broadcast address, net address, net prefix .... monsitj Networking & Security 2 16-02-2009 08:06 PM


All times are GMT +5.5. The time now is 04:39 AM.