How to view bushound content

Source: Internet
Author: User
turn from click to open link

Positioning of USB mobile devices

Typical USB devices can be categorized into five categories: monitors, communication devices, audio devices, human-computer inputs, and mass storage.

And the mass storage also contains two parts: transmission mode and control mode.

The main transmission methods are: CBI transmission and bulk_only transmission.

The main control methods are: ATA command and UFI command specification.

CBI means: Control/bulk/interrupt. Therefore, the bulk_only transmission can be seen as a transport that is included in the CBI.

For USB mobile devices, the use of Bulk_only transmission mode, that is, the bulk transfer mode. Also, USB mobile devices comply with the UFI command specification.

For the CBI transport and ATA command blocks, it is primarily used for the management of hard disks.

In the BusHound6.0 watch PC-connected device, you can see a more detailed classification.

In addition to some familiar devices, Bushound shows two main concepts: hub and controller.

USB controller and hub

Read any document related to the USB protocol and see a classic pyramid chart that tells you the relationship between the controller and the USB device. Describe the figure in words like this: "A usbcontrol under a roothub, a roothub can be connected to multiple hub or USB devices, if the hub is connected, the hub can also be connected to the hub and USB devices ...".

However, not the number of connected layers can go on indefinitely, and the number of devices is not unlimited. The USB protocol does so, with Roothub as the starting point, the number of layers can not be more than 7 layers, which means that any one USB system may allow up to 5 USB hub cascade. A composite device (Compounddevice) will occupy two or more layers at the same time. No more than 127 devices (including USB devices and hubs). the reason for not exceeding 127 devices is that the USB controller uses only 7Byte to record the device address.  

Also, it should be noted that there is only one roothub under a USB controller, and all devices that need to be connected to the USB controller are connected directly or indirectly to the Roothub. The Roothub is actually a special USB Hub that is integrated in the USB controller and therefore does not occupy the address. That is, a limited 127 device does not contain Roothub.

There is also a concept that does not appear in the above image, but it is very important, that is: EndPoint.

EndPoint

EndPoint, Chinese name: endpoint, commonly used abbreviation EP.

Endpoint generally followed by a serial number, such as EndPoint0, EndPoint1, EndPoint2 ...

In general, we often say that a endpoint input and output, in fact, refers to a set of endpoint, because a single endpoint actually only the input or output function, that is, it is single-direction.

A group of endpoint communication (or data transmission), which creates an "invisible" channel called a pipe.

In EndPoint0, EndPoint1, EndPoint2 ... , EndPoint0 is the most special, because it is defined by the USB protocol as the default endpoint, that is, no matter what USB device, regardless of how many endpoint,endpoint0 the USB device is always necessary, it is used to control the transmission of the command. In the BusHound6.0, you can see the command sent by ENDPOINT0 in addition to data transmission, are CTL.

The channel between EndPoint0 is called the default channel.

As shown above, 0 of the red circle indicates that the current communication is EndPoint0 communication, and the CTL command is used to obtain the device descriptor. The red Circle 2 indicates that the current communication is EndPoint2.

Other

The use of Bushound is simple and does not require much introduction. But there are a few notes:

1. If you need to observe a more comprehensive message interaction, you need to select the upper layer of the USB mobile storage device. For example, you need to review the ENDPOINT0 enumeration process.

2, the front said that USB mobile storage is using the UFI command specification. UFI is a thing.

You can generally think of UFI as a subset of SCSI commands.

The UFI contains three word-length commands: 6bit, 10bit, 12bit, usually using 12bit under window.

The SCSI commands contained in the UFI specification are as follows:

Instruction Code

Directive Name

Description

04h

Format Unit

Format a storage unit

12h

Inquiry

Request device Information

1Bh

Start/stop

Load/unload

55h

Mode Select

Allow host to set parameters on external devices

5Ah

Mode Sense

Transfer parameters to host

1Eh

Prevent/allow Medium Removal

Write protection

28h

Read (10)

Host reads binary data from storage media

a8h

Read (12)

Ibid., More detailed

25h

Read capacity

Require device to return current capacity

23h

Read Format Capacity

Querying current capacity and available space

03h

Request Sense

Requesting the device to return execution results and status data to the host

01h

Rezero Unit

return 0 Tracks

2Bh

Seek (10)

Assign a device to a specific address

1Dh

Send Diagnostic

Perform a firmware reset and perform diagnostics

00h

Test Unit Ready

Requesting that the device report is in the Ready state

2Fh

Verify

Validating data in storage

2Ah

Write (10)

Write binary data from host to media

AAh

Write (12)

Ibid., More detailed

2Eh

Write and verify

Write binary data and verify

3. For mass storage, the command labeled "" must be responded to. Of course, mass storage includes USB Removable storage devices, so USB Removable storage devices must also respond to these commands.

4, the 3rd above, for the mass storage device commands, some of the command code is repeated definition will not cause communication errors, because they are not called by the system at all.

5, in fact, careful, review the above figure, will find whether it is USB Controller, Roothub or USB device, its address is incremented, that is, will not be repeated. At first I thought a PC might have multiple USB controllers, and later I ventured to speculate that a PC (or a motherboard) had only one USB controller. Note: Of course, if this address is only bushound, then all speculation is meaningless. 】

Later, the internet looked up, the truth.

Before the USB2.0 came out, there was only one usbcontroller on a motherboard, the controller of USB1.1. USB2.0 out, in order to support the USB2.0, only support USB1.1 motherboard on the additional USB2.0 adapter, but this adapter and Usb1.1controller are independent work, non-impact. And in the USB2.0 behind the design of the motherboard, there is only one USB controller, you can also be said to be Usb2.0controller, but this USB2.0 controller is to support USB1.0 and USB1.1 , That is, FS and LS are compatible.

Then again, I made a speculation, for the motherboard of the only USB controller, it has already divided the address, the first to divide the address of each child controller, and also indicate that the controller will be used to connect which devices. The next address is then assigned to the roothub of each child controller, then the hub and USB Removable storage devices. Of course, how to divide, is not such a division, but also specify the purpose of each sub-controller, for different motherboards should have their own different provisions. Thus, from this speculation to get a speculative conclusion, a PC can make the user external USB device cannot have 127.

6, from the Protocol Analyzer can see Bushound display controller is what type of USB controller.

Host Controller Interface (HCI) is a Registerlevelinterfacewhich allows Ahost controller Forusb orfirewireto communicate with theoperating System of apersonal computer.

Open Host Controller Interface, orOHCI, is Anopen standard.

Universal Host Controller Interface (UHCI) was created by the Intel FORUSB 1.0 (full and low speeds).

Enhanced Host Controllerinterface (EHCI) is a high speed controller standard which is publicly specified. The usb-ifinsisted for USB 2.0 instead of have a different standard forpci-based USB interfaces, which would hav e increased complexity and thereforecosts. Intel hosted the EHCI conformance testing, which helped to preventdivergence from the standard.

7, the USB protocol stipulates that the extension of USB cable can not exceed 5M, so in actual use, it is best to use a short and thick USB extension cable.

8. Parsing data: A3 00 00 00 01 00 04 00
A3: Other type of request = Device to host, 00: Specify command =get STATUS, 00 00: value 0, 00 01: Device, 00 04: Length 4

To view the data of the communication, you need to check in and out two on the settings screen.

9. Measuring the data transfer rate with Bushound

The display of command response time can be checked in the Setup interface.

10. As long as the USB port and the host side of the communication data, Bushound can catch. The length of the data area can also be set.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.