nfc-reader
nfc-reader copied to clipboard
No Errors will Not Read or Right
Hi, The library connects fine no issues. But it will not read or write. When i read i get "0"
var t = NFC.ReadBlock("0");
i am using the ACR122
Thank You Gary
Please state your OS version and similar specs to clarify the issue. Also, did you try to start your app in administrator mode?
Hey man this library is great, but I'm having issues reading the blocks this I'm getting a byte like this: byte[2] [0]99 [1]0 my conversion from byte to sting is: "c\0" My os is windows 10, I'm forcing the application to run as admin and this is the NFC model acr1255u-j1 any suggestios why I'm getting only that? this is my code: public void read_sector(string sector) {
NFCReader NFC = new NFCReader();
try
{
if (NFC.Connect())
{
//Autorizamos el sector
Boolean autorizacion = NFC.AuthBlock(sector); //returns boolean
//Leemos el sector
byte[] resultadodelsector = NFC.ReadBlock(sector);
string result2 = BytesToStringConverted(resultadodelsector);
//string resultadodelsector = Encoding.UTF8.GetString(NFC.ReadBlock(sector));
Console.WriteLine(result2);
}
else {
MessageBox.Show("Falle al realizar la conexion");
}
}
catch (Exception e)
{
MessageBox.Show("Falle al leer el sector 2: "+ e.Message.ToString());
}
}
99 00 means OK in NFC language
thanks for the response but I'm still not getting any text from the block I checked the manual documentation: https://www.manualslib.com/manual/1436214/Acs-Acr1255u-J1.html?page=55#manual 6.5.3 and I try to adjust the code to this specifications changing the CLA, INS,P1 and LE Debugging the application the authorization looks good I get a 90h 00h response that looks on this documentation that is okay https://www.manualslib.com/manual/1436214/Acs-Acr1255u-J1.html?page=58#manual but when I try to read I get the 63h 00h code that looks meaning the operation is failed. I get that info from SendAPDUandDisplay method. Any suggestion?