douli8040 2016-02-17 07:21
浏览 1351

如何使用golang获取USB设备的序列号?

How to get the serial Number of USB device with golang ?

Is there any example code ?

Anyone who know !

  • 写回答

2条回答 默认 最新

  • duanpao9781 2016-03-17 16:22
    关注

    You must use a wrapper of libusb in golang (an example is gousb). But this wrapper doesn't have the command in order to get the serial number. So you have to implement it. The command in libusb in order to do this is:

    C.libusb_get_string_descriptor_ascii
    
    评论

报告相同问题?

悬赏问题

  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