[英]how to get a secure unique identifier from multiple pieces of hardware using python?
Say I have a hundred(possibility thousands) of connected raspberry pi and these pi will emit a message though tcpip to a mongo data base when they get online. 假设我有数百个(可能是数千个)已连接的树莓派pi,这些pi上线时将通过tcpip向mongo数据库发出一条消息。 This message will be a unique id that will register the device inside of mongodb.
该消息将是一个唯一的ID,它将在mongodb中注册设备。
Question: is there a unique number that is secure that I can just emit to a database as a unique id or will there have to be some kind of back and forth? 问题:是否有一个唯一的编号可以安全地将其作为唯一的ID散发到数据库中,还是必须进行某种来回的转换?
To identify the PI(s), I'd use/send the serial number(s) ( cat /proc/cpuinfo
) . 为了标识PI,我将使用/发送序列号(
cat /proc/cpuinfo
) 。 It's used to make money, so the manufacturer won't tolerate duplicates. 它曾经用来赚钱,所以制造商不会容忍重复的商品。
See "Getting Your Raspberry Pi Serial Number Using Python" for Python and further background. 有关Python和更多背景知识,请参见“使用Python获取Raspberry Pi序列号” 。
The MAC address identifies a component that could change (eg WiFi dongle). MAC地址标识可能更改的组件(例如,WiFi加密狗)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.