Add chip detection system for NTAG, DESFire, ISO 15693, and JavaCard
Implement comprehensive NFC chip identification using platform-specific commands and heuristics: - NTAG/Ultralight detection via GET_VERSION command - DESFire EV1/EV2/EV3 and NTAG 424 DNA detection - ISO 15693 detection with memory-based SLIX/ICODE DNA differentiation - JavaCard/JCOP detection via CPLC data - MIFARE Classic detection via SAK values Use block count as authoritative source for NXP ISO 15693 chips since IC reference values overlap between SLIX and ICODE DNA families. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ export function ScanScreen({navigation}: ScanScreenProps) {
|
||||
const {
|
||||
state,
|
||||
tag,
|
||||
transponder,
|
||||
error,
|
||||
nfcStatus,
|
||||
startScan,
|
||||
@@ -17,7 +18,7 @@ export function ScanScreen({navigation}: ScanScreenProps) {
|
||||
openSettings,
|
||||
} = useScan();
|
||||
|
||||
// Navigate to results when scan succeeds
|
||||
// Navigate to results when scan succeeds (detection happens in the hook)
|
||||
useEffect(() => {
|
||||
if (state === 'success' && tag) {
|
||||
navigation.replace('Result', {
|
||||
@@ -29,9 +30,10 @@ export function ScanScreen({navigation}: ScanScreenProps) {
|
||||
ats: tag.ats,
|
||||
historicalBytes: tag.historicalBytes,
|
||||
},
|
||||
transponder: transponder ?? undefined,
|
||||
});
|
||||
}
|
||||
}, [state, tag, navigation]);
|
||||
}, [state, tag, transponder, navigation]);
|
||||
|
||||
// Auto-start scan when screen loads
|
||||
useEffect(() => {
|
||||
@@ -185,7 +187,10 @@ export function ScanScreen({navigation}: ScanScreenProps) {
|
||||
style={styles.processingSpinner}
|
||||
/>
|
||||
<Text variant="headlineMedium" style={styles.processingText}>
|
||||
PROCESSING
|
||||
IDENTIFYING
|
||||
</Text>
|
||||
<Text variant="bodyMedium" style={styles.detectingHint}>
|
||||
Analyzing chip type...
|
||||
</Text>
|
||||
</>
|
||||
)}
|
||||
@@ -297,6 +302,11 @@ const styles = StyleSheet.create({
|
||||
color: DTColors.modeEmphasis,
|
||||
letterSpacing: 4,
|
||||
},
|
||||
detectingHint: {
|
||||
color: DTColors.light,
|
||||
opacity: 0.7,
|
||||
marginTop: 12,
|
||||
},
|
||||
footer: {
|
||||
alignItems: 'center',
|
||||
paddingBottom: 20,
|
||||
|
||||
Reference in New Issue
Block a user