Commit Graph
3 Commits
Author SHA1 Message Date
catarrh 5a41de092c start/sniff-start: refuse to run in Windows-hosted shells
A Windows user could run the bash launchers from WSL or Git Bash / MSYS2 /
MinGW / Cygwin, where the Linux USB assumptions do not hold: WSL cannot reach
the Windows SIMtrace2 device, and those shells have no Linux /sys + /dev/bus/usb
view for the udev pre-flight.  Both launchers now detect a Windows host up
front (WSL via /proc/version, the rest via uname -s) and exit 2 with a pointer
at the matching .bat launcher, which drives the Windows Python/PyUSB stack.
The message goes to stderr; a deliberate WSL/Cygwin flow can still run the
Python module directly (noted in the source comment).

Tests: tests/test_launchers.py runs each script with a fake mingw uname and
asserts exit 2 plus the start.bat/sniff-start.bat pointer, pins the WSL
detection, and checks bash -n syntax (skipped when bash is absent).

Bumps 2.7.14 (version.py, pyproject, PWA_VERSION), SW cache v96, the README
download examples and the release-notes preamble.  561 Python + 80 Node tests.
2026-11-04 19:30:41 +03:00
catarrh ec129c4463 Add --format option: timestamp and atr-time TPDU output modes
dump.py: tpdu_timestamp_prefix(), tpdu_atr_time_prefix(),
  format_message() accepts tpdu_prefix parameter,
  FileDumper supports fmt + ATR time tracking

__main__.py: --format/-f flag (hex|timestamp|atr-time),
  atr_time_start tracking in message loop

sniff-start.sh: pass through --format/-f and FORMAT env var
2026-08-10 23:53:38 +03:00
catarrh 73b0277ef7 Initial commit: simtrace2-pysniff v0.1.0
Python-based SIMtrace2 sniffer — drop-in replacement for simtrace2-sniff.
Single dependency (pyusb), auto-reconnect, GSMTAP/PCAP output, library API.

Modules:
  protocol.py — SIMtrace2 USB sniffing protocol parser
  device.py   — USB discovery + SniffSession with exponential backoff reconnect
  gsmtap.py   — GSMTAP UDP sender for Wireshark
  pcap.py     — PCAP file writer (LINKTYPE_GSMTAP)
  dump.py     — hex dump formatters + file output
  __main__.py — CLI entry point

Startup script sniff-start.sh handles udev permission checks and shows
install instructions. udev rule uses TAG+=uaccess (systemd-logind ACL).
2026-08-10 23:17:04 +03:00