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

Sponsored Links



Windows phone 7:How to obtain the MAC address?

Networking & Security


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-10-2010
Member
 
Join Date: Sep 2010
Posts: 47
Windows phone 7:How to obtain the MAC address?
  

I am having a Windows 7 phone with the all running features with the proper functionality. The wireless technology is also working fine. Now I would line is there any way to obtain the MAC ID of the windows 7 phone, which is I mainly used for the wireless access. The wifi connectivity is fine in the device. I am using the IEEE 802.11 wifi connectivity in my windows mobile. I know that in the Windows Mobile 6.0 the wifi MAC is can easily obtained but in the windows 7 phone, I don’t know. I information on the topic will be appreciated…

Reply With Quote
  #2  
Old 27-10-2010
Member
 
Join Date: Apr 2008
Posts: 2,279
Re: Windows phone 7:How to obtain the MAC address?

I suggest you on the individual basis of the access of the wireless connectivity. Recommend you to generate the GUID in the connection and store it in the isolated storage location of the device. I totally got the result by the GUID in my windows 7 phone and this is works fine to detect me the MAC ID of the device from where I tried to access the wireless connection. The GUID will not require the log-in access of the connection. Try to work with this in appoint, you will definitely got the feedback of the service that I mentioned. It will ask you for the access period of the wireless connection through the MAC address of the device. The developer also recommend this one for the obtaining the MAC address s of the windows mobile whatever the operating system.
Reply With Quote
  #3  
Old 27-10-2010
Member
 
Join Date: May 2008
Posts: 2,131
Re: Windows phone 7:How to obtain the MAC address?

It is basically very easy to recognize the MAC address of the device (Windows 7 phone). However the windows 7 phone will not give you the access of the MAC address in a very easy way. I am using the Linksys router for the wireless connectivity in the computer, and think that the structure is same as in the windows 7 mobile also. You first use the LAN connectivity of the device and log on to the router or the device page that you are using with the wireless facility. Go to the Administrator page of the device where you can found the setting for the wireless connection of the device or the router. One thing is important if you are trying to access the MAC code of the device through the computer them suggest you disable the MAC filter of the router. Save the setting in the router or the device (windows 7 phone). Now turn on the wireless connection of the windows 7 phone directly with the router by the help of your password, I hope you now able to make the connection. try this one it will work in the windows phone 7 as well as the computer.
Reply With Quote
  #4  
Old 27-10-2010
Member
 
Join Date: May 2008
Posts: 2,785
Re: Windows phone 7:How to obtain the MAC address?

I suggest you to the simple solution to obtain the MAC address. Go to the LOG of the router or the device and then click on the VIEW LOG file of the device under the wireless connection. a list will appear in the window scroll down the list to look for the option DHCP CLIENT LOG, this option is present in both the computer and the window 7 phone. This is the Mac address of the device or the computer; it contains 12 digit format of the number. If your MAC filter is turned off then turn on it after fetching the MAC address of the windows 7 phone. Connect the wireless network and access the facility. This can also done by some of the third party software, but the problem is that the windows 7 phone will not allow you to download the software from the computer, also some of the software are not support in the windows phone.7.
Reply With Quote
  #5  
Old 27-10-2010
Member
 
Join Date: Apr 2008
Posts: 2,566
Re: Windows phone 7:How to obtain the MAC address?

I used a VB script in my windows 7 phone to recognized the MAC address of the device. Recommend you to go through the script. It will help you to obtain the MAC address while you using the wireless connection. But the script that I mentioned I used it in the windows mobile with the Silverlight application, so I am not confused whether it works in the Windows 7 phone. I think that this is not the proper solution to detect the MAC address; try to ignore this, because some of the script are make some problem in the portable device.
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select MACAddress from Win32_NetworkAdapter where DeviceID=1")
For Each objItem in colItems
    Wscript.Echo "MAC Address: " & objItem.MACAddress
Reply With Quote
  #6  
Old 27-10-2010
Member
 
Join Date: Oct 2005
Posts: 2,355
Re: Windows phone 7:How to obtain the MAC address?

