使用VB通用应用程序获取覆盆子pi的macaddress或唯一ID [英] Get macaddress or unique id for raspberry pi using VB universal application

查看:140
本文介绍了使用VB通用应用程序获取覆盆子pi的macaddress或唯一ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题如何从我的Raspberry pi中获取任何唯一ID或Mac地址?

使用Windows通用应用程序平台Vb.net(Visual Basic)



任何人都可以提供帮助?



我尝试过的事情:



i have a Question how to get any unique id or Mac address from my Raspberry pi ?
Am using Windows Universal Application Platform Vb.net (Visual Basic )

anyone can help ?

What I have tried:

 Dim deviceinfo = New EasClientDeviceInformation
Debug.WriteLine(deviceinfo.id)





但这不是唯一的



but this is not unique

推荐答案

MAC地址不是唯一标识符。 MAC地址规范只是说在网络适配器连接的段上id必须是唯一的。它不是一个全球唯一的ID。



最好的方法是从服务器端代码为设备分配一个唯一的ID,例如作为GUID或加密哈希值。基本上,当您的设备进入网络并与您的服务器通信时,如果它没有id值,它会向服务器询问一个。一旦建立了id,就可以使用该id值完成所有进一步的通信以识别设备。
A MAC address is not a unique identifier. The specification for MAC addresses just says that the id must be unique on the segment the network adapter is connected to. It is not a globally unique id.

The best way to go about something like this is to assign a unique id to the device from your server-side code, such as a GUID or a cryptographic hash value. Basically, when your device gets on the network and talks to your server, if it doesn't have an id value, it asks the server for one. Once the id is established all further communication can be done using that id value to identify the device.


这篇关于使用VB通用应用程序获取覆盆子pi的macaddress或唯一ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