[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115328837B - Method for supporting USB2.0 ultra-long distance transmission - Google Patents

Method for supporting USB2.0 ultra-long distance transmission Download PDF

Info

Publication number
CN115328837B
CN115328837B CN202211007402.5A CN202211007402A CN115328837B CN 115328837 B CN115328837 B CN 115328837B CN 202211007402 A CN202211007402 A CN 202211007402A CN 115328837 B CN115328837 B CN 115328837B
Authority
CN
China
Prior art keywords
box
host
response data
transaction packet
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211007402.5A
Other languages
Chinese (zh)
Other versions
CN115328837A (en
Inventor
关宇航
李对峰
赵建立
姚维久
李厚鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Digibird Technology Co ltd
Original Assignee
Beijing Digibird Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Digibird Technology Co ltd filed Critical Beijing Digibird Technology Co ltd
Priority to CN202211007402.5A priority Critical patent/CN115328837B/en
Publication of CN115328837A publication Critical patent/CN115328837A/en
Application granted granted Critical
Publication of CN115328837B publication Critical patent/CN115328837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention belongs to the field of data transmission and data processing, in particular relates to a method for supporting USB2.0 ultra-long distance transmission, and aims to solve the problem that the prior art cannot realize the long distance transmission between a USB2.0 host and USB2.0 equipment. The method comprises the following steps: after detecting that the device is electrified, the RX box completes negotiation with the USB2.0 equipment according to a set negotiation flow; after the negotiation is completed, the RX box sends a network data packet to inform the TX box through the Ethernet; after the TX box receives the notification, the simulated USB2.0 equipment is connected with the USB2.0 host, and negotiates with the USB2.0 host according to a set negotiation flow; after the TX box and the USB2.0 host are successfully negotiated, the USB2.0 host performs data transmission with the USB2.0 device through the TX box and the RX box. The invention greatly prolongs the transmission distance between the USB2.0 host and the USB equipment.

Description

Method for supporting USB2.0 ultra-long distance transmission
Technical Field
The invention belongs to the field of data transmission and data processing, and particularly relates to a method for supporting USB2.0 ultra-long distance transmission.
Background
With the continuous progress of technology and the continuous development of society, the USB2.0 technology has excellent speed, flexibility, support for hot plug and other characteristics, so that USB2.0 devices are increasingly applied in production and life, such as a USB disk, a keyboard mouse, a USB camera and the like, which are used in daily life. When the USB2.0 device is applied, a distance is sometimes reserved between the USB2.0 device and the host, and long-distance transmission of the USB2.0 signal can be realized by using a USB2.0 extension line or by using an Ethernet medium to carry out transmission mode on the USB2.0 signal.
Because the attenuation of the USB electrical signal on the wires, the common USB2.0 extension line is usually not more than 10 meters, and some wires plus a signal amplifier plus double power supply are not longer than 50 meters. When transmitting USB2.0 signals via ethernet media, due to the limitations of the USB2.0 protocol, the high-speed USB2.0 device must return response data within 736 clocks after the USB2.0 host has sent the data, which determines that the length of the ethernet transmission media, such as RJ45 network cable or optical fiber, must not be too long, and the length will not exceed 100 meters at maximum, so that the response data can be returned in time within a specified time. However, with the optimization of the office environment and the simplification of office area equipment and the reduction of noise in recent years, the separation of human and machine is realized, the distance between the USB2.0 equipment and the host in the computer room in the office area is often hundreds of meters, and the existing USB2.0 remote transmission technology cannot meet the requirements. Based on the above, the invention provides a method for supporting USB2.0 ultra-long distance transmission.
Disclosure of Invention
In order to solve the above-mentioned problems in the prior art, that is, in order to solve the problem that the prior art cannot realize the remote transmission between the USB2.0 host and the USB2.0 device, the first aspect of the present invention proposes a method for supporting the USB2.0 ultra-remote transmission, for an apparatus for supporting the USB2.0 ultra-remote transmission, where the apparatus includes the USB2.0 host, the USB2.0 device, a TX box, and an RX box; the TX box is connected with the USB2.0 host through a USB interface, the RX box is connected with the USB2.0 device through a USB interface, and the TX box and the RX box are connected through an Ethernet; the method comprises the following steps:
after detecting that the device supporting the USB2.0 ultra-long distance transmission is powered on, the RX box completes negotiation with the USB2.0 equipment according to a negotiation flow set in a USB2.0 protocol; after the negotiation is completed, the RX box sends a network data packet to inform the TX box through the Ethernet;
after receiving the notification, the TX box simulates that the USB2.0 equipment is connected with the USB2.0 host, and negotiates with the USB2.0 host according to a negotiation flow set in a USB2.0 protocol;
after the TX box and the USB2.0 host are successfully negotiated, the USB2.0 host performs data transmission with the USB2.0 device through the TX box and the RX box.
In some preferred embodiments, the USB2.0 host performs data transmission with the USB2.0 device through the TX box, the RX box, and the method includes:
the TX box receives USB2.0 data to be transmitted sent by a USB2.0 host, and analyzes the USB2.0 data to be transmitted to obtain a transaction type and a transmission type corresponding to the USB2.0 data to be transmitted;
according to the transaction type and the transmission type, the TX box performs data interaction with the USB2.0 host according to a set data interaction strategy, and converts a transaction packet corresponding to the USB2.0 data to be transmitted into an Ethernet data format and sends the Ethernet data format to the RX box;
after receiving the transaction packet corresponding to the USB2.0 data to be transmitted, the RX box performs data interaction with the USB2.0 device according to a set data interaction strategy according to the transaction type corresponding to the transaction packet; after interaction, converting response data returned by the USB2.0 equipment into an Ethernet data format and sending the Ethernet data format to the TX box;
the TX box receives the response data sent by the RX box, processes the response data, and records the type and address information of the USB2.0 device connected downstream of the RX box.
In some preferred embodiments, the transaction types include: SETUP transactions, OUT transactions, IN transactions, PING transactions; the transmission types include: control transmission, bulk transmission, interrupt transmission, and synchronous transmission.
In some preferred embodiments, when the transaction type is a SETUP transaction, the data interaction policies set by the TX box and the RX box are:
after receiving the SETUP transaction packet, the TX box sends the SETUP transaction packet to the RX box through ethernet and replaces the USB2.0 device to reply response data to the USB2.0 host;
after receiving the SETUP transaction packet from the Ethernet, the RX box sends the SETUP transaction packet to the USB2.0 device through a USB interface; after the USB equipment returns response data, the RX box sends the response data to the TX box through the Ethernet;
after the response data is returned to the TX box, the TX box directly discards the response data.
In some preferred embodiments, when the transaction type is an OUT transaction, the data interaction policies set by the TX box and the RX box are:
if the transmission type is control transmission, batch transmission and interrupt transmission, after each micro frame receives a first OUT transaction packet, the TX box sends the OUT transaction packet to the RX box through the Ethernet, and replies response data waiting for the return of the OUT transaction packet to the USB2.0 host; after the RX box receives the OUT transaction packet from the Ethernet, the OUT transaction packet is sent to the USB2.0 device through a USB interface; after the USB2.0 equipment returns response data, the RX box sends the response data to the TX box through Ethernet;
if the transmission type is synchronous transmission, the TX box does not need to reply response data to the USB2.0 host, and the OUT transaction packet transmitted by the USB2.0 host is directly sent to the RX box through the Ethernet; and after the RX box receives the OUT transaction packet from the Ethernet, the OUT transaction packet is sent to the USB2.0 device through a USB interface.
In some preferred embodiments, after the response data returns to timeout, the USB2.0 host will retransmit the last unresponsive OUT transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies the response data waiting for the return of the OUT transaction packet to the USB2.0 host; after the response data is returned to the TX box, when the USB2.0 host retransmits the OUT transaction packet, the response data returned by the USB2.0 device is replied to the USB2.0 host;
wherein, in each micro frame, the TX box only sends the first OUT transaction packet to the RX box, and the OUT transaction packet retransmitted by the USB2.0 host due to timeout is filtered.
IN some preferred embodiments, when the transaction type is an IN transaction, the data interaction policies set by the TX box and the RX box are:
if the transmission type is control transmission, batch transmission and interrupt transmission, after receiving a first IN transaction packet IN each micro frame, the TX box sends the transaction packet to the RX box through the Ethernet, and replies response data waiting for the return of the IN transaction packet to the USB2.0 host; after the RX box receives the IN transaction packet from the Ethernet, the IN transaction packet is sent to the USB2.0 device through a USB interface; when the USB2.0 equipment returns data, the RX box replaces the USB2.0 host to reply the response data returned by the USB2.0 equipment, and sends the returned response data to the TX box through the Ethernet;
if the transmission type is synchronous transmission, the RX box does not need to replace the USB2.0 host to reply response data to the USB2.0 device, and when a first IN transaction packet of the USB2.0 host is received, the TX box directly replies a composite message with zero length of the USB2.0 host, and subsequent transmission directly uses response data returned by the last micro frame; for the response data returned by the last frame of USB2.0 equipment, discarding the response data through overtime; and after the RX box receives the IN transaction packet from the Ethernet, the IN transaction packet is sent to the USB2.0 device through a USB interface, and response data returned by the USB2.0 device is sent to the TX box through the Ethernet.
IN some preferred embodiments, after the response data returns to timeout, the USB2.0 host retransmits the last unresponsive IN transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies response data waiting for the return of an IN transaction packet to the USB2.0 host; after the response data is returned to the TX box, replying the response data returned by the USB2.0 equipment to the USB2.0 host when the USB2.0 host retransmits the IN transaction packet;
wherein, IN each micro frame, the TX box only sends the first IN transaction packet to the RX box, and the IN transaction packet retransmitted by the USB2.0 host after the timeout is filtered.
In some preferred embodiments, when the transaction type is PING, the data interaction policies set by the TX box and the RX box are:
after receiving the first PING transaction packet in each micro frame, the TX box sends the PING transaction packet to the RX box through the ethernet and replies response data waiting for the PING transaction packet to return to the USB2.0 host;
when the RX box receives a PING transaction packet from the Ethernet, the PING transaction packet is sent to the USB2.0 device through a USB interface;
after the USB2.0 device returns the response data, the RX box sends the response data to the TX box through ethernet.
In some preferred embodiments, after the response data returns to timeout, the USB2.0 host retransmits the last non-responding PING transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies the response data waiting for the return of the PING transaction packet to the USB2.0 host; after the response data is returned to the TX box, replying the response data returned by the USB2.0 equipment to the USB2.0 host when the USB2.0 host repeatedly sends PING transaction packets;
wherein, in each micro frame, the TX box only sends the first PING transaction packet to the RX box, and the PING transaction packet retransmitted by the USB2.0 host after the timeout is filtered.
The invention has the beneficial effects that:
the invention greatly prolongs the transmission distance between the USB2.0 host and the USB equipment.
According to the invention, on the basis of the application of the prior art, the ultra-long-distance USB data transmission between the USB2.0 host and the USB2.0 device can be realized by reasonably utilizing a data retransmission mechanism in the USB2.0 protocol without extra USB hub cascading or adding signal amplification equipment, the transmission distance is more than any multiple of the transmission distance of a common transmission mode by means of an Ethernet medium, and the transmission distance between the USB2.0 host and the USB device can be greatly prolonged.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings.
FIG. 1 is a flow chart of a method for supporting USB2.0 ultra-long range transmission according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a device supporting USB2.0 ultra-long range transmission according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
The invention relates to a method for supporting USB2.0 ultra-long distance transmission, which is used for a device for supporting USB2.0 ultra-long distance transmission, and comprises a USB2.0 host, USB2.0 equipment, a TX box and an RX box; the TX box is connected with the USB2.0 host through a USB interface, the RX box is connected with the USB2.0 device through a USB interface, and the TX box and the RX box are connected through an Ethernet; as shown in fig. 1, the method comprises the steps of:
after detecting that the device supporting the USB2.0 ultra-long distance transmission is powered on, the RX box completes negotiation with the USB2.0 equipment according to a negotiation flow set in a USB2.0 protocol; after the negotiation is completed, the RX box sends a network data packet to inform the TX box through the Ethernet;
after receiving the notification, the TX box simulates that the USB2.0 equipment is connected with the USB2.0 host, and negotiates with the USB2.0 host according to a negotiation flow set in a USB2.0 protocol;
after the TX box and the USB2.0 host are successfully negotiated, the USB2.0 host performs data transmission with the USB2.0 device through the TX box and the RX box.
In order to more clearly describe a method for supporting USB2.0 ultra-long range transmission of the present invention, each step of an embodiment of the method of the present invention will be described in detail with reference to the accompanying drawings.
The invention relates to a method for supporting USB2.0 ultra-long distance transmission, which is used for a device for supporting USB2.0 ultra-long distance transmission, and comprises a USB2.0 host, USB2.0 equipment, a TX box and an RX box; as shown in fig. 2;
the TX box is connected with the USB2.0 host through a USB interface, the RX box is connected with the USB2.0 device through a USB interface, and the TX box and the RX box are connected through an Ethernet. The system comprises a TX box, a RX box and a USB2.0 device, wherein the TX box is configured to conduct data interaction with the USB2.0 host according to a data interaction strategy provided by the invention, convert data required to be sent to the RX box into an Ethernet data format and send the Ethernet data to the RX box, receive the Ethernet data sent by the RX box, and record the type and address information of the USB2.0 device connected downstream of the RX box.
The RX box is configured to perform data interaction with the USB2.0 device according to the data interaction strategy provided by the invention, convert the data required to be sent to the TX box into an Ethernet data format and send the Ethernet data to the TX box, and receive the Ethernet data sent by the TX box.
In addition, the Ethernet data interaction content between the TX box and the RX box contains some state information between the TX box and the RX box and the box itself besides the original USB data.
It should be noted that, in the device for supporting USB2.0 ultra-long distance transmission provided in the foregoing embodiment, only the division of the foregoing functional modules is illustrated, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the modules or steps in the foregoing embodiment of the present invention are further decomposed or combined, for example, the modules in the foregoing embodiment may be combined into one module, or may be further split into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps related to the embodiments of the present invention are merely for distinguishing the respective modules or steps, and are not to be construed as unduly limiting the present invention.
The USB2.0 host performs data transmission with the USB2.0 device through the TX box (USB 2.0 host transmitting end) and the RX box (USB 2.0 device receiving end), and the specific workflow is as follows:
after detecting that the device supporting the ultra-long distance transmission of the USB2.0 is powered on, the RX box completes negotiation with the USB2.0 device according to a negotiation flow set in the USB2.0 protocol (the negotiation flow is in the prior art, and can refer to chapter 7 of the USB2.0 protocol in particular); after the negotiation is completed, the RX box sends a network data packet to inform the TX box through the Ethernet;
after receiving the notification, the TX box simulates that the USB2.0 equipment is connected with the USB2.0 host, and negotiates with the USB2.0 host according to a negotiation flow set in a USB2.0 protocol;
after the TX box and the USB2.0 host negotiate successfully, the USB2.0 host performs data transmission with the USB2.0 device through the TX box and the RX box:
the TX box receives USB2.0 data to be transmitted sent by a USB2.0 host, and analyzes the USB2.0 data to be transmitted to obtain a transaction type and a transmission type corresponding to the USB2.0 data to be transmitted; the transaction types include: SETUP transactions, OUT transactions, IN transactions, PING transactions; the transmission types include: control transmission, batch transmission, interrupt transmission and synchronous transmission;
according to the transaction type and the transmission type, the TX box performs data interaction with the USB2.0 host according to a set data interaction strategy, and converts a transaction packet corresponding to the USB2.0 data to be transmitted into an Ethernet data format and sends the Ethernet data format to the RX box;
after receiving the transaction packet corresponding to the USB2.0 data to be transmitted, the RX box performs data interaction with the USB2.0 device according to a set data interaction strategy according to the transaction type corresponding to the transaction packet; after interaction, converting response data returned by the USB2.0 equipment into an Ethernet data format and sending the Ethernet data format to the TX box;
the TX box receives the response data sent by the RX box, processes the response data, and records the type and address information of the USB2.0 device connected downstream of the RX box.
When the transaction type is a SETUP transaction, the data interaction policies set by the TX box and the RX box are:
when a SETUP transaction is transmitted, after receiving a SETUP transaction packet, the TX box sends the SETUP transaction packet to the RX box through ethernet and replaces the USB2.0 device to reply response data to the USB2.0 host; after receiving the SETUP transaction packet from the Ethernet, the RX box sends the SETUP transaction packet to the USB2.0 device through a USB interface; after the USB equipment returns response data, the RX box sends the response data to the TX box through the Ethernet; after the response data is returned to the TX box, the TX box directly discards the response data.
When the transaction type is OUT transaction, the data interaction strategy correspondingly set by the TX box and the RX box is as follows:
if the transmission type is control transmission, batch transmission and interrupt transmission, after each micro frame (one micro frame in high-speed USB transmission, the time is 125 us) receives a first OUT transaction packet, the TX box sends the OUT transaction packet to the RX box through the Ethernet, and replies response data waiting for the return of the OUT transaction packet to the USB2.0 host; after the RX box receives the OUT transaction packet from the Ethernet, the OUT transaction packet is sent to the USB2.0 device through a USB interface;
after the USB2.0 equipment returns response data, the RX box sends the response data to the TX box through Ethernet; in each micro frame, the TX box only sends a first OUT transaction packet to the RX box, and the OUT transaction packet retransmitted by the USB2.0 host due to timeout is filtered; after the response data returns overtime, the USB2.0 host retransmits the last unresponsive OUT transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies the response data waiting for the return of the OUT transaction packet to the USB2.0 host; after the response data is returned to the TX box, when the USB2.0 host retransmits the OUT transaction packet, the response data returned by the USB2.0 device is replied to the USB2.0 host.
If the transmission type is synchronous transmission, the USB2.0 host does not have overtime retransmission, and the TX box does not need to reply response data to the USB2.0 host, and the OUT transaction packet transmitted by the USB2.0 host is directly sent to the RX box through the Ethernet; and after the RX box receives the OUT transaction packet from the Ethernet, the OUT transaction packet is sent to the USB2.0 device through a USB interface.
When the transaction type is an IN transaction, the data interaction strategy correspondingly set by the TX box and the RX box is as follows:
if the transmission type is control transmission, batch transmission and interrupt transmission, after receiving a first IN transaction packet IN each micro frame, the TX box sends the transaction packet to the RX box through the Ethernet, and replies response data waiting for the return of the IN transaction packet to the USB2.0 host; after the RX box receives the IN transaction packet from the Ethernet, the IN transaction packet is sent to the USB2.0 device through a USB interface; when the USB2.0 equipment returns data, the RX box replaces the USB2.0 host to reply the response data returned by the USB2.0 equipment, and sends the returned response data to the TX box through the Ethernet;
when the response data returns to overtime, the USB2.0 host computer retransmits the last unresponsive IN transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies response data waiting for the return of an IN transaction packet to the USB2.0 host; after the response data is returned to the TX box, replying the response data returned by the USB2.0 equipment to the USB2.0 host when the USB2.0 host retransmits the IN transaction packet; wherein, IN each micro frame, the TX box only sends the first IN transaction packet to the RX box, and the IN transaction packet retransmitted by the USB2.0 host after the timeout is filtered.
If the transmission type is synchronous transmission, the RX box does not need to replace the USB2.0 host to reply response data to the USB2.0 device, when receiving a first IN transaction packet of the USB2.0 host, the TX box directly replies a composite message with zero length of the USB2.0 host, and subsequent transmission directly uses response data returned by the last micro frame (namely, after the TX box subsequently receives an IN transaction packet sent by the USB2.0 host, if the response data returned by the last micro frame of the device of the USB2.0 at this time already reaches the TX box, the TX box directly replies to the USB2.0 host by using the response data returned by the last micro frame); for the response data returned by the last frame of USB2.0 equipment, discarding the response data through overtime; and after the RX box receives the IN transaction packet from the Ethernet, the IN transaction packet is sent to the USB2.0 device through a USB interface, and response data returned by the USB2.0 device is sent to the TX box through the Ethernet.
When the transaction type is PING transaction, the data interaction policy set correspondingly by the TX box and the RX box is:
after receiving the first PING transaction packet in each micro frame, the TX box sends the PING transaction packet to the RX box through the ethernet and replies response data waiting for the PING transaction packet to return to the USB2.0 host; when the RX box receives a PING transaction packet from the Ethernet, the PING transaction packet is sent to the USB2.0 device through a USB interface; after the USB2.0 device returns the response data, the RX box sends the response data to the TX box through ethernet.
After the response data returns to overtime, the USB2.0 host retransmits the PING transaction packet which is not responded at the last time; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies the response data waiting for the return of the PING transaction packet to the USB2.0 host; after the response data is returned to the TX box, replying the response data returned by the USB2.0 equipment to the USB2.0 host when the USB2.0 host repeatedly sends PING transaction packets; wherein, in each micro frame, the TX box only sends the first PING transaction packet to the RX box, and the PING transaction packet retransmitted by the USB2.0 host after the timeout is filtered.
In addition, the USB2.0 protocol provides that the USB2.0 host can make multiple retransmissions due to a wait timeout caused by the busy device. In the above strategy, as long as the data responded by the USB device returns to the TX box before the last retransmission of the USB host, normal transmission can be completed according to the USB2.0 protocol. According to the strategy, when the USB2.0 signal is transmitted by the Ethernet medium, the transmission distance can be more than any times of the common transparent transmission mode by the Ethernet medium, and the data transmission distance between the USB2.0 host and the device can be greatly prolonged.
Those of skill in the art will appreciate that the various illustrative modules, method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the program(s) corresponding to the software modules, method steps, may be embodied in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation is not intended to be limiting.
The terms "first," "second," "third," and the like, are used for distinguishing between similar objects and not for describing a particular sequential or chronological order.
Thus far, the technical solution of the present invention has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will fall within the scope of the present invention.

Claims (9)

1. A method for supporting USB2.0 ultra-long distance transmission is used for a device for supporting USB2.0 ultra-long distance transmission, and the device comprises a USB2.0 host and USB2.0 equipment; the device supporting USB2.0 ultra-long distance transmission is characterized by further comprising a TX box and an RX box; the TX box is connected with the USB2.0 host through a USB interface, the RX box is connected with the USB2.0 device through a USB interface, and the TX box and the RX box are connected through an Ethernet; the method comprises the following steps:
after detecting that the device supporting the USB2.0 ultra-long distance transmission is powered on, the RX box completes negotiation with the USB2.0 equipment according to a negotiation flow set in a USB2.0 protocol; after the negotiation is completed, the RX box sends a network data packet to inform the TX box through the Ethernet;
after receiving the notification, the TX box simulates that the USB2.0 equipment is connected with the USB2.0 host, and negotiates with the USB2.0 host according to a negotiation flow set in a USB2.0 protocol;
after the TX box and the USB2.0 host are successfully negotiated, the USB2.0 host performs data transmission with the USB2.0 device through the TX box and the RX box;
the TX box receives USB2.0 data to be transmitted sent by a USB2.0 host, and analyzes the USB2.0 data to be transmitted to obtain a transaction type and a transmission type corresponding to the USB2.0 data to be transmitted;
the transaction types include: SETUP transactions, OUT transactions, IN transactions, PING transactions;
when the transaction type is a SETUP transaction, the data interaction policies set correspondingly by the TX box and the RX box are as follows:
after receiving the SETUP transaction packet, the TX box sends the SETUP transaction packet to the RX box through ethernet and replaces the USB2.0 device to reply response data to the USB2.0 host;
after receiving the SETUP transaction packet from the Ethernet, the RX box sends the SETUP transaction packet to the USB2.0 device through a USB interface; after the USB2.0 equipment returns response data, the RX box sends the response data to the TX box through the Ethernet;
after the response data is returned to the TX box, the TX box directly discards the response data.
2. The method for supporting ultra-long range transmission of USB2.0 according to claim 1, wherein said USB2.0 host performs data transmission with said USB2.0 device through said TX box, said RX box, and the method comprises:
according to the transaction type and the transmission type, the TX box performs data interaction with the USB2.0 host according to a set data interaction strategy, and converts a transaction packet corresponding to the USB2.0 data to be transmitted into an Ethernet data format and sends the Ethernet data format to the RX box;
after receiving the transaction packet corresponding to the USB2.0 data to be transmitted, the RX box performs data interaction with the USB2.0 device according to a set data interaction strategy according to the transaction type corresponding to the transaction packet; after interaction, converting response data returned by the USB2.0 equipment into an Ethernet data format and sending the Ethernet data format to the TX box;
the TX box receives the response data sent by the RX box, processes the response data, and records the type and address information of the USB2.0 device connected downstream of the RX box.
3. The method for supporting USB2.0 ultra-long range transmission according to claim 1, wherein the transmission type comprises: control transmission, bulk transmission, interrupt transmission, and synchronous transmission.
4. The method for supporting USB2.0 ultra-long range transmission according to claim 3, wherein when the transaction type is OUT transaction, the data interaction policies set by the TX box and the RX box respectively are:
if the transmission type is control transmission, batch transmission and interrupt transmission, after each micro frame receives a first OUT transaction packet, the TX box sends the OUT transaction packet to the RX box through the Ethernet, and replies response data waiting for the return of the OUT transaction packet to the USB2.0 host; after the RX box receives the OUT transaction packet from the Ethernet, the OUT transaction packet is sent to the USB2.0 device through a USB interface; after the USB2.0 equipment returns response data, the RX box sends the response data to the TX box through Ethernet;
if the transmission type is synchronous transmission, the TX box does not need to reply response data to the USB2.0 host, and the OUT transaction packet transmitted by the USB2.0 host is directly sent to the RX box through the Ethernet; and after the RX box receives the OUT transaction packet from the Ethernet, the OUT transaction packet is sent to the USB2.0 device through a USB interface.
5. The method of claim 4, wherein after a response data return timeout, the USB2.0 host retransmits the last unresponsive OUT transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies the response data waiting for the return of the OUT transaction packet to the USB2.0 host; after the response data is returned to the TX box, when the USB2.0 host retransmits the OUT transaction packet, the response data returned by the USB2.0 device is replied to the USB2.0 host;
wherein, in each micro frame, the TX box only sends the first OUT transaction packet to the RX box, and the OUT transaction packet retransmitted by the USB2.0 host due to timeout is filtered.
6. The method for supporting USB2.0 ultra-long range transmission according to claim 3, wherein when the transaction type is an IN transaction, the data interaction policies set by the TX box and the RX box respectively are:
if the transmission type is control transmission, batch transmission and interrupt transmission, after receiving a first IN transaction packet IN each micro frame, the TX box sends the transaction packet to the RX box through the Ethernet, and replies response data waiting for the return of the IN transaction packet to the USB2.0 host; after the RX box receives the IN transaction packet from the Ethernet, the IN transaction packet is sent to the USB2.0 device through a USB interface; when the USB2.0 equipment returns data, the RX box replaces the USB2.0 host to reply the response data returned by the USB2.0 equipment, and sends the returned response data to the TX box through the Ethernet;
if the transmission type is synchronous transmission, the RX box does not need to replace the USB2.0 host to reply response data to the USB2.0 device, and when a first IN transaction packet of the USB2.0 host is received, the TX box directly replies a composite message with zero length of the USB2.0 host, and subsequent transmission directly uses response data returned by the last micro frame; for the response data returned by the last frame of USB2.0 equipment, discarding the response data through overtime; and after the RX box receives the IN transaction packet from the Ethernet, the IN transaction packet is sent to the USB2.0 device through a USB interface, and response data returned by the USB2.0 device is sent to the TX box through the Ethernet.
7. The method of claim 6, wherein after a response data return timeout, the USB2.0 host retransmits the last unresponsive IN transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies response data waiting for the return of an IN transaction packet to the USB2.0 host; after the response data is returned to the TX box, replying the response data returned by the USB2.0 equipment to the USB2.0 host when the USB2.0 host retransmits the IN transaction packet;
wherein, IN each micro frame, the TX box only sends the first IN transaction packet to the RX box, and the IN transaction packet retransmitted by the USB2.0 host after the timeout is filtered.
8. The method for supporting USB2.0 ultra-long range transmission according to claim 3, wherein when the transaction type is PING transaction, the data interaction policies set by the TX box and the RX box are:
after receiving the first PING transaction packet in each micro frame, the TX box sends the PING transaction packet to the RX box through the ethernet and replies response data waiting for the PING transaction packet to return to the USB2.0 host;
when the RX box receives a PING transaction packet from the Ethernet, the PING transaction packet is sent to the USB2.0 device through a USB interface;
after the USB2.0 device returns the response data, the RX box sends the response data to the TX box through ethernet.
9. The method for supporting USB2.0 ultra-long range transmission according to claim 8, wherein after the response data return times out, the USB2.0 host retransmits the last non-responding PING transaction packet; if the response data is not returned to the TX box during retransmission of the USB2.0 host, the TX box replies the response data waiting for the return of the PING transaction packet to the USB2.0 host; after the response data is returned to the TX box, replying the response data returned by the USB2.0 equipment to the USB2.0 host when the USB2.0 host repeatedly sends PING transaction packets;
wherein, in each micro frame, the TX box only sends the first PING transaction packet to the RX box, and the PING transaction packet retransmitted by the USB2.0 host after the timeout is filtered.
CN202211007402.5A 2022-08-22 2022-08-22 Method for supporting USB2.0 ultra-long distance transmission Active CN115328837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211007402.5A CN115328837B (en) 2022-08-22 2022-08-22 Method for supporting USB2.0 ultra-long distance transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211007402.5A CN115328837B (en) 2022-08-22 2022-08-22 Method for supporting USB2.0 ultra-long distance transmission

Publications (2)

Publication Number Publication Date
CN115328837A CN115328837A (en) 2022-11-11
CN115328837B true CN115328837B (en) 2023-04-25

Family

ID=83926543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211007402.5A Active CN115328837B (en) 2022-08-22 2022-08-22 Method for supporting USB2.0 ultra-long distance transmission

Country Status (1)

Country Link
CN (1) CN115328837B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015669A1 (en) * 2004-06-30 2006-01-19 Engler Michael G System for extending length of a connection to a USB device
US20050138229A1 (en) * 2003-12-23 2005-06-23 Sartore Ronald H. Method and apparatus for remote operation of a USB peripheral
CN103178872B (en) * 2013-04-11 2016-03-16 江苏沁恒股份有限公司 Method and the device of USB system transfers distance is extended by Ethernet
TWM504272U (en) * 2015-03-13 2015-07-01 Asix Electronics Corp Universal serial bus (USB) KVM extender
CN106654770B (en) * 2016-12-30 2018-11-20 深圳朗田亩半导体科技有限公司 General-purpose serial bus USB extended line
CN107332619B (en) * 2017-08-09 2024-10-22 广东启鼎光电科技有限公司 USB3.1 HUB based on optical fiber long-distance transmission
CN210324192U (en) * 2019-08-30 2020-04-14 江苏都万电子科技有限公司 USB long-distance transmission device

Also Published As

Publication number Publication date
CN115328837A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN100366029C (en) Communication controller, host-side controller, communication equipment, communication system and method
US8225020B2 (en) Method and system for hardware based implementation of USB 1.1 over a high speed link
EP1155370B1 (en) Method and apparatus for extending the range of the universal serial bus protocol
EP2316075B1 (en) Method and apparatus for connecting usb devices to a remote computer
US6298406B1 (en) Method of and apparatus for detecting direction of reception of bus packets and controlling direction of transmission of bus packets within an IEEE 1394 serial bus node
CN115328837B (en) Method for supporting USB2.0 ultra-long distance transmission
CN113726592B (en) Transmission delay test method, system and related components of edge server
CN114189445B (en) USB signal transparent transmission processing method, device, terminal and storage medium
CN103001939A (en) FTP (file transfer protocol) server, FTP server processing method and FTP transmission system
CN212009372U (en) Industrial control data fusion acquisition system
CN108429741A (en) A kind of method and system for realizing NCSI agreements
CN118413583B (en) IPMI protocol rapid transmission method and related equipment
US6366590B2 (en) Unified interface between an IEEE 1394-1995 serial bus transaction layer and corresponding applications
JP2004513418A (en) Standard device interface
CN206515825U (en) A kind of system of visitor's malicious sabotage initial data when preventing exchanging visit between network
JP4003421B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, COMMUNICATION DEVICE PROGRAM, AND COMMUNICATION DEVICE RECORDING MEDIUM
JP4060761B2 (en) Optical transmission device and electronic device including the same
CN116414741A (en) Storage device management method
JPS5860842A (en) Optical data bus system for aircraft
CN115695176A (en) Method for configuring physical interface chip and related device
CN112235322A (en) Tcp transmission method and system thereof
CN104518934A (en) Bus interconnection method, apparatus and system
CN116233213A (en) Data transmission method, node and system
KR200239091Y1 (en) Ieee1394 ohci card
CN114201419A (en) Control equipment, data transparent transmission method of control equipment and data transparent transmission system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant