What technical specifications are relevant to creating an at-home UnitTest lab? - xamarin

I need to run tests against physical mobile devices, and need to deploy unit tests to many concurrent devices at the same time.
Conceptually, this is similar to the Xamarin Mobile Test Cloud, or Microsoft Mobile cloud... but I need an on-premise equivalent so that I can test Bluetooth and GPS features
I'm looking to test 7 to 14 physical devices all connected to the same USB hub.
Question
How many devices can a single Mac / Windows machine talk to over a single USB port?
What are the power considerations I need to keep in mind while selecting hardware?
Here is a visual example of what I imagine, however this device is focused on charging, not connecting a USB backplane to a computer.

Per USB controller you can have a 127 devices (128 minus the controller), bu I am not saying you can simultaneously have 127 devices communicating to the host and maintain any type of data throughput, that is a different story....
The core USB issue with a lot of devices is the power draw. We use special Y cables that have a data only side and a power only side even when using the so-called "powered" USB hubs.
The really good cables that do this are typically found via companies that cater to audiophiles and as such are typically very expensive and work great but are overkill for this usage. But also avoid the cheap Y-cables where the data-only side is "ungrounded" as you will have data transfer failures. Low quality cables will kill data through-put and have you running in circles chasing test failures.
Consumer external USB hubs are not created equal and wildly vary in their power output and simultaneous throughput across each port. While most will do well with one/two devices talking simultaneously, many start failing when 4-8 devices are all talking. Also trying to cascade them for increasing the number of ports can cause failures across the entire chain. Make sure you have a good return policy where ever you can buying it from.
You did not stated the testing framework, but some Appium info:
For Appium-based Android testing I have use a combination of:
Android<-USB->Host(adb)
8 devices is about the threshold for reliable simultaneously (bi-directional) testing
Android<-Wifi->AP<-Host(adb)
A DHCP server handles assigning an IP to the Android device via MAC address so we can create a static mapping of ports to IPs for remapping via adb
8 simultaneous Appium servers (thus devices) running per Window server/host is about what to expect
This works for about 32/64 devices per dedicated AP.
Remember the AP has to be ~4/5 feet away from the devices for proper signal attenuation
Mobile cloud datacenters use EMI / faraday cages to isolate each mobile device rack where multiple servers, an AP and the devices are installed within each rack
Android<-USB2Ethernet<-Host(adb)
Not all devices support OTG, so this is not always an option, but works great.
A DHCP server is required just like the Android<-Wifi->AP setup
iOS is a totally different can of worms:
4 iOS devices connected to a Mac is about all you can achieve with reliable results.
Remember a separate Xcode Instruments is spun up per Appium server on the host.
Mac Minis work great for dedicated Appium test servers.
In terms of GPS testing, mocking is the easiest way to go. There are hardware devices designed for GPS testing that are use by the top tier app developers (mapping, traffic, avionics, etc..) but for an ad-hoc in-house device lab these are usually way to expensive to purchase and setup (EMI / faraday cages are needed enclosing the device and the GPS injector antenna).
Bluetooth can be a big problem in a device lab due to interference, pairing issues, etc..., having a number of devices in close proximity competing for a single (or more) bluetooth accessory can make the accessories fail to pair with any device. Basically bluetooth testing simultaneously does not work well, but you can use Appium to automate the turning the wifi/bluetooth/airplane mode on/off, but for Android devices this requires that they are all USB connected and not using adb to remap host ports to IP addresses over wifi...

Related

Force USB High Speed EHCI 2.0 hub to enumerate as Full Speed UHCI/OHCI device

In Windows XP SP3 is there a registry key or some setting, maybe even at the device level in the registry, that an EHCI USB 2.0 High Speed hub can be enumerated as a UHCI or OHCI full speed device at the host level?
I am seeing an issue where a USB 1.1 full speed device is deadlocked due to infinitely NAKd split transactions with the transaction translator buffer on a high speed hub. This only happens under certain circumstances the full speed device is connected behind a 2.0 high speed hub only in XP SP3. I have opened an issue with Microsoft and they have confirmed this is a known issue and there is no Hotfix for the issue (nor will one be developed). It has been corrected in Vista+.
If the device is connected directly to the host controller, or has a full speed hub upstream of the high speed hub the problem goes away (because there are no split transactions). So, if there is a way to force the high speed hub to enumerate as a full speed device then it may help us out.
Furthermore, the hardware design is set in stone. Systems have been developed and there is no way to insert a full speed hub chip anywhere in the design, or hook up the devices directly to the root hub. And finally, it is not an option to upgrade the OS on the systems.
After some work and research with help of Microsoft the current conclusion is that there is not a way to do this.
The workaround that we will be using is to perform a PnP reset on the bus to stop the infinite NAKs, then reopen the port to begin communication again. This is not very clean, but it will solve the problem.

TDS NOMAD windows CE5.0 device connects more than two USB devices

