NFC Tag Connection has only 20 seconds timeout.

We're trying to communicate with Tangem cards (https://tangem.com) that contains ISO7816 Tag via NFC.

We open session:


readerSession = NFCTagReaderSession(pollingOption: [.iso14443], delegate: self, queue: nil)

readerSession?.begin()


Bring our card to iPhone NFC Reader and connect to a tag


session.connect(to: tags.first!)


and start sending APDU commands one by one.

But after about 20 seconds CoreNFC session sends us the error:


Error Domain=NFCError

Code=100 "Tag connection lost"

UserInfo={NSLocalizedDescription=Tag connection lost}


or, if there was no active command at that moment:


Error Domain=NFCError

Code=201 "Session timeout"

UserInfo={NSLocalizedDescription=Session timeout}


We have to send plenty of commands within one session. It is needed to secure Tangem clients from malefactors that can read data without user's knowledge and approval. Session with the card can last more than 30 seconds. And we can't invalidate session and start another one, because after it we have to start sending commands from the very beginning.


We would be much appreciated, if someone tell how to increase the timeout of communication with connected tag.


Thank you in advance.

Hi do you solved this problem?

@Beelzebub33 . Did you resolve this issue ?

Hi, did anyone manage to find a solution to this problem?

NFCError Code=201

We have the same problem downloading data from a wearable medical device, data is transferring just fine, but it always gets this error after about 20 seconds of data transfers. Code=100 "Tag connection lost"

Did anyone ever find a solution?Or is this an undocumented limit?

NFC Tag Connection has only 20 seconds timeout.
 
 
Q