Programatically connect and disconnect USB devices in virtual machine - usb

I'm developing automated testing for software which needs to eject and reconnect USB devices automatically at the BUS level, not simply software.
This makes a virtual environment optimum because the virtual hardware can be controlled to emulate such behavior. However, I cannot find a way to do this programmatically through VMWare, VirtualBox, or Zen.
Is this kind of functionality implementable? Thank you!

using VSPhere API, it's soap based web service that can do the same thing as you using VSphere client.
there is a interface called: ReconfigVM_Task may be you can use, see ref at:
Vsphere API Reference

Related

What is the exact function of an USB driver?

On reading many websites, I got confused.
Is the USB driver essential for making the device work? Or is it essential for making it communicate with the OS to do functions such as printing and doing other OS stuff?
To explain my question more clearly -
I am working on developing a USB device, that will communicate with the software i will write.
Do I need to develop a driver for such a system?
or
Do I just need the software program to send the proper messages to the device?
I am assuming your micro controller will be a USB device and your PC will be USB host.
The below diagram is the SW architecture for USB host. Now since your host is a PC, you do not need to worry about any part except the application at the top.
So lets talk about the device. What you need is a device stack which resembles with the host stack below. You can get the device stack easily and port it in your micro controller. But I suppose you need an application in your device too same as the top box of the below diagram which will understand the requests from the host and service the request.
So basically what I am saying that you need two applications and the rest of the components you can get it with some effort.
Regards.

Writing an API to Interact with my own custom hardware?

Suppose I've a custom made hardware which is connected to the computer. I've my drivers installed to communicate with the hardware.Then how can I write an API through which i can access my hardware programmatically(As an example consider accessing oculus rift head mounted device using OculusSDK).Specifically how do i make my API communicate with device drivers to access the hardware using system call interface? If possible explain with an example.
Your hardware driver should implement a way of interracting with user.
E.g., it can be special file(s), which user can open (using standard open(2)) and then call read/write/mmap/ioctl for it. Each such operation actually triggers some driver code, which in case triggers some hardware request.

How to push/show notifications from the guest OS to the host OS in VMware player

I am wondering if there is any way to get VMware Player to blink or show a message in the window title or perform some similar notifying action whenever there is some activity inside the guest operating system.
I run a Windows VM on a Linux box. If I am working on the host OS and an email or IM or any notification appears on a window inside the Windows VM, there is no way for me to be notified of that in the host OS. I am wondering if there is any practical solution to this or if this is an intrinsic limitation of virtualization. Any thoughts? Thanks.
This is an intrinsic limitation of type 2 virtualization, if you're able to get out the virtual machine it means something went wrong in terms of security.
BUT, you can still solve your problem. Both the host and the VM are connected to the Internet (and sometimes connected on the same internal network). You have a common resource, so they can communicate. The easiest solution in your example is to use an external notification service like pushbullet (if you don't mind it to be hosted elsewhere) or pushjet (if you want to self host).

Can you change Windows Mobile Device Centre to use a different network from 192.168.55.0/24 for debugging the compact framework?

I have a piece of software I have written that talks to a web service over it's Wifi connection on a Casio WinCE handheld.
Unfortunately the Wifi network and the network created by WMDC (or ActiveSync) to host the debugger connection clash, they are both 192.168.55.0/24. So I can't have them both connected at the same time.
Does anybody know if you can reconfigure WMDC to use a different address range?
I've hunted through the registry but can't see anything obvious, and Google is not turning up anything useful.
Thanks,
James.
Is the development PC on teh same network as the WiFi connection? If so, I'd abandon ActiveSync/WMDC altogetehr and just use ethernet debugging over the same connection that it's using for the web service calls.

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.