Tuesday, August 9, 2016

4 Ways to Survive in a USB Testing Environment


Cambrionix' latest blog was interesting:

"When a USB device such as a tablet or phone is developed it needs to be tested before its released on sale to the public. Both the hardware and the software running on the USB device are likely to be deployed in extremely large volumes so this testing needs to be thorough, both on the software and hardware.





Android and iOS operating systems require thorough testing before being released – Cambrionix USB hubs offer a reliable solution

When a company is performing product testing on a new Android or iOS version, they need to ensure that it is robust when running on the intended target devices. This typically means that the developer would require a large number of their target devices (for example tablet devices) running the new software version for a period of time whilst running in-house test scripts which exercise the software features. This is fine but it can become a bottleneck for software teams when they need to perform testing many times per day with many different software versions over many different target devices! Even a small software change to an iOS or Android build needs to be tested regardless of how long it takes!

The way companies connect the target devices to their test systems can vary from simply hooking them up to large USB hubs right up to accessing PCB test pads or debug interfaces right at the hardware level.

Since ‘test pads’ and debug interfaces can be proprietary to a manufacturer or device, we will look at the use of USB in a software test environment. USB is still the worlds most popular interface for mobile device charging and connecting mobile devices to other ‘stuff’. It’s also the most popular way of connecting a target device to a software test system.

An example test system with 16 tablet devices

So, here is a scenario. A company wants to distribute software testing to each software engineer in their department. This is to allow each software engineer to perform some level of testing on their code prior to a full soak test. The company has decided that performing testing of their code on 16 of the target devices (say, iPads) gives them a reasonable level of confidence with which to move to the larger, more time consuming test.

So there are 4 ways that they could achieve this connectivity. 

 Option #1: Standard USB hub from your local store

Although this may appear to be a sensible and low-cost solution it does have some major shortcomings. Off-the-shelf USB hubs (whether they be USB2.0 or 3.1 etc.) tend to be designed for casual use at home and aren’t designed mechanically or electrically for a 100% up time environment. They lack the ability to power many USB target devices and even if they do manage to get the devices to ‘power-up’ they cannot be relied upon to maintain or increase a level of charge within the battery in the target device. An example of this effect in action is demonstrable with the Apple iPad Air. The iPad Air will, with a standard USB hub, consume 2.5 Watts (5V @500mA) since this is what all standard USB ports are required to offer. This power will be used to charge its internal battery (extremely slowly!) unless there are other things happening on the iPad – video for instance. In our laboratory testing, we have found that an iPad Air requires 5V @1.5A (9 Watts) in order to simply maintain battery level during video playback and the battery level only starts to increase when we reach 10 Watts. What this means is that if you are performing tests on the iPad which require the display to be ‘on’ and the processor to be doing ‘stuff’ then you need a USB hub which can offer at least 10W (5V @2Amp) per port.



Choosing a cheap USB hub has many downsides… not charging or syncing data properly can be the least of your worries!

Now, there are hubs which offer this but they don’t all offer this on whats called ‘charging downstream ports’ (CDP ports). So, regardless of whether the USB hub claims to offer a decent amount of power, the iPad still thinks its connected to a standard USB hub and as a result it will do things ‘by the book’ and consume only 500mA from the port. You’ll be able to do some of your testing on your target devices but its likely to be short lived ie. until the battery runs out!

Aside from the power, mechanics and reliability an off the shelf USB hub offers no additional features which are applicable to industrial users who wish to test their products. No control or monitoring, no API for writing test scripts in Python or the likes, no port protection to ensure your target devices cannot damage 1) The test system and 2) Other target devices and 3) Themselves!

Closing comment: You’ll regret choosing this option soon after choosing it!

 Option #2: Industrial USB hub.

 A significant step-up from the last option would be to use something like the U16S (or PowerPad) from Cambrionix. The U16S allows the user to connect 16 USB devices at once and be able to offer each of them 10W each simultaneously. Ports can be switched into different states, charger and host connect/remove cycles can be emulated, USB ID’s can be logged, charging current over time can be monitored, charging downstream port support etc etc. Not to mention the Cambrionix API which allows you to develop testing scripts to assist your workflow!

What this all means is that the U16S can become an integral part of your test system rather than an add-on which offers little value. Another clear benefit of the U16S is the ability to use the Cambrionix API to control a number of output and input pins (GPIO) on the U16S. These can be used within your test system to control other components within the testing setup such as relays, triggers for test equipment or an LCD or LEDs for user feedback.


The Cambrionix U16S has it all – Very Intelligent Charging (VIC) up to 2.1A per port, data synchronisation, API integration and an LED overlay to boot!

Tens of thousands of the U16S products have been deployed into mission critical operations around the globe covering industries as diverse as healthcare, military, aerospace, education, cellphone and mobile device manufacturers.

Closing comment: A professional solution to a problem which professionals have!

 Option #3: Networked USB hub.

A product such as EtherSync from Cambrionix allows a user to perform all the functions shown above in Option #2 with one difference being that its a little more involved should you wish to trigger external devices with GPIO – you would need to discuss this with Cambrionix should you wish to use additional GPIO (although there is the option of using spare USB ports as triggers by switching VBUS via our API). The other difference between the U16S and EtherSync is that EtherSync doesn’t use USB as the host interface, it uses Gigabit Ethernet.

What this means is that you can setup your USB device testing in another room (or in some instances, another country!) and be able to access those USB devices under test as if they were on your desk!


Cambrionix EtherSync – Manage USB devices via an Ethernet connection from anywhere in the world!

The benefits of this are that you can work at home and still have access to the test rig in the office/lab. It also means that the test rig can be shared by any number of users on the network. When someone needs it they can connect to it, do their work, and then disconnect. This will then free-up the EtherSync and its connected devices for others to use.

EtherSync runs a version of Linux on its embedded computer and it is very configurable. It can be adapted to fit just about any scenario you could imagine when it comes to your test environment, we are also developing our API to support EtherSync.

Closing comment: Save capital expenditure on target devices and share them between engineers over your Ethernet network.

 Option #4: Thunderbolt to USB hub (ThunderSync16 from Cambrionix)

 ThunderSync16 is, by quite some margin, our fastest product to date. It allows you to connect 16x USB2.0 High-Speed devices and present them to an OS on a host computer. But, ThunderSync doesn’t use USB or Ethernet for the host interface, it uses Thunderbolt 2. Thunderbolt 2 is an Apple/Intel designed interface for high speed data transfer. It’s a 20Gbps interface which is a little over 40x (yes, forty!) faster than USB2.0 HS.


ThunderSync16 – The World’s fastest USB Hub!

Now, you may be thinking how this 20Gbps host interface can speed-up testing on USB2.0 devices (480Mbps)? Well, this is because we can gain access to the PCIe bus via Thunderbolt. This allows us to add multiple USB2.0 host controllers (not hubs) to our design which can handle 480Mbps without any bottlenecks when compared to taking a USB2.0 (480Mbps) host interface and dividing its bandwidth between 16x USB2.0 devices, which is what happens when you use USB hubs rather than host controllers.

So, if you need to flash a few Gbytes of new operating system on a large number of tablets (a number of times per day!) for testing purposes, you can now do this at around 15x faster!

This time benefit equates to faster software releases, cost savings and a much smoother workflow.

As with most of our products, you can daisy chain multiple devices together to increase connectivity beyond just 16x devices. ThunderSync is also supported by our API for scripting.

Closing comment: Very high-speed, professional option for saving your company test-time and money.

Conclusion

There are a number of different ways to hook-up your target devices to a host for testing purposes, each with their own unique benefits. Super-high-speed connectivity comes at a cost but can ultimately save time and money in the short term. Low cost solutions are available but can ultimately lose money due to reliability issues and being used in an environment which they aren’t designed for.

We have summarized the options in the table below:

Product
Speed
Host Interface
Notes
API Support?
Off the shelf hub
480Mbps
USB
Generally not suitable for 100% uptime test environments. Lacking power and features
No support for an API, port control or monitoring of any kind
U16S
480Mbps
USB
Full featured, designed for 100% uptime and full rate charging. Configurable GPIO.
Full API support. Can be an integral part of a software/hardware test system.
PowerPad
480Mbps
USB
As above but without the configurable GPIO.
API support minus the configurable GPIO.
EtherSync
1,000Mbps
Gigabit Ethernet
Target device sharing, network connected USB appliance.
API support.
ThunderSync
20,000Mbps
Thunderbolt 2
Incredibly high-speed device for professionals.
Full API support.


Part 2 of this post will cover some scenarios where large numbers of target devices (32 and upwards) need to be connected to a system or host. " 


1 comment:

Unknown said...

Hi! I'm Doris from Eltima Software. I want to contact you about our software solution coomon to EtherSync you describe. Contact me on doriss.lane@eltima.com for more details.