Remove detect_pins.py; wiring pins are fixed via the short cable
The recommended tap is the short cable with external pull resistors whose pins are fixed and known in advance (D5=CLK, D0=I/O, D4=RST, D2=VCC), so the auto-detection tool is no longer needed. Drop it and all references: - Delete tools/detect_pins.py. - README: replace the 'Detecting the wiring' section with a fixed-wiring note; drop the Python/numpy prerequisite and the detect_pins capture step from the Windows guide. - setup.bat: remove the Python/numpy check and the 'find the wiring' next step.
This commit is contained in:
1 parent
e1903649a7
commit
b7a6e50fc8
3 files changed
+19
-1133
No files matched your search
@@ -121,29 +121,18 @@ Override via args:
|
|||||||
# decoder warnings/errors are shown
|
# decoder warnings/errors are shown
|
||||||
```
|
```
|
||||||
|
|
||||||
### Detecting the wiring (`tools/detect_pins.py`)
|
### Wiring
|
||||||
|
|
||||||
Not sure which FX2 channel carries which SIM signal? The probe loops
|
The recommended tap is the short cable with external pull resistors (see
|
||||||
short captures until the wiring map is complete:
|
the photos above): 10 kΩ to GND on VCC (pulls low when off) and 47 kΩ to
|
||||||
|
VCC on DATA (faster rise to high). Its pin mapping is **fixed and known
|
||||||
|
in advance** — see the "Pin mapping" table below — and is exactly what
|
||||||
|
`start.sh` defaults to (`D5`=CLK, `D0`=I/O, `D4`=RST, `D2`=VCC). No
|
||||||
|
wiring auto-detection is needed; the pins never move.
|
||||||
|
|
||||||
```bash
|
> **GND first.** Plug GND first and verify it manually (continuity meter
|
||||||
python3 tools/detect_pins.py # live probe (default): trigger a
|
> or known-good contact) — a missing or loose ground masquerades as every
|
||||||
# SIM reset when prompted
|
> other fault at once: floating lines, phantom start bits, all-zero frames.
|
||||||
python3 tools/detect_pins.py capture.sr # or analyze an existing capture
|
|
||||||
```
|
|
||||||
|
|
||||||
Each segment fingerprints every channel (toggle rate, idle level, median
|
|
||||||
inter-transition gap, first-rise ordering across VCC -> RST -> ATR).
|
|
||||||
Ambiguous static lines are reported as such instead of guessed; the run
|
|
||||||
ends with the detected mapping and a ready-to-paste `start.sh` command
|
|
||||||
line -- partial mappings still print usable flags for the known channels.
|
|
||||||
Requires numpy.
|
|
||||||
|
|
||||||
> **GND is not detectable.** It carries no signal to fingerprint, so the
|
|
||||||
> tool cannot find or verify it. Plug it first and check it manually
|
|
||||||
> (continuity meter or known-good contact) -- a missing or loose ground
|
|
||||||
> masquerades as every other fault at once: floating lines, phantom
|
|
||||||
> start bits, all-zero frames.
|
|
||||||
|
|
||||||
### Robustness against noisy signals
|
### Robustness against noisy signals
|
||||||
|
|
||||||
@@ -272,9 +261,10 @@ sigrok-cli -i capture.sr -P iso7816:clk=2:data=0 -B iso7816=pcap > out.pcap
|
|||||||
|
|
||||||
### Pin mapping
|
### Pin mapping
|
||||||
|
|
||||||
The FX2 clone channels are assigned via `-P iso7816:clk=N:data=N:rst=N:vcc=N`
|
The FX2 clone channels are assigned via `-P iso7816:clk=N:data=N:rst=N:vcc=N`.
|
||||||
(no re-plugging needed when wires are mixed up). Default tap wiring used by
|
The recommended short-cable tap (external pull resistors) uses fixed pins that
|
||||||
`start.sh`:
|
are exactly `start.sh`'s defaults; `--clk`/`--data`/`--rst`/`--vcc` remap them
|
||||||
|
if you wire differently:
|
||||||
|
|
||||||
| FX2 channel | SIM contact | Signal |
|
| FX2 channel | SIM contact | Signal |
|
||||||
|-------------|-------------|--------|
|
|-------------|-------------|--------|
|
||||||
@@ -317,14 +307,12 @@ samplerate.
|
|||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
1. **Python 3.8+** from python.org ("Add to PATH" during install), then:
|
1. **sigrok-cli** Windows installer (0.7.2 x86_64) from
|
||||||
`pip install numpy`
|
|
||||||
2. **sigrok-cli** Windows installer (0.7.2 x86_64) from
|
|
||||||
[sigrok.org/wiki/Downloads](https://sigrok.org/wiki/Downloads).
|
[sigrok.org/wiki/Downloads](https://sigrok.org/wiki/Downloads).
|
||||||
If it fails to start with error `0xc0150002`, install the
|
If it fails to start with error `0xc0150002`, install the
|
||||||
[Visual C++ 2010 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=26999)
|
[Visual C++ 2010 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=26999)
|
||||||
(`msvcr100.dll` is required by the bundled Python runtime).
|
(`msvcr100.dll` is required by the bundled Python runtime).
|
||||||
3. fx2lafw firmware ships bundled with the installer — no separate download.
|
2. fx2lafw firmware ships bundled with the installer — no separate download.
|
||||||
|
|
||||||
Driver setup (FX2 dongles need WinUSB, the vendor driver won't work):
|
Driver setup (FX2 dongles need WinUSB, the vendor driver won't work):
|
||||||
|
|
||||||
@@ -347,13 +335,12 @@ setup.bat
|
|||||||
|
|
||||||
`setup.bat` verifies sigrok-cli and bundled firmware, registers this repo's
|
`setup.bat` verifies sigrok-cli and bundled firmware, registers this repo's
|
||||||
decoder via a junction into `%LOCALAPPDATA%\libsigrokdecode\decoders\iso7816`
|
decoder via a junction into `%LOCALAPPDATA%\libsigrokdecode\decoders\iso7816`
|
||||||
(confirmed by `sigrok-cli -L` listing `iso7816`), checks Python/numpy for
|
(confirmed by `sigrok-cli -L` listing `iso7816`), and probes the device's
|
||||||
`tools\detect_pins.py`, and probes the device's accepted samplerates.
|
accepted samplerates.
|
||||||
|
|
||||||
Capture works the same as on Linux:
|
Capture works the same as on Linux:
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
tools\detect_pins.py rem find the wiring (loops segments until done)
|
|
||||||
start.bat rem capture + GSMTAP stream
|
start.bat rem capture + GSMTAP stream
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -84,20 +84,6 @@ if errorlevel 1 (
|
|||||||
)
|
)
|
||||||
echo [ok] %LINK% -^> listed by sigrok-cli
|
echo [ok] %LINK% -^> listed by sigrok-cli
|
||||||
|
|
||||||
rem ---- python / numpy (for tools\detect_pins.py) ------------------------
|
|
||||||
echo Checking Python + numpy...
|
|
||||||
set "PY="
|
|
||||||
py -3 --version >nul 2>&1 && set "PY=py -3"
|
|
||||||
if not defined PY (
|
|
||||||
python --version >nul 2>&1 && set "PY=python"
|
|
||||||
)
|
|
||||||
if defined PY (
|
|
||||||
for /f "delims=" %%v in ('!PY! --version 2^>^&1') do echo [ok] %%v
|
|
||||||
!PY! -c "import numpy" >nul 2>&1 || echo [!] numpy missing: run '!PY! -m pip install numpy'
|
|
||||||
) else (
|
|
||||||
echo [!] no python launcher found; detect_pins.py needs Python 3.8+ and numpy
|
|
||||||
)
|
|
||||||
|
|
||||||
rem ---- hardware samplerate probe ---------------------------------------
|
rem ---- hardware samplerate probe ---------------------------------------
|
||||||
echo Probing device samplerates...
|
echo Probing device samplerates...
|
||||||
set "MAX_RATE="
|
set "MAX_RATE="
|
||||||
@@ -126,6 +112,5 @@ if defined MAX_RATE (
|
|||||||
echo.
|
echo.
|
||||||
echo Done. Next steps:
|
echo Done. Next steps:
|
||||||
echo 1. Plug GND first and verify contact manually (see README).
|
echo 1. Plug GND first and verify contact manually (see README).
|
||||||
echo 2. tools\detect_pins.py -- find the wiring
|
echo 2. start.bat -- capture + GSMTAP stream
|
||||||
echo 3. start.bat -- capture + GSMTAP stream
|
|
||||||
endlocal
|
endlocal
|
||||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user