From: chris c. <cl...@gm...> - 2024-05-07 13:59:52
|
TL;DR I would recommend AGAINST using pyusb for HID use cases, if you are on Linux instead use udev. If you need to know the device that was used to read, I would create a virtual device id if you really want to read directly from pyusb.. BUT I would recommend against it. I've not had to deal with this as I only use one device per USB host. Take a look at: * https://github.com/clach04/keyboard2mqtt - recommended approach, NOTE doesn't have great user-facing documentation but the code should be easy to read * https://github.com/clach04/pyusb-keyboard-alike - hitting USB directly On Tue, May 7, 2024 at 2:44 AM Charles Harris <cha...@sl...> wrote: > Hi > > There are many USB rfid devices to read tags. They all have identical > vid and pid, and no device ID. > > When using hid into a spreadsheet some form of ID needs to be given for > each device so that spreadsheet can manipulate data into areas etc. > > https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst > > This link refers to multiple usb with same pid vid. Also refers to > options 'bus' and 'address' that could enable ID. > > Is there any tutorials or advice on simply how to use one or both of > these to attach Device ID to the tag read being processed to the > spreadsheet. Suffix or prefix or in a adjacent column. > > With the usb rfid reader connected to pc or spreadsheet, is it possible > to access preferences or whatever on device and process a pyusb code to > allow and set change on the usb device itself, for the bus or address > from 'none' to a reference. Each device would be > different.https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst > > A standard procedure to do this would be very useful . I am noobie to > python etc and would need guidance. > > Thankyou > > Charles Harris > > NZ > > > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |