Is it possible to forward host USB devices to EDK2's NT32 emulation platform? - usb

I'm a bit new in UEFI driver development.
I have an UEFI application-bootloader that checks all USB tokens that are currently present in system. It works ok on hardware and Vmware VM, but I would like to test in NT32 emulator from EDK2 to be able to use source-level debugging.
Vmware has required feature for forwarding any removable device from host to VM. I try to do the same for NT32.
Have anyone worked on this issue before? Is it possible to forward USB token? Or maybe this token can be emulated somehow?
Continuous searching haven't gave me much information.
I suspect that it can be done with some tricky settings in package file Nt32Pkg/Nt32Pkg.dsc.
Possibly gEfiNt32PkgTokenSpaceGuid.PcdWinNtPhysicalDisk or gEfiNt32PkgTokenSpaceGuid.PcdWinNtVirtualDisk parameters can be useful, but I'm not sure.
Thanks everyone in advance for your efforts.

Related

Make virtual copy of a device

I have a weird question. I would like to make a virtual copy of a device. In order to test some software I want to make a mirror copy of a particular scanner. Now I know there are some virtual TWAIN scanners out there, but I want Windows to recognise it as a particular brand and type just so I can test the particular software that comes with it.
I.e. I have an HP scanner plugged in, I want to make a mirror copy of it, unplug it and windows will still detect it as plugged in and operating normally so I can open the scanner software and driver. My goal is to make this virtual device stick, even on reboot. Is there any way this can be achieved? I'm happy to load the device data on an USB drive if that works as workaround.
I hope you guys can help me!
Cheers,
Jasper
You probably could do that by writing your own kernel-mode Windows driver that pretends to be a USB hub and pretends that it has a device plugged in to it which is a virtual scanner. Writing Windows drivers usually involves a lot of arcane C programming and it is unlikely that anyone will be able to tell you everything you need to do on this type of site.

How to power off USB device from Windows using batch or any API

For testing purposes I need to power off a USB device from my computer programmatically. The microprocessor in the USB device is ARM Cortex M4.
I have tried using Devcon, although the device was disabled, power was still provided to the device.
I have also tried to disable the USB root hubs ,that also didn't work.
I have read some other posts indicating that a SSR could be used, this option is not desired. I would rather choose the software solution(if there is one of course).
Some other answers have indicated that this is an OS issue, and some others a chip-set architecture issue.
So my question is what options are there available. And also is this purely something dependent on the computer side or do we need to implement something on the USB device side as well.
Thank you in advance.

Kodak i1120 network Scanning

i am having a problem with this Scanner (Kodak i1120). I have a thinclient with an active rdp session. The thinclient can Scan without any problem but the rdp session can not. I have tried multiple Software and multiple protocols (TWAIN and ISIS) but can not make it work. Have anyone does something similar in the past?
I would appreciate all the help i can get....
Thanks!
If you're using RDP, look into Microsoft RemoteFX USB Redirection (you need an RDP 7.1 client for it to work).
This will allow your RDP session to access the USB device connected to your thin client. It does require installing the scanner drivers on the server for it to work properly.
You can also look into other networking options, like Silex...

Is there any way to programmatically tell a USB modem to reset?

I have a USB modem on a server which occasionally needs to be turned off/on again to receive SIM updates and I can't reboot the server as we rely on it to serve various web pages.
Is there any way to do this programmatically? An AT command? Power down the USB port?
I don't always have access to the server so unplugging it and plugging it back in isn't an option unfortunately.
We're coding in C++/CLI if that makes a difference.
It would be great if someone knew of a generic solution to this, but for the Option Globetrotter 452 I'm using, the manufacturer reports that issuing an AT_ORESET command will instruct the device to reboot ...just in case anyone else wants to do this.

How to use USB over Remote Connection to a Virtual Machine

I'm trying to do mobile application development (BlackBerry, Android) on a virtual machine. My idea is that no matter what desktop I'm on I can open a remote connection to the virtual machine and have my mobile development environment ready. The problem is that I would like to deploy code to the mobile device as if it were physically connected to the virtual machine. Ideally the devices will be plugged in to the client machine that is creating the remote connection.
I'm currently using VMWare workstation to manage my virtual machines, I've done a bit of research to see what the best solution for connecting my usb devices over the network is.
There are a multitude of pricey USB over network solutions that may or may not work for what I'm trying, but I would like to avoid those. I would be interested in a free open source solution where both the usb host and usb client are windows machines. This is close to what I am looking for http://usbip.sourceforge.net/, but you can't host a device from Windows.
It appears that I may be able to do this with a Hyper-V VM and RemoteFX through Microsoft RDC, but I would like this to work on my existing VMWare VM.
The quickest solution I've found is a network usb hub that would allow me to connect the devices over the network, but this would force me to be attached to the hub which is a problem if more people come on my project.
Ideally I'm looking for an existing software solution to my problem. Any suggestions?
Also can anyone confirm this would work in Hyper-V using RemoteFX?
I would consider porting your VM over to VirtualBox from Sun (now Oracle) they have remote USB support out-of-the-box, and are very stable.
I've ported machines the other way (for work) and it's not difficult.