wiegand

Python reading Wiegand dropping Zeros

你说的曾经没有我的故事 提交于 2019-12-12 03:22:43
问题 Here's the code snippet from my RFID wiegand reader on my Raspberry Pi I use already. def main(): set_procname("Wiegand Reader") global bits global timeout GPIO.add_event_detect(D0, GPIO.FALLING, callback=one) GPIO.add_event_detect(D1, GPIO.FALLING, callback=zero) GPIO.add_event_detect(S1, GPIO.FALLING, callback=unlockDoor) while 1: if bits: timeout = timeout -1 time.sleep(0.001) if len(bits) > 1 and timeout == 0: #print "Binary:", int(str(bits),2) c1 = int(str(bits),2) result = ((~c1) >> 1)

Wiegand RFID reader VS USB RFID reader Raspberry PI

╄→гoц情女王★ 提交于 2019-12-06 14:41:02
问题 I have two Raspberry Pis running python code to retrieve the serial number of an RFID tag. One has an RFID reader with a Wiegand interface hooked to GPIO pins and other has an RFID reader that behaves like a keyboard connected over USB. However, I get different numbers from the two reader when scanning the same RFID tag. For example, for one tag, I get 57924897 from the Raspberry Pi with the Wiegand reader and 0004591983 from the Raspberry Pi with the USB keyboard reader. Can sombody explain