See my other comment about recommending starting with usb-tools / Facedancer.
[1]: https://www.sstic.org/media/SSTIC2016/SSTIC-actes/usb_toolki...