okadan / nfc-manager

A Flutter app for accessing the NFC features on Android and iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

io_exception, Transceive failed,

RookieHands opened this issue · comments

Is there no MifareClassic.connect() method?

MifareClassic? mifareClassic = MifareClassic.from(tag);
if (mifareClassic == null) {
print('Tag is not MifareClassic.');
return;
}
Uint8List uint8list = Uint8List.fromList([0x81, 0xE6, 0x33, 0x0D, 0xEE, 0x4F]);
bool oneAuth = await mifareClassic.authenticateSectorWithKeyA(
sectorIndex: 1, key: uint8list);
if (oneAuth) {
Uint8List oneBlockData = await mifareClassic.readBlock(blockIndex: 1);
String oneData = String.fromCharCodes(oneBlockData);
}