Are CRLC663 and Android HCE incompatible?

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

Are CRLC663 and Android HCE incompatible?

1,285 Views
massimiliano_gi
Contributor I

Hello everybody,

I have a NXP CRLC663 based board that merely opens a lock by means of a NFC card. Now I'm requested to write an Android application which emulates an NFC card to use it as it was a card. I studied all Android background on this matter (Host-based card emulation overview  |  Android Developers ) and found that Android can support only ISO7816-4 protocol. So, on Android side there seems to be not so much to do. On NXP side there is really a lot of stuff on the table, but nothing seems to fit the Android requirements. I found this post about CRLC663 and Android (https://community.nxp.com/message/1112824 ) but at the end it comes that CRLC663 doesn't support (Android) HCE.

Did anybody tried and succeeded in making Android and CRLC663 work together? Has anybody some sample code to start from? It seems that it would be enough selecting the card with ISO Select and then transmitting and receiving APDUs, but the difficult point is to set up the library and to get the right APIs to do the job.

Thank you for every advice.

-- 

Massimiliano Gimondo

Labels (1)
Tags (2)
0 Kudos
1 Reply

1,142 Views
AlexanderB
NXP Employee
NXP Employee

Hello Massimiliano,

the CLRC663 as a front-end is fully capable to interact with any Android device running HCE. It is just that NXP does not have a example ready which does that out of the box.

A good starting point would be the basic discovery loop, mifare classic or EVMCo polling example which you then have to modify according to your needs.

You have to include those components necessary to do all your required exchanges. Like I14443P4, I14443P4A, etc... Those includes are mainly managed within the file 'ph_NxpBuild_App.h'. 

Of course a basic NFC knowledge is necessary to do so. A Android HCE device is acting as a T4AT device. Which means you have to do a layer 4 activation (RATS) and after that exchange data in the ISO-DEP protocol (ISO14443-4) embedding the ISO7816-4 layer.

For most commands NXP provides already existing functions within the NXP NFC Reader Library. 

Check the NXP NFC Reader Library and especially following files:

  • phpall14443p4a
    • Will provide activation for Layer-4: Rats
    • ...
  • phpall14443p4
    • Exchange and Deselect
    • ...
  • phalMfdf
    • Select Application and other 7816 commands
    • ...

Best regards,

Alexander