Rewrite config check for PCSC, document uFR Zero CCID limitations
The uFR Zero presents as CCID (not serial), so the uFCoder library cannot communicate with it. Rewrote ntag5_config_check.py to use pyscard with auto-detection: ACR1552 for full NXP config verification, generic PCSC for basic tag info. Removed uFCoder library (unusable). Backed up CCID Info.plist before adding uFR Zero VID:PID entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,22 +1,19 @@
|
||||
# NTAG5Link Config Verification via uFR Zero
|
||||
# NTAG5Link Config Verification via NFC Reader
|
||||
|
||||
**Date**: 2026-03-03
|
||||
**Status**: Tool written, reader connection blocked
|
||||
**Status**: Partial — tag detected, config read requires ACR1552
|
||||
|
||||
## Goal
|
||||
|
||||
Read-only verification that the NTAG5Link Click board's configuration matches xblink requirements, using the Digital Logic uFR Zero Multi-ISO reader.
|
||||
Read-only verification that the NTAG5Link Click board's configuration matches xblink requirements.
|
||||
|
||||
## Tool
|
||||
|
||||
`tools/ntag5_config_check.py` — Python script using uFCoder library (ctypes) in ISO15693 transparent mode.
|
||||
`tools/ntag5_config_check.py` — Python script using pyscard (PCSC) with auto-detection of reader capabilities.
|
||||
|
||||
Features:
|
||||
- ISO15693 INVENTORY to discover all tags by UID
|
||||
- Addressed mode for all config reads (supports multiple tags in field)
|
||||
- Reads CONFIG block (0x37) and EH/ED CONFIG block (0x3D)
|
||||
- NXP system info for interface type verification
|
||||
- Checks against xblink expected config values
|
||||
**Reader support:**
|
||||
- **ACR1552**: Full NXP config verification via transparent ISO15693 mode (NXP READ_CONFIG 0xC0)
|
||||
- **uFR Zero (CCID)**: Basic tag info only — UID, EEPROM blocks. Cannot read NXP config registers.
|
||||
|
||||
## Expected Config
|
||||
|
||||
@@ -29,45 +26,56 @@ Features:
|
||||
| EH enable | true | EH_CONFIG byte 0, bit 0 = 1 |
|
||||
| EH voltage | 3.0V | EH_CONFIG byte 0, bits 2:1 = 10 |
|
||||
|
||||
## Reader Connection Issue
|
||||
## uFR Zero Investigation Results
|
||||
|
||||
**Problem**: uFCoder library returns `UFR_TIMEOUT_ERR` (0x1002) for all `ReaderOpenEx` parameter combinations.
|
||||
The D-Logic uFR Zero Multi-ISO reader presents as a **CCID** (USB SmartCard class 0x0B) device, not serial.
|
||||
|
||||
**USB device**: `10c4:ea60` — Silicon Labs CP2102 USB to UART Bridge Controller, iSerial "0001". Generic descriptor, no D-Logic branding in USB strings.
|
||||
**USB**: VID:PID `3629:301b`, serial "UD101156"
|
||||
|
||||
**Raw serial investigation**:
|
||||
- At 1 Mbps (expected uFR baud): responds with `00 80` (2 bytes) — not a valid uFR protocol frame (expected 6+ bytes with `0x55...0xAA` framing)
|
||||
- At 115200 bps: returns ASCII shell commands mentioning "systemctl", "proxmark3" paths
|
||||
- At 250 Kbps: returns structured but unrecognized data
|
||||
### What works (PCSC/CCID)
|
||||
|
||||
**Possible causes**:
|
||||
1. Device may not be a uFR Zero — the CP210x bridge has generic descriptors
|
||||
2. Reader firmware may need updating
|
||||
3. Reader may be in a non-standard mode
|
||||
4. Different hardware variant requiring different protocol
|
||||
| Command | APDU | Result |
|
||||
|---------|------|--------|
|
||||
| GET_DATA (UID) | `FF CA 00 00 00` | UID: `E0:04:01:58:7F:8F:11:00` (NXP ISO15693) |
|
||||
| READ_BINARY | `FF B0 00 xx 00` | Reads ISO15693 user EEPROM blocks |
|
||||
| NDEF CC (block 0) | `FF B0 00 00 00` | `E1 40 80 09` — NDEF v4.0, 1024 bytes |
|
||||
|
||||
**Next steps**:
|
||||
1. Physically verify the device is indeed the uFR Zero (check labels, LEDs)
|
||||
2. Try the D-Logic `ufr_online` Windows utility to confirm reader identity
|
||||
3. If confirmed as uFR Zero, check firmware version and update if needed
|
||||
4. Alternative: use the ACR1552 PCSC reader with ntag5sensor directly (requires porting the reader to share the field with NTAG5 Click)
|
||||
### What doesn't work
|
||||
|
||||
## Fallback Plan: ntag5sensor + ACR1552
|
||||
| Approach | Result | Why |
|
||||
|----------|--------|-----|
|
||||
| uFCoder `ReaderOpen` | 0x1002 (timeout) | Library scans serial/tty, doesn't support CCID USB |
|
||||
| uFCoder `ReaderOpenHnd_ZeroUSB` | 0x0054 (opening error) | Even with pcscd stopped |
|
||||
| PCSC transparent (FF C2) | SW=6A81 | Not supported by uFR Zero CCID firmware |
|
||||
| CCID escape (IOCTL 0x42000001) | 6A81 for all commands | Advertised but non-functional |
|
||||
| Raw ISO15693 via SCardControl | 6A81 | No passthrough mechanism |
|
||||
|
||||
If the uFR Zero connection cannot be resolved, use the existing ntag5sensor Python tooling with the ACR1552 PCSC reader:
|
||||
### Key finding: CP210x is NOT the uFR Zero
|
||||
|
||||
`/dev/ttyUSB0` (`10c4:ea60`, Silicon Labs CP210x) is a **separate device** (Proxmark3). The uFR Zero is a pure CCID device with no serial interface.
|
||||
|
||||
### CCID setup required
|
||||
|
||||
The uFR Zero must be added to the CCID driver's device list:
|
||||
|
||||
1. Add VID `0x3629` / PID `0x301B` to `/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist`
|
||||
2. Set `ifdDriverOptions` to `0x0001` (enables CCID exchange — though escape commands still return 6A81)
|
||||
3. Restart pcscd: `systemctl restart pcscd`
|
||||
|
||||
## Path Forward: ACR1552
|
||||
|
||||
The ACR1552 reader supports transparent ISO15693 mode (FF C2 pseudo-APDUs with TLV encoding), enabling NXP custom commands. The `ntag5_config_check.py` tool auto-detects the ACR1552 and switches to full config verification mode.
|
||||
|
||||
```python
|
||||
# From ntag5sensor — already has full config read/write support
|
||||
# ntag5sensor has proven ACR1552 + NXP custom command support:
|
||||
chip = NTAG5Link(reader)
|
||||
config = chip.get_config_info()
|
||||
eh_config = chip.get_eh_ed_config_info()
|
||||
```
|
||||
|
||||
The ACR1552 is already proven with ntag5sensor. Only change needed: physically position the ACR1552 over the NTAG5 Click board instead of the uFR Zero.
|
||||
|
||||
## Config Change Plan (if mismatches found)
|
||||
|
||||
Use ntag5sensor's write functions (via ACR1552 or adapted for uFR Zero):
|
||||
Use ntag5sensor's write functions via ACR1552:
|
||||
|
||||
```python
|
||||
# Set I2C slave mode + SRAM passthrough + SRAM enable
|
||||
|
||||
Reference in New Issue
Block a user