PyRfid¶
Python 2 and 3 library for 125kHz RFID readers with EM4100 protocol.
API Documentation¶
PyRfid Copyright (C) 2015 Philipp Meisberger <team@pm-codeworks.de> All rights reserved.
-
class
pyrfid.pyrfid.
PyRfid
(port='/dev/ttyUSB0', baudRate=9600)¶ Manages 125kHz RFID readers.
Constructor for creating a PyRfid instance.
Parameters: - port (str) – The port to use
- baudRate (int) – The baud-rate to use
-
rawTag
¶ Gets the raw tag in hex format “1A2B345C67” without checksum.
Returns: The raw tag (10 bytes)
-
readTag
()¶ Reads the complete tag.
Returns: True if successful or False otherwise. Raises: Exception
– if any error occurs
-
tagChecksum
¶ Gets the checksum of read tag (last 2 bytes).
Returns: The checksum
-
tagId
¶ Gets the tag ID in decimal format, e.g. “0001234567”.
Returns: The ID
-
tagIdFloat
¶ Gets the tag ID in float format, e.g. “123,45678”.
Returns: The ID
-
tagType
¶ Gets the type of read tag in hex format (first 4 bytes).
Returns: The tag type
-
tagTypeFloat
¶ Gets the float type of read tag in hex format (first 2 bytes).
Returns: The tag type