USB代理驱动程序或等效解决方案?
问题:调解 USB 流量/数据
我想接受特定 USB 端口上的入站流量,并将其完全复制为另一个特定 USB 端口上的出站流量,实际上完成了 USB 代理。推而广之,连接需要是双向的。另一个要求是端口必须能够伪造外部设备所看到的身份(供应商 ID、产品 ID 等)。如果给定的解决方案还能够转储/记录原始流量,那就太好了,尽管不是必需的。目标平台是 Windows 和/或 Linux(任何都可以)。
在开始一段史诗般的旅程并编写一个自定义驱动程序(这很可能会导致脑损伤)之前,我想问是否有人曾经做过类似的事情,或者可能构想出组装这个拼图所需的部分。 :)
Problem: Mediate USB traffic/data
I would like to accept inbound traffic on a specific USB port and replicate it exactly as outbound traffic on another specific USB port, in effect accomplishing a USB proxy. By extension, then, the connections need to be two-way. An additional requirement is that the port must be able to fake its identity (vendor ID, product ID, ...) as seen by an external device. Should the given solution also be able to dump/log the raw traffic, that would be fantastic, although not a requirement. Target platforms are Windows and/or Linux (any will do).
Before going on an epic journey and writing a custom driver, which is fairly likely to induce brain damage, I would like to ask if anyone has ever done anything similar, or could possibly conceive of the pieces needed to assemble this puzzle. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为如果没有额外的硬件,这是开箱即用的。
您期望哪种设备连接到代理的“上游”端口?假设“下游”端口上有一个常规设备(例如鼠标),则上游设备需要是 USB 主机才能以有意义的方式处理 USB 设备。
但是你不能将你的计算机的 USB 端口(它已经是其所有 USB 根端口的主机)直接连接到另一台计算机,这完全违反了 USB 的网络拓扑。两个端口都包含 +5 V 电源轨,如果将它们连接在一起,您可能会受到电击。和/或私人烟花表演。或者去最近的主板和/或 PSU 零售商...
另外,由于 USB 非常动态等等,我认为如果重复输出另一个端口,您不能指望来自一个端口的比特流有意义,因为地址信息等可能会改变。
有 100% 软件 USB 分析器,例如 http://www.usblyzer.com/,但我不太确定像你所描述的那样的代理。
I don't think this is doable out of the box, without extra hardware.
What kind of device can you expect to connect to the "upstream" port of the proxy? Assuming there's a regular device (let's say a mouse, just as an example) on the "downstream" port, the device at upstream needs to be a USB host in order to handle the USB device in a meaningful way.
But you can't connect the USB port of your computer (which already is the host for all its USB root ports) directly to another computer, that's a total violation of USB's network topology. Both ports contain +5 V power rails, and if you connect those together, you're likely in for a shock. And/or a private fireworks display. Or a trip to your nearest motherboard and/or PSU retailer ...
Also, since USB is quite dynamic and so on, I don't think you can expect the bitstream from one port to be meaningful if repeated out another port, since address information etc might change.
There are 100% software USB analyzers, like http://www.usblyzer.com/, but I'm not so sure about proxies like what you describe.
在我的工作中,我们使用了这款 Beagle USB 分析仪。它位于设备和主机之间,不间断地捕获所有流量。它可以在 Windows 和 Linux 中运行,甚至可以使用 USB 2.0 高速端口运行。
http://www.totalphase.com/products/beagle_usb480/
强烈推荐。
At my work we have used this Beagle USB Analyzer. It sits between device and host and captures all traffic without interruption. It works in windows and linux and functions even with USB 2.0 highspeed ports.
http://www.totalphase.com/products/beagle_usb480/
Highly recommended.