Closed ItAndrea closed 4 months ago
First I wanted to thank you, for posting a script to read the TID. (UHFTag_MemoryDataRead.py)(https://github.com/sbcshop/UHF_Lite_HAT_Software/blob/main/Examples/UHFTag_MemoryDataRead.py) I ran it, this came out, but it's not the TID of the tag, the TID should be this: E2801170200004CE73970956
Did you change the Memory_bank value, 2 is needed for TID read operation.
Good morning everyone, I'm trying to read the TID of my RFID tag, but with the command you recommended, I keep receiving None as a response. Where am I doing wrong? This is my python script
` import time import sys import serial sys.path.append("..") from Library import uhf import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) port = '/dev/ttyS0' baudrate = 115200
GPIO.setup(7,GPIO.OUT)
GPIO.output(7,GPIO.LOW)# Enable the module
EPC_SELECT_CMD = '0C001301000000206000' TID_READ_CMD = '390009000000000' MEMORY_BANK_TID = '02' DATA_LENGTH = '00000008' START_CMD = 'BB00'
reader = uhf.UHF(port,baudrate)
def calculate_checksum(data):
Calcola il checksum
SELECT TAG FOR EPC
epc_value = '805197454469600000000000' checksum = EPC_SELECT_CMD + epc_value print (checksum) res_checksum = calculate_checksum(checksum) print(res_checksum) checksum_str = str(res_checksum) print (checksum_str) select_tag_command= EPC_SELECT_CMD + epc_value + checksum_str + '7E' reader.send_command(select_tag_command)
Again calculation of checksum only required if you change data length.
checksum = TID_READ_CMD + MEMORY_BANK_TID + DATA_LENGTH
res_checksum = calculate_checksum(checksum)
print(res_checksum)
tid_read_command = START_CMD + TID_READ_CMD + MEMORY_BANK_TID + DATA_LENGTH + res_checksum + '7E' print(tid_read_command) ris_tid = reader.send_command(tid_read_command) print (ris_tid)