greatscottgadgets / packetry

A fast, intuitive USB 2.0 protocol analysis application for use with Cynthion.
BSD 3-Clause "New" or "Revised" License
156 stars 29 forks source link

packetry doesn't log usb packets when USB hub between TARGET-C and target-host #128

Closed d-c-d closed 4 months ago

d-c-d commented 4 months ago

I've followed the directions in https://cynthion.readthedocs.io/en/latest/getting_started_packetry.html

cynthion info
Detected a Cynthion device!
    Bitstream: USB Analyzer (Cynthion Project)
    Hardware: Cynthion r1.4
    Flash UID: 29496fdf30c460de

and cargo run in packetry

I have CONTROL connected to a raspberry pi 5 with 8Mb RAM and TARGET A connected to the target device

Normally I connect the Target Device to a Windows 11 laptop that communicates with a custom application and driver

I tried to connect either AUX or TARGET C to the windows computer, but no packets flow, and nothing is logged.

Perhaps this is not a supported configuration ( some of the documentation could be read to indicate that Target A and Target C are mutually exclusive.) I see on Discord that the connection using TARGET-C and TARGET-A is a passive passthrough so that shouldn't be the issue

TARGET C - USB Type-C connector for Packetry traffic capture and Facedancer device emulation.

TARGET A - USB Type-A connector shared with the TARGET C connector.

The crowdsupply.com Comparisons page mentions the USB Explorer 200 which supports a configuration where a separate computer analyses data flowing between a Host Under Test and a device Under Test

d-c-d commented 4 months ago

The About / System info reports:

Runtime information:
  GTK version: 4.8.3

Packetry build information:
  Git commit: fc7d276efae23c5c89e8ca92c88766f61206f6ed
  Cargo package version: 0.1.0
  Enabled features: (none)

Rust compiler:
  Version: rustc 1.79.0 (129f3b996 2024-06-10)
  Target: aarch64-unknown-linux-gnu (little-endian, 64-bit)
  Optimization level: 0
  Debug build: yes

