rmnscnce / NfcNci_Patience

Add a 1000ms delay to NFC presence check to accommodate longer NFC smart card operations in AOSP NfcNci implementation on certain devices
https://github.com/Xposed-Modules-Repo/id.my.pjm.toys.nfcnci_patience
Apache License 2.0
3 stars 0 forks source link

Increase timeout length / UI #1

Closed StarGate01 closed 2 months ago

StarGate01 commented 2 months ago

First of all, thank you a lot for this module!

Most apps I tested work great with the default 1000 ms, i.e. the German eID AusweisApp2, Fidesmo, and a FIDO test app.

However, the TK App (German health insurance) https://play.google.com/store/apps/details?id=de.tk.tkapp does authentication for a secured storage (eGK electronic health record) using the eGK smart card (electronic medical data card). Authentication only very rarely succeeds when using a 1000ms timeout, I suppose it needs perfect electromagnetic alignment / coupling to achieve a stable communication without too many repeated NFC data frames. Maybe the smart card chip is just slow.

When the timeout is increased to 5000 ms, the authentication succeeds almost every time. 5000 ms is also the maximum cf FWTmax in ISO14443-4 , so I think that is a reasonable maximum. Increasing the timeout to such a high value might come with some downsides though, for example making scans more sluggish.

What do you think about adding a simple config UI to the module, allowing the user to specify the timeout (ranging e.g. from 125 ms to 5000 ms) ?

rmnscnce commented 2 months ago

The new interface to configure the module will be included in the version 0.2.0 release (which should happen soon — and by soon I mean within hours from now)

Expand to see screenshots ![image](https://github.com/user-attachments/assets/c05cfa0b-2aa0-482c-b79c-99b1b1f90574) ![image](https://github.com/user-attachments/assets/825308ed-5d5c-41e6-b572-4e4866d08fb3)
rmnscnce commented 2 months ago

Did a test release, let me know what you think: https://github.com/Xposed-Modules-Repo/id.my.pjm.toys.nfcnci_patience/releases/tag/4-0.2.0-beta0

StarGate01 commented 2 months ago

Thank you for the quick patch! The UI works as intended, the value is correctly applied. I have not noticed any issues.

rmnscnce commented 2 months ago

So, does the de.tk.tkapp work now?

StarGate01 commented 2 months ago

Yes, that works now, I just set the timeout to 5000 ms using your UI. The test I did yesterday was done by building a custom version of your module and changing the value in the source code.