Vasilis Argyros
Vasilis Argyros

Reputation: 1

Flutter NFC pass data to RFID Reader

I am developing an app in Flutter that is using NFC to read RFID Cards ( ISO 14443 ) and stores the identifier.

Then i need to communicate with an RFID Reader using NFC in order to send this identifier to it. The Reader supports NFC and is accepting 7 bytes.

So far i have tried emulating the card on my device ( HCE ) using the nfc_host_card_emulation package but i am unable to establish communication with the Reader.

Could anyone provide any insight on what i'm missing? would it be the same to try and test it using 2 devices, pretend that my second device in an RFID Reader?

Below is the code i use to emulate the card. The id in the code is the same id i would receive from the RFID Card which gets recognized by the Reader.

String uid = '04E03BD2F37380';

  await NfcHce.init(
          aid: Uint8List.fromList([0xA0, 0x00, 0xDA, 0xDA, 0xDA, 0xDA, 0xDA]),
          permanentApduResponses: false,
          listenOnlyConfiguredPorts: false,
        );


        NfcHce.stream.listen((command) async {
          await NfcHce.addApduResponse(0, uid.codeUnits);
        });

Upvotes: 0

Views: 64

Answers (0)

Related Questions