Any windows phone application supports the device extended properties, which is used for the determining the information about the system hardware and it also used for the tracking the wireless connectivity in the device. Some of the script with the code for the Get Value command will use to fetch the information. As per my suggest to get the MAC address of the windows 7 phone, you should try this one with the extended properties of the device. A class is requiring for the script to recognize the information or the ID of the device. The class inside the script also requires the device information capability. This means while the user make some operation on the device like the installation of any application or regarding your post access the wireless connectivity must make sure that to where to use the service of the device of the desire place. By the device extended properties you can able to get the device any part information in the external or the internal.
__________________
I'm the Proud Owner of the most dangerous weapon
known to man kind: Human Brain
Reply With Quote
  #7  
Old 27-10-2010
Member
 
Join Date: Apr 2008
Posts: 2,277
Re: Windows phone 7:How to obtain the MAC address?

Try with the script it will monitor the MAC address of the device. It will also helpful for the computer MAC address.
Code:
public partial class MainPage : PhoneApplicationPage
    {
        DispatcherTimer timer;

        // Constructor
        public MainPage()
        {
            InitializewirelessMACComponent();
            timer = new DispatcherTimer();
            timer.Interval = new TimeSpan(0,0,10);
            timer.Tick += new EventHandler(timer_Tick);
            timer.Start();
        }

        void timer_Tick(object sender, EventArgs e)
        {
            try
            {
                // These are TextBlock controls that are created in the page’s XAML file      
                MemoryTextBlock.Text = DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage").ToString();
                PeakMemoryTextBlock.Text = DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage").ToString();
            }
            catch (Exception ex)
            {
                MemoryTextBlock.Text = ex.Message;
            }
        }
    }
Reply With Quote
  #8  
Old 15-10-2012
Member
 
Join Date: Oct 2012
Posts: 1
ThumbsUp Re: Windows phone 7:How to obtain the MAC address?

Quote:
Originally Posted by deveritt View Post
I used a VB script in my windows 7 phone to recognized the MAC address of the device. Recommend you to go through the script. It will help you to obtain the MAC address while you using the wireless connection. But the script that I mentioned I used it in the windows mobile with the Silverlight application, so I am not confused whether it works in the Windows 7 phone. I think that this is not the proper solution to detect the MAC address; try to ignore this, because some of the script are make some problem in the portable device.
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select MACAddress from Win32_NetworkAdapter where DeviceID=1")
For Each objItem in colItems
    Wscript.Echo "MAC Address: " & objItem.MACAddress
Reply : Hi is this code to get MAC address on Windows Phone and is this code in vb , because i need the same code in C# , its not working for me , please i need your help... Thank You in advance
Reply With Quote
  #9  
Old 15-10-2012
Member
 
Join Date: Dec 2007
Posts: 2,260
Re: Windows phone 7:How to obtain the MAC address?

Quote:
Originally Posted by Nidhi Singh View Post
Reply : Hi is this code to get MAC address on Windows Phone and is this code in vb , because i need the same code in C# , its not working for me , please i need your help... Thank You in advance
Have you checked the MSDN pages on this subject, not covering all of them but at least some which may be helpful for you:

http://msdn.microsoft.com/en-us/libr...=VS.92%29.aspx

http://msdn.microsoft.com/en-us/libr...=VS.92%29.aspx
Reply With Quote
Reply

  TechArena Community > Technology > Networking & Security
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Windows phone 7:How to obtain the MAC address?"
Thread Thread Starter Forum Replies Last Post
Laptop will not obtain IP address Raja-Ji Networking & Security 4 24-03-2010 09:11 PM
Error 651: Unable to obtain ip address Wyvern Networking & Security 5 16-01-2010 09:39 AM
Solution for Windows Vista cannot obtain an IP address monsitj Tips & Tweaks 1 06-03-2009 07:56 PM
Vista can not obtain an IP address stinger Networking & Security 3 24-12-2008 08:25 AM
Windows Vista can not obtain an IP address Nobleman Networking & Security 5 02-12-2008 03:58 PM


All times are GMT +5.5. The time now is 03:55 PM.