I have a TDS Nomad running windows CE 5.0 system. It has a USB host port. I have connected to the manufacture and ask if nomad can connect to more than 1 USB devices via USB hub (can connect to 7 USB devices, designed for windows ), they said they haven't tested to connect more than one USB device. If more than one devices is connected to nomad, there mightbe resource conflict.
The nomad works well with one USB device connect to it individually.
But I have a console application debugging in nomad using visual studio2005 and active sync.
I need to talk to both USB devices. Therefore I have to use USB hub. But it doesn't work most of the time. I think the drivers of two USB devices are all correctly installed on nomad.
But what I want to ask, is that has anyone tried to connect more than one USB device to windows CE product via USB hub and both of them works well ?
I'm slightly confused. here. You say the device has USB host and you want to connect more than one client device through a hub. This is definitely supported by the OS, and I've done this with several devices from several manufacturers, though never with a Nomad. Not sure what the OEM is talking about with "resource conflicts" as the USB spec itself allows for multiple devices (kind of the whole point behind a "bus").
But you say that your second "device" is the debugger. That isn't a USB Host connection from the device perspective, that's a USB Client connection, and it typically uses completely different hardware and drivers for that connection. Can a device have both a host and a client connection? Again, yes I've done this with many devices (but not a Nomad) and the OS fully supports it.
Now maybe this is USB OTG hardware (though back in the 5.0 days I doubt it) and the OEM didn't do the design well to handle a client and a host at the same time. Maybe the physical hardware is laid out poorly or the OAL portion of their USB driver is poorly done and can't route properly through a hub properly (I've definitely seen that before). Hard to say.
A USB Analyzer would tell you a whole lot about what's actually happening and where the problem is, but it is definitely a supported scenario by both the USB spec and the OS. If it's failing, it's a manufacturer/device-specific problem.

Run multiple webcams at a time using DirectShow

I'm using Windows 7 OS. working with Visual Studio 2010. Here I'm usng DirectShow2005-Lib.dll.
Here I'm able to run two webcams at a time. But when I'm going to connect and run the 3rd webcam .. I'm not able to run all the three at a time. I can run only two at a time.
and getting an error : No combination of intermediate filters could be found to make the connection.
How can I run multiple webcams at a time using DirectShow?
USB bandwidith is a limited resource and you cannot run too many cameras. Sometimes, in some modes, you can run only one camera at a time.
See:
Two webcams on one usb hub - bandwidth issues
2 usb cameras not working with opencv
Implications of using many USB web cameras
The problem is solved. I have used PCI Card USB Slot. Two cameras connected to the PCI USB slot and one to normal USB slot. Thus all the three cameras are running simultaneously at the same time.
We can also use USB Hub for this.
Some (most?) drivers I've encountered don't allow multiple instances to be loaded. As you already have 2 loaded, this is unlikely to be the case, but this is for future reference.
I’ve noticed 2 instances when I receive the same error:
1)I’m trying to connect to a web cam that is already running a graph. (most webcam drivers can only have one instance open, like Deana mentioned)
2)You’re connecting to the wrong pins or you need to set up a smart T filter for that particular camera.
Are you using the same cameras (if so be cautious of not running the same one twice)?
USB bandwidth won’t be an issue if your pumping out low resolution, but if your frames are over 3MP you could run into issues only if you’re running off the same USB port…
Step through the graph, where exactly is it failing?

Can I still manage to develop on Windows Phone even with limited hardware on a development machine?

I have been long interested to develop on the platform. I even got the tools installed already on my desktop but I can't upgrade my WDDM from 1.0 to 1.1. To make things simple: my graphics chips are not up to the task of running the emulator.
If I still buy a Windows Phone (e.g. a Nokia Lumia) for development purposes, can I sideload and test my apps there efficiently instead of going against the emulator?
If I still buy a Windows Phone (e.g. a Nokia Lumia) for development purposes, can I sideload and test my apps there efficiently instead of going against the emulator
Yes, of course. It's very easy and convenient. You have debugger and all the goodies. Advantage of the emulator is the test option for 256MB devices.
That's exactly what I used to do prior to upgrading my devstation. The nominal min spec says 3G but with a real phone it worked fine in 2G and as you say this also sorts out graphics limitations.
Note that the setting for whether the emulator or physical device is used is stored in the project, so if you accept a project from someone else you will have to set it once prior to debugging.
Well there are 2 sides of the coin. With the physical device you can test most of the things, but with a few limitations
You will not be able to test internet related test cases - For example, if you have an app which uses internet connectivity then you will not be able to test it on the device easily because
The device does not use the machine internet connectivity
When connected to the PC the device's internet connectivity(Data connection 3G/ wifi/GPRS) is broken.
You will have to purchase an account right from the first day you want to test your app. If you have the emulator working then you could postpone this for atleast few days.

Connect multiple (two) windows phones to the computer at the same time and develop

I'm developing an app on windows phone that simply can't work without at least two phones (Two phones need to see each other through wireless network and act together. And I use an API that is not properly implemented on emulator).
Unplug the first one and plug in another repeatedly as I'm modifying the code and watching changes on the phones is painful.
Is it possible that I connect two windows phones, and make them work, at the same time?
Unfortunately it's not possible to connect multiple phones to the same PC at once. The connection used by Zune (or WPConnect) only works with one device at a time.
I've been in a similar situation to you (debugging software on multiple phones at the same time--as they talk to each other) but there's no way round this.

Resources