I am just struggeling to understand how I would get the card ID.
I can get some basic ipython3 terminal running and I can listen in a loop to get some card information:
Import librarys and setting up the reader:
import evdev
devices = [evdev.InputDevice(path) for path in evdev.list_devices()]
for device in devices:
... print(device.path, device.name, device.phys)
device = evdev.InputDevice('/dev/input/event0')
Looping until the card will be near the RFID reader:
for event in device.read_loop():
...: ... if event.type == evdev.ecodes.EV_KEY:
...: ... print(evdev.categorize(event))
...: ... # pressing 'a' and holding 'space'
Result when card is near the reader:
key event at 1553636173.066585, 11 (KEY_0), down
key event at 1553636173.074576, 11 (KEY_0), up
key event at 1553636173.082591, 11 (KEY_0), down
key event at 1553636173.090593, 11 (KEY_0), up
key event at 1553636173.090593, 2 (KEY_1), down
key event at 1553636173.098581, 2 (KEY_1), up
key event at 1553636173.106586, 2 (KEY_1), down
key event at 1553636173.114597, 2 (KEY_1), up
key event at 1553636173.114597, 4 (KEY_3), down
key event at 1553636173.122592, 4 (KEY_3), up
key event at 1553636173.122592, 5 (KEY_4), down
key event at 1553636173.130603, 5 (KEY_4), up
key event at 1553636173.130603, 4 (KEY_3), down
key event at 1553636173.138604, 4 (KEY_3), up
key event at 1553636173.138604, 11 (KEY_0), down
key event at 1553636173.146608, 11 (KEY_0), up
key event at 1553636173.146608, 7 (KEY_6), down
key event at 1553636173.154604, 7 (KEY_6), up
key event at 1553636173.154604, 4 (KEY_3), down
key event at 1553636173.162608, 4 (KEY_3), up
key event at 1553636173.162608, 28 (KEY_ENTER), down
key event at 1553636173.170609, 28 (KEY_ENTER), up
I am not sure how to convert that into the card ID.
I think I still do not understand the code in your repository.
EDIT:
Got it working.
Need to document this the next days!