How to identify UNIQUELY a USB Device?

扶醉桌前 提交于 2019-12-02 23:09:12

The closest equivalent of a "unique number" available in any USB device is the VID and PID, the vendor and product IDs. It is used to identify the device and install the proper driver for it. However, it is the same set of numbers for the same product, it is not good enough to identify the particular device you have in your hand. And thus useless to implement a license verification procedure, presumably what you are after.

Only certain kind of USB devices implement a serial number. You get it by accident from a flash drive due to the drive formatter generating a volume serial number. Useless as well, it can easily be changed. A USB wifi adapter could work, the manufacturer must generate a unique MAC address.

There's one class of USB devices that are perfect for this goal. The generic name is "dongle", they are made for this. When you buy one you also get software that you can link into your program that provides a tamper-proof way to verify the license number, another important part of a license verification procedure and usually the weak link. More about dongles in this Wikipedia article.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!