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:
catarrh committed 2026-09-10 00:22:42 +03:00
1 parent d3715c9385
commit 9d00827837
3 files changed
+19 -8

No files matched your search

+6 -3
View File
@@ -12,6 +12,7 @@ HOST=127.0.0.1
PORT=4729
PCAP=""
DEBUG=""
ANNOT="iso7816=apdus,iso7816=warnings" # default: decoded APDUs + warnings only
LOG=""
KLOG=""
LOOP=0 # --loop: restart on rc=0 (device stopped streaming)
@@ -52,7 +53,9 @@ Options:
--host=IP GSMTAP destination (default: ${HOST})
--port=N GSMTAP port (default: ${PORT})
--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)
--klog[=FILE] Also record the kernel journal (journalctl -kf) to
FILE (default: klog.log) -- needs journal read
@@ -106,7 +109,7 @@ for arg in "$@"; do
--host=*) HOST="${arg#*=}" ;;
--port=*) PORT="${arg#*=}" ;;
--pcap=*) PCAP="${arg#*=}" ;;
--debug) DEBUG=1 ;;
--debug) DEBUG=1; ANNOT="iso7816" ;;
--log=*) LOG="${arg#*=}" ;;
--klog) KLOG="klog.log" ;;
--klog=*) KLOG="${arg#*=}" ;;
@@ -250,7 +253,7 @@ run_once() {
-C 'D0,D1,D2,D3,D4,D5,D6,D7' \
${DEBUG:+-l 4} \
-P "iso7816:${OPTS}${pcap_opt}" \
-A iso7816 < "${FIFO}" | tee "${ANNOT_TMP}"
-A "${ANNOT}" < "${FIFO}" | tee "${ANNOT_TMP}"
local rc=${PIPESTATUS[0]}
kill "${FIFO_PID}" 2>/dev/null || true
rm -f "${FIFO}" 2>/dev/null || true