Built with dependencies:
  addr2line 0.22.0
  adler 1.0.2
  anyhow 1.0.86
  arc-swap 1.7.1
  arrayvec 0.7.4
  atomic-waker 1.1.2
  autocfg 1.3.0
  backtrace 0.3.73
  bincode 1.3.3
  bitfield 0.14.0
  bitflags 1.3.2
  bitflags 2.5.0
  built 0.7.4
  bytemuck 1.16.0
  bytemuck_derive 1.7.0
  byteorder 1.5.0
  byteorder_slice 3.0.0
  cairo-rs 0.19.4
  cairo-sys-rs 0.19.2
  cargo-lock 9.0.0
  cc 1.0.99
  cfg-expr 0.15.8
  cfg-if 0.1.10
  cfg-if 1.0.0
  convert_case 0.4.0
  core-foundation 0.9.4
  core-foundation-sys 0.8.6
  crossbeam-channel 0.5.13
  crossbeam-utils 0.8.20
  ctor 0.2.8
  derive-into-owned 0.2.0
  derive_more 0.99.18
  either 1.12.0
  equivalent 1.0.1
  errno 0.3.9
  fastrand 2.1.0
  field-offset 0.3.6
  findshlibs 0.10.2
  fnv 1.0.7
  form_urlencoded 1.2.1
  fuchsia-zircon 0.3.3
  fuchsia-zircon-sys 0.3.3
  futures-channel 0.3.30
  futures-core 0.3.30
  futures-executor 0.3.30
  futures-io 0.3.30
  futures-lite 2.3.0
  futures-macro 0.3.30
  futures-task 0.3.30
  futures-util 0.3.30
  gdk-pixbuf 0.19.2
  gdk-pixbuf-sys 0.19.5
  gdk4 0.8.2
  gdk4-sys 0.8.2
  getrandom 0.1.16
  getrandom 0.2.15
  gimli 0.29.0
  gio 0.19.5
  gio-sys 0.19.5
  git2 0.19.0
  glib 0.19.7
  glib-macros 0.19.7
  glib-sys 0.19.5
  gobject-sys 0.19.5
  graphene-rs 0.19.2
  graphene-sys 0.19.5
  gsk4 0.8.2
  gsk4-sys 0.8.2
  gtk4 0.8.2
  gtk4-macros 0.8.2
  gtk4-sys 0.8.2
  hashbrown 0.14.5
  heck 0.5.0
  humansize 2.1.3
  idna 0.5.0
  indexmap 2.2.6
  io-kit-sys 0.4.1
  iovec 0.1.4
  ipc-channel 0.16.1
  itertools 0.12.1
  itoa 1.0.11
  jobserver 0.1.31
  kernel32-sys 0.2.2
  lazy_static 1.4.0
  libc 0.2.155
  libgit2-sys 0.17.0+1.8.1
  libm 0.2.8
  libz-sys 1.1.18
  linux-raw-sys 0.4.14
  log 0.4.21
  lrumap 0.1.0
  mach2 0.4.2
  memchr 2.7.4
  memmap2 0.9.4
  memoffset 0.9.1
  miniz_oxide 0.7.3
  mio 0.6.23
  miow 0.2.2
  net2 0.2.39
  num-format 0.4.4
  num_enum 0.7.2
  num_enum_derive 0.7.2
  nusb 0.1.9
  object 0.36.0
  once_cell 1.19.0
  packetry 0.1.0
  page_size 0.6.0
  pango 0.19.5
  pango-sys 0.19.5
  parking 2.2.0
  pcap-file 2.0.0
  percent-encoding 2.3.1
  pin-project-lite 0.2.14
  pin-utils 0.1.0
  pkg-config 0.3.30
  ppv-lite86 0.2.17
  proc-macro-crate 3.1.0
  proc-macro2 1.0.85
  procspawn 1.0.0
  quote 1.0.36
  rand 0.7.3
  rand 0.8.5
  rand_chacha 0.2.2
  rand_chacha 0.3.1
  rand_core 0.5.1
  rand_core 0.6.4
  rand_hc 0.2.0
  rand_xorshift 0.3.0
  rustc-demangle 0.1.24
  rustc_version 0.4.0
  rustix 0.38.34
  ryu 1.0.18
  semver 1.0.23
  serde 1.0.203
  serde_derive 1.0.203
  serde_json 1.0.117
  serde_spanned 0.6.6
  slab 0.4.9
  smallvec 1.13.2
  syn 1.0.109
  syn 2.0.66
  system-deps 6.2.2
  target-lexicon 0.12.14
  tempfile 3.10.1
  thiserror 1.0.61
  thiserror-impl 1.0.61
  tinyvec 1.8.0
  tinyvec_macros 0.1.1
  toml 0.7.8
  toml 0.8.14
  toml_datetime 0.6.6
  toml_edit 0.19.15
  toml_edit 0.21.1
  toml_edit 0.22.14
  unicode-bidi 0.3.15
  unicode-ident 1.0.12
  unicode-normalization 0.1.23
  url 2.5.2
  uuid 1.8.0
  vcpkg 0.2.15
  version-compare 0.2.0
  wasi 0.11.0+wasi-snapshot-preview1
  wasi 0.9.0+wasi-snapshot-preview1
  winapi 0.2.8
  winapi 0.3.9
  winapi-build 0.1.1
  winapi-i686-pc-windows-gnu 0.4.0
  winapi-x86_64-pc-windows-gnu 0.4.0
  windows-sys 0.48.0
  windows-sys 0.52.0
  windows-targets 0.48.5
  windows-targets 0.52.5
  windows_aarch64_gnullvm 0.48.5
  windows_aarch64_gnullvm 0.52.5
  windows_aarch64_msvc 0.48.5
  windows_aarch64_msvc 0.52.5
  windows_i686_gnu 0.48.5
  windows_i686_gnu 0.52.5
  windows_i686_gnullvm 0.52.5
  windows_i686_msvc 0.48.5
  windows_i686_msvc 0.52.5
  windows_x86_64_gnu 0.48.5
  windows_x86_64_gnu 0.52.5
  windows_x86_64_gnullvm 0.48.5
  windows_x86_64_gnullvm 0.52.5
  windows_x86_64_msvc 0.48.5
  windows_x86_64_msvc 0.52.5
  winnow 0.5.40
  winnow 0.6.13
  ws2_32-sys 0.2.1
d-c-d commented 4 months ago

Eventually success was achieved using control on raspberry pi 5, TARGET-A directly connected to target device, and TARGET-C directly connection ( no hub ) to a Windows 11 host

not sure why adding a USB Hub between target host and TARGET-C still fails

d-c-d commented 4 months ago

I'm closing this - operator error on my part - I was plugging into a "power only" connection on the USB-C hub - connecting to the single USB-C connection on the hub allowed traffic to be captured