HomeiOS Developmentflutter - NFC ISO-DEP hold alive packets on the iOS

flutter – NFC ISO-DEP hold alive packets on the iOS


I did a easy Android and iOS software primarily based on nfc-manager flutter plugin. And attempting to ship and obtain APDU packets utilizing ISO-DEP tag. I’ve seen that Android routinely points empty isodep keepalive packets:

NFCRX: b2 67 c7 - obtained by the tag. Right here b2 is the message and 67c7 is the CRC
NFCTX: a3 - transmitted by the tag (the crc will not be included)
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3
NFCRX: b2 67 c7
NFCTX: a3

These packets could be despatched infinitely by Android. But when I take advantage of the identical software on the IOS there aren’t any hold alive packets and really quickly my tag disconnects due to the timeout.
Is there any risk to allow the keepalive packets on the IOS ?

My code is:

    if (Platform.isIOS)
    {
      NfcManager.occasion.startSession(
            alertMessage: alertMessage,
            onDiscovered: (NfcTag tag) async {
                   
                     tech = Iso7816.from(tag);
                     if (tech is Iso7816) {
                            attempt{
                                  //ship a check APDU message
                                  Uint8List packet = Uint8List.fromList([0x00, 0xD0, 0x00 , 0x00, 0x02, 0x31, 0x00]);
                                  closing resp = await Iso7816.from(tag)?.sendCommandRaw(packet);

                                  //utilizing the delay to examine if there would be the keepalive packets
                                  await Future.delayed(const Period(seconds: 5), () {}); 
                                  String resps = resp.toString();
                             }
                             on PlatformException catch (err) {} 
                             catch (err) {}
                     }
              }
      );
    }

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments