#! /bin/bash
# Copyright (c) 2019 Dan Clemmensen, licensed to you under GPL v3.
# 
# convert the usbmon cap.pcap file into an IO transaction file.
# does not need root privledges 
# 

tshark -r cap.pcap -Y usb.device_address==$1 -w capdev$1
tshark -r capdev$1 -Tfields -e "_ws.col.Source" -e "_ws.col.Info" -e "usb.capdata" >capdev$1.tsv
./tidy <capdev$1.tsv >radiotrace

