The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is used to store the user consent for the cookies in the category "Other. The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Using this technology to make purchases gives you the ability to complete transactions within seconds. Status = MIFAREReader.MFRC522_Auth(MIFAREReader.Necessary cookies are absolutely essential for the website to function properly. RFID technology allows you to simply tap or wave your credit card near a card reader or ATM. # This is the default key for authentication Print 'tag hex string concatenated:', tag_str ![]() ![]() Tag_str = str(hex(uid)), str(hex(uid)), str(hex(uid)), str(hex(uid)) Tag_hex = hex(uid), hex(uid), hex(uid), hex(uid) Print "tag UID: %s,%s,%s,%s" % (uid, uid, uid, uid) (status,uid) = MIFAREReader.MFRC522_Anticoll() (status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL) While int((datetime.now()-refTime).seconds) < 5: Global value_rfid_2, reply_rfid_2, tag, refTime Therefore I modified the Read.py tag UID reading script which comes with the library's files, to convert the output in decimal like I wanted to: 86 209 188 187 -> 56 D1 BC BB -> 3149713750 The output using the MFRC522-python library is correct but flipped around and not in a proper numeric format: BB BC D1 56 = 187 188 209 86 While the output UID of the GIGATEK MF7 reader of the same tag is: hex: BBBCD156 The output UID using this library for the tag I have is: Card read UID: 86,209,188,187 I have tried a different approach following the instructions at .uk/2018/02/rc522-rfid-tag-read-raspberry-pi using the library /mxgxw/MFRC522-python. The output of the RC522 reader for the same TAG is: Hold a tag near the reader The output of the USB reader is in HEX and DEC numerical format: rfid_read.py -> rfid reader on port /dev/ttyUSB1 I found some info about the libraries on these pages /mxgxw/MFRC522-python, /pimylifeup/MFRC522-python but could not decipher the data structure of the output block and I would really appreciate some help on this matter.Īs suggested below are the two outputs and the SPI status. ![]() I can determine the length and numeric format of the string coming out of the SERIAL reader but I can not do it for RC522. To read from the RC522 i use the code below: reader = SimpleMFRC522() Rfid_port_1.flushInput() # Clear input buffer While int((datetime.now()-refTime).seconds) 0): Print 'rfid_read.py -> rfid reader on port', rfid_port_1.name Rfid_port_1 = serial.Serial("/dev/ttyUSB1", 9600) # omit if not in use ![]() # open the serial port /dev/ttyUSB1 and check if the port is really open My script reads the 12 char string from a serial port and extracts the UID reply_rfid_1 from it: #!/usr/bin/env python2Ĭonvenient python function to read RFID tags with GIGATEK MF7 I know the data structure (Serial ASCII) and baud Rate: 9600,N,8,1, to read from the Gigatek - link. Both readers work and read tags but their output strings are different for the same tag. The RC522 is wired correctly following the instructions found on /raspberry-pi-rfid-rc522. One reader is an USB SERIAL hex Gigatek MF7 (connected to a serial port) and the other is the RFID-RC522 (connected to GPIO pins). I have a RPi2 (Python 2.7) with two RFID readers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |