17 lines
1.4 KiB
PowerShell
17 lines
1.4 KiB
PowerShell
[Console]::OutputEncoding = [Text.Encoding]::UTF8
|
|
$cap = "$env:TEMP\opencode\sym_claim.pcap"
|
|
Remove-Item $cap -ErrorAction SilentlyContinue
|
|
$ts = "C:\Program Files\Wireshark\tshark.exe"
|
|
$proc = Start-Process -FilePath $ts -ArgumentList "-i `"\Device\NPF_{E7165B1C-BAF6-49CF-9A3D-EF12DBC17329}`" -f `"udp port 31772`" -a duration:90 -w `"$cap`"" -PassThru -WindowStyle Hidden -RedirectStandardError "$env:TEMP\opencode\tshark_err2.txt"
|
|
Start-Sleep -Seconds 2
|
|
Start-Process -FilePath "C:\Program Files\ecue\Sympholight 5.5\Sympholight.exe"
|
|
Write-Host "SymphoLight started, capturing 90s..."
|
|
Start-Sleep -Seconds 88
|
|
Write-Host "=== frame type stats (src dst udplen count) ==="
|
|
& $ts -r $cap -T fields -e ip.src -e ip.dst -e udp.length 2>$null | Group-Object { $p = $_ -split "`t"; "$($p[0]) -> $($p[1]) len=$($p[2])" } | Sort-Object Count -Descending | Select-Object Count, Name | Format-Table -AutoSize
|
|
Write-Host "=== AERE replies (udplen=560, .1->113) times ==="
|
|
& $ts -r $cap -Y "ip.src==192.168.123.1 && udp.length==560" -T fields -e frame.time_relative 2>$null
|
|
Write-Host "=== DMX stream (udplen=1092, 113->.1) first/last ==="
|
|
$dmx = @(& $ts -r $cap -Y "ip.dst==192.168.123.1 && udp.length==1092" -T fields -e frame.time_relative 2>$null)
|
|
if ($dmx.Count -gt 0) { Write-Host (" first t=" + $dmx[0] + " last t=" + $dmx[$dmx.Count-1] + " total " + $dmx.Count) } else { Write-Host " no DMX stream" }
|