EMVCo removal procedure with nxp reader library

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EMVCo removal procedure with nxp reader library

792 Views
joshcollins
Contributor II

I am using the NXP reader library (version 05.16.00) to communicate with a PN5180 front end. I am trying to implement EMVCo card removal.This is quite easy to achieve through the discovery loop layer:

phacDiscLoop_SetConfig(sDiscLoop, PHAC_DISCLOOP_CONFIG_NEXT_POLL_STATE, PHAC_DISCLOOP_POLL_STATE_REMOVAL);
phacDiscLoop_Run(sDiscLoop, PHAC_DISCLOOP_ENTRY_POINT_POLL);


However this command will block until the card is removed (the code reaches the while loop starting on line phacDiscLoop_Sw_Int.c:443). Our host processor is running a bare board application (no threading support) which means that the system will freeze until the card is removed and this while loop terminates. This is not acceptable for our application for a number of reasons. I am wondering if anyone can suggest a way of achieving this removal in a non-blocking manner. For example I could keep calling phacDiscLoop_Run which would return an error if the card is still in the field and success if it is removed. Would such a design be possible based on the EMVCo standard? Ideally I would like to do so without modifying the reader library source code to make updates in the future as simple as possible.

Currently my thoughts are to make my own version of phacDiscLoop_Sw_Int_EmvcoRemovalProcedure that does not block and then call this instead of phacDiscLoop_Run but if anyone can suggest a simpler way that does not have to bypass the discovery loop layer that would be a preferable solution.

Best Regards,

Josh

Labels (1)
0 Kudos
Reply
0 Replies