Author Topic: Software only USB Analyzer and Hardware USB Analyzer.  (Read 7919 times)

ChongHan

  • Member
  • ***
  • Posts: 41
Software only USB Analyzer and Hardware USB Analyzer.
« on: May 05, 2014, 11:54:21 am »
Hi, good evening.

How to choose between hardware USB analyzer or software USB analyzer? I program in both host application and device's firmware that allow device notification transaction packet to send from device to host. Is that enough to use software only USB analyzer to track the activity and debug the error?

Thanks.

Best Regards
Chong Han

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #1 on: May 05, 2014, 03:17:30 pm »
You can develop some devices and host software using only a software analyzer, but a hardware analyzer will save time. Some software analyzers are free and thus easy to try out.

This is from USB Complete:

A hardware protocol analyzer is a piece of equipment that captures the signals
in a cable segment without affecting the traffic in the segment. The analyzer
connects in a cable segment upstream from the device under test.

To enable viewing the captured traffic, the analyzer connects to a PC or logic
analyzer. A connection to a PC may use USB or another port type such as
Ethernet. Instead of a PC interface, some protocol analyzers connect to logic
analyzers from Agilent or Tektronix.

With a hardware analyzer, you can see the data in the cable down to the individual
bytes that make up each packet. There’s no question about what the host
or device did or didn’t send. For example, if the host sends an IN token packet,
you can see whether the device returned data or a NAK. You can view the packets
in every stage of a control request. Time stamps enable you to see how often
the host accesses an endpoint.

A software-only protocol analyzer runs on the host computer of the device
being tested. You can view traffic to and from any device that connects to any of
the computer’s host controllers.

A software analyzer can display driver information that a hardware analyzer
can’t access. Windows drivers communicate with USB
devices using I/O Request Packets (IRPs) that contain USB Request Blocks
(URBs). A software analyzer can show the IRPs and URBs that a driver has submitted
and the responses received from a device.

Software analyzers don’t show anything that the host-controller or hub hardware
handles on its own. For example, the analyzer won’t show how many times
an endpoint NAKed a transaction before returning an ACK or the precise time
a transaction occurred on the bus.

Some software analyzers use a filter driver that loads when the operating system
loads the driver for the device being monitored. Because the filter driver doesn’t
load until the host has enumerated the device, the analyzer can’t show the enumeration
requests and other events that occur at device attachment.

Protocol analyzers

http://janaxelson.com/development_tools.htm#analyzers

USB Complete

http://janaxelson.com/usbc.htm

ChongHan

  • Member
  • ***
  • Posts: 41
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #2 on: May 05, 2014, 10:10:54 pm »
For USB hardware Analyzer, all type of data packets, Isochronous Timestamp Packet (ITP), and any other packet can be clearly view and monitored. We can even exactly see the precise time of every packet transaction in the bus interval. Besides that, we can also view the length of a bus interval and also to see what transfers are in bus interval at any time.  Am I right?

Then for USB software Analyzer, It only can be used for host side, mean that only transaction or request in driver level can be captured. For any data packet, ITPs or other packet can't be viewed by software Analyzer. While for the Bus Interval's length or what transfers in bus interval also can't be captured. Am I right?

If really correct at my understanding, do you have any recommended cheaper Hardware Analyzer for me? Since I am a student only and can't afford the price of analyzer that on your website.

Best Regards
Chong Han

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #3 on: May 06, 2014, 12:22:33 am »
A hardware analyser tells you exactly what's going on on the bus. The software analyser only tells you what the host driver wants to do, not what actually happens. The software analyser also can't tell you about failed transactions and errors on the bus. For developing device software, or driver software on a stable host you might be able to get away with a software analyser, but a hardware one is better. If you're developing hardware or host system, you really need a hardware analyser.

What speed are you wanting to analyse? If you only want full speed, the Beagle http://www.totalphase.com/products/beagle-usb12/ is the cheapest you can buy.

For high speed I like the LeCroy Mercury T2 starts at about $900 http://teledynelecroy.com/protocolanalyzer/protocoloverview.aspx?seriesid=414&capid=103&mid=511

If you need SuperSpeed, since you mention ITP, the LeCroy Advisor T3 works pretty well starts at $3600. http://teledynelecroy.com/protocolanalyzer/protocoloverview.aspx?seriesid=280&capid=103&mid=511

ChongHan

  • Member
  • ***
  • Posts: 41
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #4 on: May 06, 2014, 01:13:52 am »
Hi

Thanks for your suggestion. I will look into the Advisor T3 and see the quotation from them.

Btw, for viewing the all transaction packet, data packet, ITPs, we need to use hardware to analyze it. If we using software, can we see through these packet?

I am programming in device's firmware to build some algorithm and function in it, while i will program a host application for user to communicate with device. I will use ITPs and some transaction packet for my project. The peripheral controller I am using now is from Cypress FX3S. So Hardware Analyzer is the most suitable or Software Analyzer is enough for me?

Best Regards
Chong Han

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #5 on: May 06, 2014, 11:11:16 am »
As I mentioned, you can try out the free software analyzers and find out if they are sufficient for your needs.

To understand the difference, think about what the analyzers consist of. A hardware analyzer connects on the bus between the device under test and the host, so the analyzer can see anything that happens on the bus. But it knows nothing about the drivers' IRPs and URBs in the PC.

A software analyzer is inside the PC so it can only see what happens at the PC level - how the drivers are managing communications - but not the low-level transaction details on the bus.

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #6 on: May 06, 2014, 06:16:02 pm »
You might be able to get away with a software analyzer. The FX3 is relatively stable, so if your software makes a transaction it will probably make it onto the bus. The software analyzer on the host can only tell you what transfers the host sees. It can not see packets, it can only see the successful transfers. That may work for you, until it doesn't. If it doesn't work for you, you'll need a hardware analyzer.

As you're talking ITP, I'm assuming you're doing Isoc and that timing is somewhat important to you. That sounds like a job for a hardware analyzer.

ChongHan

  • Member
  • ***
  • Posts: 41
Re: Software only USB Analyzer and Hardware USB Analyzer.
« Reply #7 on: May 07, 2014, 11:54:29 pm »
Thanks so much for all your value advices. I will test on free software only USB Analyzer then if it can't meet my expectation, then I will go to Hardware Analyzer.

Thumb up again for this forum! :)

Best Regrads
Chong Han