T tzfpg Active Member Licensed User Longtime User May 30, 2017 #1 Hi, I have a Mifare card with authenticate key protect. When I read card, I facing the problem of MFRC522 Authenticate Key fail. Below is my code: Code: Copy If rfid1.IsMifare Then Dim authenticate_key() As Byte = JoinBytes(Array(Array As Byte(0x8D,0x6E,0x14,0xB5,0xEC,0xA6))) If rfid1.MifareAuthenticate2(1,authenticate_key,True) = False Then Log("Failed to authenticate") Return End If End If Error Log: Code: Copy Failed to authenticate Please help me. Thank you.
Hi, I have a Mifare card with authenticate key protect. When I read card, I facing the problem of MFRC522 Authenticate Key fail. Below is my code: Code: Copy If rfid1.IsMifare Then Dim authenticate_key() As Byte = JoinBytes(Array(Array As Byte(0x8D,0x6E,0x14,0xB5,0xEC,0xA6))) If rfid1.MifareAuthenticate2(1,authenticate_key,True) = False Then Log("Failed to authenticate") Return End If End If Error Log: Code: Copy Failed to authenticate Please help me. Thank you.
Erel B4X founder Staff member Licensed User Longtime User May 30, 2017 #2 Why are you using JoinBytes here? It should be: Code: Copy Dim authenticate_key() As Byte = Array As Byte(0x8D,0x6E,0x14,0xB5,0xEC,0xA6) Are you sure that the key is correct? Upvote 0
Why are you using JoinBytes here? It should be: Code: Copy Dim authenticate_key() As Byte = Array As Byte(0x8D,0x6E,0x14,0xB5,0xEC,0xA6) Are you sure that the key is correct?