简体   繁体   中英

Permanently write SerialNumber to USB HID Device

I bought two very cheap RFID-Readers from China (model 8H10D-1 ). I am using node to access them, since they register as a USB HID Device and node offers a great library called node-hid . Unfortunately these readers do not have their serial number set. I can read the product and vendor id to distinguish whether it is my reader, but I can't distinguish between these two readers. Therefore I wondered whether it is possible to permanently write an own serial number to these devices. The node-hid library provides a method device.write([0x00, 0x01, 0x01, 0x05, 0xff, 0xff]); but i don't think this will help me out, does it ?

Does anyone please can give me advice if it is even possible to permanently set the serial number ? Or does anyone has another idea to identify the readers by anything else ?

This is the output I'm getting from the library when listing all readers:

[ 
  { vendorId: 5050,
    productId: 24,
    path: 'USB_13ba_0018_4100000',
    serialNumber: '',
    manufacturer: '',
    product: 'Barcode Reader',
    release: 1,
    interface: -1,
    usagePage: 1,
    usage: 6 },

  { vendorId: 5050,
    productId: 24,
    path: 'USB_13ba_0018_6200000',
    serialNumber: '',
    manufacturer: '',
    product: 'Barcode Reader',
    release: 1,
    interface: -1,
    usagePage: 1,
    usage: 6 } ]

Thanks in advance.

Unless the vendor has a way to rewrite the flash for the chip that is enumerating the USB device you don't have a way to do this. Sometimes vendors provide ways to customize the devices, but not in end products usually, as this is something that should be done on their production line.

The only other way I could see to distinguish is by plugging them in to a specific serial port and finding the device that way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM