如何唯一识别USB设备? [英] How do I uniquely identify an USB-device?

查看:342
本文介绍了如何唯一识别USB设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何获取USB存储设备的唯一ID. 我已经知道如何从这篇文章中获取SCSI序列号: USB驱动器序列linux C ++下的数字 该帖子提到使用设备描述符获取ID.有人可以发布一些代码来确定Linux下的设备描述符信息吗?

I was wondering how to get the unique id of a USB storage device. I already know how to fetch the SCSI serial id from this post : USB-drive serial number under linux C++ The post mentions using the Device Descriptor to get the ID. Can someone post some code to determine the Device Descriptor information under Linux?

推荐答案

我建议使用 libusb .您可以在此处找到文档.

I suggest to use libusb. You can find the documentation here.

这篇关于如何唯一识别USB设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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