简体   繁体   中英

Redirect data traffic from and to USB devices on Mac OS/Unix/Linux

I'd like to redirect traffic from and to USB devices in an application. Particularly I want to talk to USB dongles.

So for example if a dongle is connected on a USB port, is it possible to get the traffic that is intended to be written to this device? On the other hand, can you simply write data in the same manner?

I don't have any experience so I'd appreciate to get some directions.

BTW, this is not intended to be used in anything illegal ;-)

With "USB dongles" you mean: Software license dongles?

First of all you should know that USB is not a stream of data such as RS232 but a very complex bus transferring a lot of different control and data messages.

On Linux you can use Wireshark to monitor the data on the USB bus. There are similar tools for Windows (up to Windows XP only) but the Windows version of Wireshark does only support Ethernet and not USB. Windows 7 has a built-in command line tool that does the same job.

If you really want to redirect data you might use something like "usbip" that allows sharing USB ports over network. You may simulate an USB dongle device by programming a server that simulates the dongle... However doing this is very tricky and requires a lot of programming experience!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM