appidea / react-native-hce

Emulate smart cards inside React-Native application.
MIT License
71 stars 26 forks source link

Invalid Capability Container CCLEN value #37

Open zs-gabor opened 6 months ago

zs-gabor commented 6 months ago

In the Android directory, the Capability Container (CCLEN) value is statically set to 0x0011 (17 bytes) size in react-native-hce/android/src/main/java/com/reactnativehce/apps/nfc/NFCTagType4.java line 24. "001120FFFFFFFF"

In line 50, within the setUpCapabilityContainerContent() function, when building the CC from CC_HEADER and controlTlv static values, the CC's actual size is 0x000F (15 bytes).

Please correct them in line 24. to "000F20FFFFFFFF"

Some libraries attempt to read the extra TLV block unsuccessfully and then exit with an error message: "Unexpected end of data".