Usb Serial Emulation

4/4/2019

The rest of my team will make for my application a simple non-standard USB microphone, but until they finish it I will have to emulate it, for integration testing purposes.

  1. Is there any risk in a physical loopback?Yes there is
  2. Will a physical loopback work? Only with a USBbridge
  3. There is any way to create a logical loopback? (MSDN has something about this)
  4. There is any general purpose USB emulator software?

In case there is many options available I'd rather work it .NET/Matlab/Python solutions.

Community
Jader DiasJader Dias

2 Answers

Edit: Proof of concept here

I strongly recommend this project, USB IP. It is a way of connecting USB devices over the network. There is a Windows client.

What this means is, you install the client on your Windows computer.This device then expects to talk to a USB device connected to a Linux computer, the server:

What you now do, is either create a fake device driver for Linux, that looks like is connected to a physical USB device, but in reality is just logic pretending to be your USB device. There are tutorials for writing USB drivers for Linux. Or you create your own stub driver for the Device Control Manager (see picture above). This stub driver could run on Windows or Linux, it wouldn't matter. It could even run on the same Windows machine which is the USB client.

The DSF USB Loopback Device mentioned in the question itself, would be the same kind of solution as a stub driver for the Device Control Manager, but taking Linux out of the picture altogether.

Prof. FalkenProf. Falken

You can write virtual USB device using QEMU.You can duplicate already existing device, like the dev-serial.c found in this QEMU repository and change it for your needs.
After you write and compile your USB device you can simply attach it to your VM using the QEMU command line interface.

Yaron ShaniYaron Shani

protected by CommunityOct 19 '18 at 5:44

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Kumpulan game untuk laptop. Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged usbemulationdevice-emulation or ask your own question.

I think that this is a core windows problem with serial port emulation
devices, so not sure if emulating a different serial port device will help
unless that results in a totally different driver being used (which may be
the case with ftdi custom drivers).

Systems with the serial port open at the point where the hardware
reboots/reinitialises never have the serial ports closed, but also never
recover when it comes back online - windows just seems to orphan the port /
file handle.

You see exactly the same symptoms when connecting to a bluetooth device
over spp and reboot.

On 17 October 2015 at 08:13, Arakon notifications@github.com wrote:

The problem is actually that both windows and configurator don't
disconnect when the device reboots. Both keep acting as if it was still
connected and just not responding.
This is definitely a windows issue and the reason why emulating a
different device might fix this since it seems specific to the VCP driver
used.


Reply to this email directly or view it on GitHub
#889 (comment)
.