Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the processor serial number of Raspberry PI 2 with Windows IOT

I need to get the processor serial number of a Raspberry Pi2 that is running windows 10 IoT.

like image 607
Juan Carlos Velez Avatar asked Nov 27 '15 15:11

Juan Carlos Velez


1 Answers

Usually this is within the Windows.System.Profile.HardwareIdentification namespace. Unfortunately, that's one of the unsupported namespaces with Win10 IoT Core.

Instead, to identify the metal, I'm using info from the network adaptor(s):

    public static HashSet<string> NetworkIds()
    {
        var result = new HashSet<string>();

        var networkProfiles = Windows.Networking.Connectivity.NetworkInformation.GetConnectionProfiles().ToList();

        foreach (var net in networkProfiles)
        {
            result.Add(net.NetworkAdapter.NetworkAdapterId.ToString());
        }

        return result;
    }

Of course, this is not completely error proof, but, so far, the only way I can see to get a reasonably reliable device ID.

like image 159
ObjectType Avatar answered Sep 26 '22 07:09

ObjectType