Default quiet annotation output in start.sh/start.bat (-A apdus,warnings)
Full -A iso7816 printed all annotation rows including the per-byte 'bytes' row (thousands of lines per capture; ~22k on xiaomi_phone, ~11k on A55). Default is now '-A iso7816=apdus,iso7816=warnings' (decoded APDUs + decoder warnings/errors only); --debug restores the full '-A iso7816' output plus the existing -l 4. stderr decoder log (banner, PACKETEND hex, glitches, discards) is untouched.
This commit is contained in:
1 parent
d3715c9385
commit
9d00827837
3 files changed
+19
-8
No files matched your search
@@ -115,7 +115,10 @@ Override via args:
|
|||||||
./start.sh --no-rst --no-vcc # CLK+I/O only
|
./start.sh --no-rst --no-vcc # CLK+I/O only
|
||||||
./start.sh --host=10.0.28.7 # stream to a remote analyser
|
./start.sh --host=10.0.28.7 # stream to a remote analyser
|
||||||
./start.sh --pcap=session.pcap # also record decoded events to PCAP
|
./start.sh --pcap=session.pcap # also record decoded events to PCAP
|
||||||
./start.sh --debug # verbose libsigrokdecode logging
|
./start.sh --debug # full decoder + sigrok output (all
|
||||||
|
# annotation rows + libsigrok -l 4);
|
||||||
|
# by default only decoded APDUs and
|
||||||
|
# decoder warnings/errors are shown
|
||||||
```
|
```
|
||||||
|
|
||||||
### Detecting the wiring (`tools/detect_pins.py`)
|
### Detecting the wiring (`tools/detect_pins.py`)
|
||||||
@@ -192,7 +195,9 @@ is the usual suspect.
|
|||||||
./start.sh --pcap=s.pcap --log=s.log # also record decoded events, log rc=
|
./start.sh --pcap=s.pcap --log=s.log # also record decoded events, log rc=
|
||||||
./start.sh ... --samplerate=24M # more timing headroom if needed
|
./start.sh ... --samplerate=24M # more timing headroom if needed
|
||||||
./start.sh ... --klog # also record kernel journal
|
./start.sh ... --klog # also record kernel journal
|
||||||
./start.sh ... --debug # libsigrok internals at -l 4
|
./start.sh ... --debug # full output: all annotation rows
|
||||||
|
# + libsigrok internals at -l 4
|
||||||
|
# (default: APDUs + warnings only)
|
||||||
```
|
```
|
||||||
|
|
||||||
`start.sh` captures a continuous stream at the configured rate (default 16
|
`start.sh` captures a continuous stream at the configured rate (default 16
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ set "HOST=127.0.0.1"
|
|||||||
set "PORT=4729"
|
set "PORT=4729"
|
||||||
set "PCAP="
|
set "PCAP="
|
||||||
set "DEBUG="
|
set "DEBUG="
|
||||||
|
set "ANNOT=iso7816=apdus,iso7816=warnings"
|
||||||
|
|
||||||
:argloop
|
:argloop
|
||||||
if "%~1"=="" goto :argsdone
|
if "%~1"=="" goto :argsdone
|
||||||
@@ -26,7 +27,7 @@ if /i "%~1"=="--clock" ( set "CLOCK=%~2" & shift & shift & goto :arg
|
|||||||
if /i "%~1"=="--host" ( set "HOST=%~2" & shift & shift & goto :argloop )
|
if /i "%~1"=="--host" ( set "HOST=%~2" & shift & shift & goto :argloop )
|
||||||
if /i "%~1"=="--port" ( set "PORT=%~2" & shift & shift & goto :argloop )
|
if /i "%~1"=="--port" ( set "PORT=%~2" & shift & shift & goto :argloop )
|
||||||
if /i "%~1"=="--pcap" ( set "PCAP=%~2" & shift & shift & goto :argloop )
|
if /i "%~1"=="--pcap" ( set "PCAP=%~2" & shift & shift & goto :argloop )
|
||||||
if /i "%~1"=="--debug" ( set "DEBUG=1" & shift & goto :argloop )
|
if /i "%~1"=="--debug" ( set "DEBUG=1" & set "ANNOT=iso7816" & shift & goto :argloop )
|
||||||
if /i "%~1"=="--no-rst" ( set "RST=" & shift & goto :argloop )
|
if /i "%~1"=="--no-rst" ( set "RST=" & shift & goto :argloop )
|
||||||
if /i "%~1"=="--no-vcc" ( set "VCC=" & shift & goto :argloop )
|
if /i "%~1"=="--no-vcc" ( set "VCC=" & shift & goto :argloop )
|
||||||
if /i "%~1"=="-h" ( goto :usage )
|
if /i "%~1"=="-h" ( goto :usage )
|
||||||
@@ -45,7 +46,9 @@ echo --clock=MODE native/detect/sample_as_clock
|
|||||||
echo --host=IP GSMTAP destination default: 127.0.0.1
|
echo --host=IP GSMTAP destination default: 127.0.0.1
|
||||||
echo --port=N GSMTAP port default: 4729
|
echo --port=N GSMTAP port default: 4729
|
||||||
echo --pcap=FILE Also write decoded events to FILE (no spaces in path)
|
echo --pcap=FILE Also write decoded events to FILE (no spaces in path)
|
||||||
echo --debug Verbose libsigrokdecode logging (-l 4)
|
echo --debug Full decoder + sigrok output (all annotation rows + -l 4).
|
||||||
|
echo
|
||||||
|
echo By default only decoded APDUs and decoder warnings/errors are shown.
|
||||||
echo --no-rst Disable RST tracking
|
echo --no-rst Disable RST tracking
|
||||||
echo --no-vcc Disable VCC tracking
|
echo --no-vcc Disable VCC tracking
|
||||||
echo.
|
echo.
|
||||||
@@ -87,7 +90,7 @@ if defined PCAP set "OPTS=%OPTS%:pcap_file=%PCAP%"
|
|||||||
|
|
||||||
set "CMDLINE=sigrok-cli -d fx2lafw --config samplerate=%SAMPLERATE% --continuous -C D0,D1,D2,D3,D4,D5,D6,D7"
|
set "CMDLINE=sigrok-cli -d fx2lafw --config samplerate=%SAMPLERATE% --continuous -C D0,D1,D2,D3,D4,D5,D6,D7"
|
||||||
if defined DEBUG set "CMDLINE=%CMDLINE% -l 4"
|
if defined DEBUG set "CMDLINE=%CMDLINE% -l 4"
|
||||||
set "CMDLINE=%CMDLINE% -P iso7816:%OPTS% -A iso7816"
|
set "CMDLINE=%CMDLINE% -P iso7816:%OPTS% -A %ANNOT%"
|
||||||
|
|
||||||
echo ISO 7816 streamer - clk=%CLK% data=%DATA% clock=%CLOCK%
|
echo ISO 7816 streamer - clk=%CLK% data=%DATA% clock=%CLOCK%
|
||||||
if defined RST echo RST tracking on channel %RST%
|
if defined RST echo RST tracking on channel %RST%
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ HOST=127.0.0.1
|
|||||||
PORT=4729
|
PORT=4729
|
||||||
PCAP=""
|
PCAP=""
|
||||||
DEBUG=""
|
DEBUG=""
|
||||||
|
ANNOT="iso7816=apdus,iso7816=warnings" # default: decoded APDUs + warnings only
|
||||||
LOG=""
|
LOG=""
|
||||||
KLOG=""
|
KLOG=""
|
||||||
LOOP=0 # --loop: restart on rc=0 (device stopped streaming)
|
LOOP=0 # --loop: restart on rc=0 (device stopped streaming)
|
||||||
@@ -52,7 +53,9 @@ Options:
|
|||||||
--host=IP GSMTAP destination (default: ${HOST})
|
--host=IP GSMTAP destination (default: ${HOST})
|
||||||
--port=N GSMTAP port (default: ${PORT})
|
--port=N GSMTAP port (default: ${PORT})
|
||||||
--pcap=FILE Also write decoded events to FILE (offline analysis)
|
--pcap=FILE Also write decoded events to FILE (offline analysis)
|
||||||
--debug Verbose libsigrokdecode logging (-l 4)
|
--debug Full decoder + sigrok output: all annotation rows and
|
||||||
|
verbose libsigrokdecode logging (-l 4). By default only
|
||||||
|
decoded APDUs and decoder warnings/errors are shown.
|
||||||
--log=FILE Tee all output into FILE (postmortem / exit diagnosis)
|
--log=FILE Tee all output into FILE (postmortem / exit diagnosis)
|
||||||
--klog[=FILE] Also record the kernel journal (journalctl -kf) to
|
--klog[=FILE] Also record the kernel journal (journalctl -kf) to
|
||||||
FILE (default: klog.log) -- needs journal read
|
FILE (default: klog.log) -- needs journal read
|
||||||
@@ -106,7 +109,7 @@ for arg in "$@"; do
|
|||||||
--host=*) HOST="${arg#*=}" ;;
|
--host=*) HOST="${arg#*=}" ;;
|
||||||
--port=*) PORT="${arg#*=}" ;;
|
--port=*) PORT="${arg#*=}" ;;
|
||||||
--pcap=*) PCAP="${arg#*=}" ;;
|
--pcap=*) PCAP="${arg#*=}" ;;
|
||||||
--debug) DEBUG=1 ;;
|
--debug) DEBUG=1; ANNOT="iso7816" ;;
|
||||||
--log=*) LOG="${arg#*=}" ;;
|
--log=*) LOG="${arg#*=}" ;;
|
||||||
--klog) KLOG="klog.log" ;;
|
--klog) KLOG="klog.log" ;;
|
||||||
--klog=*) KLOG="${arg#*=}" ;;
|
--klog=*) KLOG="${arg#*=}" ;;
|
||||||
@@ -250,7 +253,7 @@ run_once() {
|
|||||||
-C 'D0,D1,D2,D3,D4,D5,D6,D7' \
|
-C 'D0,D1,D2,D3,D4,D5,D6,D7' \
|
||||||
${DEBUG:+-l 4} \
|
${DEBUG:+-l 4} \
|
||||||
-P "iso7816:${OPTS}${pcap_opt}" \
|
-P "iso7816:${OPTS}${pcap_opt}" \
|
||||||
-A iso7816 < "${FIFO}" | tee "${ANNOT_TMP}"
|
-A "${ANNOT}" < "${FIFO}" | tee "${ANNOT_TMP}"
|
||||||
local rc=${PIPESTATUS[0]}
|
local rc=${PIPESTATUS[0]}
|
||||||
kill "${FIFO_PID}" 2>/dev/null || true
|
kill "${FIFO_PID}" 2>/dev/null || true
|
||||||
rm -f "${FIFO}" 2>/dev/null || true
|
rm -f "${FIFO}" 2>/dev/null || true
|
||||||
|
|||||||
Reference in new issue
Block a user