Results 1 to 9 of 9

Thread: Windows phone 7:How to obtain the MAC address?

  1. #1
    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…

  2. #2
    Join Date
    Apr 2008
    Posts
    2,278

    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.

  3. #3
    Join Date
    May 2008
    Posts
    2,137

    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.

  4. #4
    Join Date
    May 2008
    Posts
    2,792

    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.

  5. #5
    Join Date
    Apr 2008
    Posts
    2,578

    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

  6. #6
    Join Date
    Oct 2005
    Posts
    2,358

    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

  7. #7
    Join Date
    Apr 2008
    Posts
    2,279

    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;
                }
            }
        }

  8. #8
    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

  9. #9
    Join Date
    Dec 2007
    Posts
    2,297

    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

Similar Threads

  1. Laptop will not obtain IP address
    By Raja-Ji in forum Networking & Security
    Replies: 4
    Last Post: 24-03-2010, 09:11 PM
  2. Error 651: Unable to obtain ip address
    By Wyvern in forum Networking & Security
    Replies: 5
    Last Post: 16-01-2010, 09:39 AM
  3. Solution for Windows Vista cannot obtain an IP address
    By monsitj in forum Tips & Tweaks
    Replies: 1
    Last Post: 06-03-2009, 07:56 PM
  4. Vista can not obtain an IP address
    By stinger in forum Networking & Security
    Replies: 3
    Last Post: 24-12-2008, 08:25 AM
  5. Windows Vista can not obtain an IP address
    By Nobleman in forum Networking & Security
    Replies: 5
    Last Post: 02-12-2008, 03:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •