Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve remote-reader #187

Merged
merged 3 commits into from
Feb 25, 2021

Conversation

ph4r05
Copy link
Contributor

@ph4r05 ph4r05 commented Feb 7, 2021

Several improvements to the remote-reader Android app:

  • Refactoring to new Android API (29), bump library versions, Gradle version, use AndroidX classes (removal of deprecated support lib)
  • I've added more delay values to the preferences. In my scenario I have card operations that can take longer than 4 seconds (e.g., applet installation can take 6 seconds in my case).
  • Listener / reversed mode added

Listener mode

The app now supports Listener mode as VICC supports.

  • If enabled, ServerSocket start listening on a VPCD port
  • Worker then waits on accept() for a client to connect (accept is timeouted to 1s and repeats with checking for cancellation)
  • Once client connects, flow works as with connection mode
  • When client disconnects, streams and client socket is closed and worker waits for another connection

I find especially useful that it a smartcard app can open card connection multiple times without need to re-tap card to the phone. I can then run all integration tests with my card tapped to the phone without touching anything.

With original approach when app connects to the VPCD, the card has to be tapped each time VPCD connects.
We are using remote-reader without VPCD, the VPCD endpoint is added as another card connector to our application. Thus separate invocations require more taps.

This PR is a draft, if you want me to change something before merge, hit me up (assuming you are interested in the merge).

Thanks


May be interesting: I am using this with my personal project https://github.com/ph4r05/remote-card, it contains GlobalPlatformPro wrapper with software-enabled support for VICC (so no vpcd driver install is required). It is possible to manage applets via this GP wrapper over Android remote-reader.

Copy link
Owner

@frankmorgner frankmorgner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, that you found the project helpful. Your changes look good.

I hope the new packages (repositories) are accepted on F-Droid...

remote-reader/app/src/main/res/xml/settings.xml Outdated Show resolved Hide resolved
@ph4r05
Copy link
Contributor Author

ph4r05 commented Feb 8, 2021

@frankmorgner I've reverted the default value setting. I forgot to remove it from the PR previously, it was mainly for my personal usage. Now it makes more sense.

Ad F-Droid - hmm I haven't thought about that. Hopefully it works. Should there be a problem I can address that.

Thanks for the review!

@frankmorgner frankmorgner merged commit 1eaf5a1 into frankmorgner:master Feb 25, 2021
bowb pushed a commit to bowb/vsmartcard that referenced this pull request Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants