I have a device which is configured via a GUI in Windows, with no Linux software available. I need to perform this configuration on a Linux embedded device.

Since the setup procedure is the same every time, what I figure I can do is perform the setup with the Windows computer, capture the USB messages sent, and then just read/write the same messages on Linux. What would be the best way to do this?

I know there are some Windows programs available online that I can use to capture the USB data packets being sent and received, but what would be the easiest way to replicate these packets on a Linux machine?

I know there are usb devices that show up in /dev when you plug in a device, as well as a usb.h library I could maybe use, but I don't know what would be the most straightforward method to accomplish this.

  • I suspect capturing packages isn't enough. If the device works with a closed source driver in Windows and there are no drivers for Linux, it can't be done.
    – user252181
    Feb 5, 2018 at 17:47
  • Perhaps you can use minicom package/software, if the USB device permit the serial comunication.
    – k.Cyborg
    Feb 5, 2018 at 17:52
  • @MichaelBay Why is that the case? If I send the same messages from a Linux machine as a Windows one, will it behave differently?
    – Zephyr
    Feb 5, 2018 at 17:59
  • 1
    @Zephyr COM ports do not behave in one way only. You are asking for a magic operation. Things wont work the way you think they work; please do some research instead of relying on the resident savants group support. Feb 5, 2018 at 18:01
  • 1
    @derobert If USB was not a two-way protocol depending on acklowdgements it could work. At the end of the day we do not know the complexity of the device on the other side and if it is a simple or complex machine. I think we are on the realm of conjectures here. Feb 5, 2018 at 18:06

1 Answer 1


It is doable, but it's possible a simple replay won't work; you may have to invest a bit of brain power and figure out what the messages actually mean. At least to some degree. But as a start, a simple replay is the first thing to do.

This is not an unusual approach, google "reverse engineering USB protocol" or something similar for more info. So don't give up hope yet.

There's libusb which allows you to access USB devices from userspace; it's not that difficult to write your own program for it.

A bit of googling also finds projects like usbreplay.

  • Thank you for the response. I'm going to give it a try and see what happens.
    – Zephyr
    Feb 5, 2018 at 20:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .