i am trying to get tag id from usb rfid readers. But the problem is two of them has same vendor id and device id.
I am getting tagid from one of them by using pyusb.
is it possible to change vendor or device id? or any other solution.

Best regards

this is the device, every specifications are same. we have to handle it in python scriptok. I found the solution.DougieLawson wrote:Is there anything in the USB device profile that uniquely identifies each device (apart from the bus ID which can change on the next reboot).
Code: Select all
from evdev import InputDevice, list_devices, categorize, ecodes
from select import select
import urllib2
import serial
port = serial.Serial("/dev/ttyUSB0", baudrate=9600)
devices= map(InputDevice,('/dev/input/event0', '/dev/input/event1'))
devices = {dev.fd: dev for dev in devices}
numarag = ""
while True:
r, w, x = select(devices,[],[])
for fd in r:
for event in devices[fd].read():
if event.type == ecodes.EV_KEY:
keybrd = categorize(event)
if keybrd.keystate == keybrd.key_down:
g = keybrd.keycode
numg = g.split("_")
rakamg = numg[1]
if rakamg == "ENTER":
if str(r) == "[5]":
kartg = "G-"+numarag+"#"
print kartg
response = urllib2.urlopen('http://localhost/adminturnike/turnike.php?kart='+kartg+'')
html = response.read()
print html
if html=='a' or html=='1':
port.write(html)
kartg = ""
numarag = ""
elif str(r) == "[4]":
kartc ="C-"+numarag+"#"
print kartc
response = urllib2.urlopen('http://localhost/adminturnike/turnike.php?kart='+kartc+'')
html = response.read()
print html
if html=='a' or html=='1':
port.write(html)
kartc = ""
numarag = ""
else:
numarag = numarag + rakamg.strip()