获取硬件唯一ID [英] Get hardware unique ID

查看:164
本文介绍了获取硬件唯一ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



目前,我正在开发一个简单的程序,需要我获取设备ID以匹配INI的设置(匹配在开放端口成功后可以继续初始化之前匹配ID。



是否可以打开端口并从硬件中获取唯一ID,如条形码,现金接收器,自动提款机或任何其他通过串口运行的硬件,没有任何驱动程序来操作模块,只需通过comport进行操作?现在我想从串口检索硬件ID。可能吗?如果我的问题不明确,请原谅我,因为我非常渴望知道这是一个解决这个问题的方法。我需要你们的帮助。请指教

Hi all,

At current time, I'm developing a simple program which need me to get the device ID to match with the settings from INI (match to match ID) before it can continue to initialize after open port success.

Is it possible to open port and get the unique ID from the hardware such as barcode, cash acceptor,cash dispenser or any other hardware that run by serial port which not have any driver to operate the module and just write through the comport to operate? Right now I want to retrieve hardware ID from serial port. Is it possible? If my question is not clear, pardon me as I'm very desperate to know either the is a way for this issue. I need a help from you guys. Please advise

推荐答案

串行只是一种与设备交换字节数据的方式,它不像USB那样设备在连接之前与主机交换硬件描述符。最重要的是,您列出的设备没有标准接口可以从中获取硬件ID,它们必须是逐个制造商,逐个制造商,甚至可能是逐个模型基础。



总而言之,除非串行设备有某种命令,否则无法从串行设备获得唯一的硬件ID发送给它一个。此时,每个制造商都做了不同的事情,因此您必须考虑代码中的所有不同类型。
Serial is just a way of exchanging byte data with a device, its not really like USB where the device exchanges hardware descriptors with the host before it "connects". On top of that, there are no standard interfaces for the devices you listed to get a hardware id from them, they would have to be on a case-by-case, manufacturer-by-manufacturer, and possibly even model-by-model basis.

So pretty much summing it up, there is no way to get a unique hardware ID from the serial device unless the serial device has some kind of command you can send to it to get one. At that point each manufacturer does it different so you'll have to account for all the different types in code.


这篇关于获取硬件唯一ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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