CN103973534A - Method and device for simulating sharing of USB flash disk - Google Patents

Method and device for simulating sharing of USB flash disk Download PDF

Info

Publication number
CN103973534A
CN103973534A CN201410232039.6A CN201410232039A CN103973534A CN 103973534 A CN103973534 A CN 103973534A CN 201410232039 A CN201410232039 A CN 201410232039A CN 103973534 A CN103973534 A CN 103973534A
Authority
CN
China
Prior art keywords
usb
controller
data
equipment
control command
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.)
Pending
Application number
CN201410232039.6A
Other languages
Chinese (zh)
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201410232039.6A priority Critical patent/CN103973534A/en
Publication of CN103973534A publication Critical patent/CN103973534A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The embodiment of the invention discloses a method for simulating sharing of a USB flash disk, which is used for realizing online data exchange and file sharing, does not need to copy data in a mode of manually plugging and unplugging the USB flash disk, has simple operation process and greatly improves the efficiency of data exchange. The method provided by the embodiment of the invention comprises the following steps: the USB main controller receives main bus data from the first equipment through a first channel; the USB master controller analyzes the control instruction information into a control command and sends the control command to the USB slave controller, so that the USB slave controller responds to corresponding operation according to the control command; the USB master controller forwards the transmission data to the USB slave controller, so that the USB slave controller sends the transmission data to the second equipment through a second channel; the USB slave controller receives slave bus data from the second device through the second channel; the USB slave controller forwards the slave bus data to the USB master controller, so that the USB master controller sends the slave bus data to the first device through the first channel.

Description

A kind of simulation USB flash disk is shared method and equipment
Technical field
The present invention relates to the communications field, relate in particular to a kind of simulation USB flash disk and share method and equipment.
Background technology
USB interface with its plug and play, hot plug, conveniently transmission is quite subject to user's favor, all can see the equipment with USB interface in existing many product facilities.And USB interface need to be used usb bus agreement conventionally.
Usb bus belongs to a kind of polling type bus, the transfer of data that host computer control port initialization is all.Each bus activity transmits at most three packets, comprises token (Token), data (Data), contact (HandShake).According to the principle making before transmission, in the time that each transmission starts, main frame send a usb data bag of describing kind, direction, USB device address and the terminal number of transmission action, and this packet is commonly called token packet (TokenPacket).USB device is taken out one's own data from the appropriate location of decoded packet.Data transfer direction is not.
But, in the time all needing to transmit data between the equipment with USB interface for two, cannot utilize USB interface to carry out online swap data, realize file-sharing, can only use USB flash disk (USB flash drive) by the mode of artificial plug, the data in an equipment to be copied, then copy on an other equipment, operating process is loaded down with trivial details, the inefficiency of exchanges data.
Summary of the invention
The embodiment of the present invention provides a kind of simulation USB flash disk to share method and equipment, can realize online swap data, file-sharing, and without carrying out copies data by the mode of artificial plug USB flash disk, operating process is simple, greatly improves the efficiency of exchanges data.
The one simulation USB flash disk that the embodiment of the present invention provides is shared method, comprising:
The first equipment and USB master controller are set up taking usb bus agreement as basic first passage;
The second equipment and USB set up taking usb bus agreement as basic second channel from controller;
USB master controller receives the main bus data from described the first equipment by described first passage, and described main bus data comprise control command information and transmission data;
USB master controller is control command by described control command information analysis, and sends to described USB from controller described control command, and described USB is operated according to described control command response accordingly from controller;
USB master controller to described USB from controller, makes described USB, from controller, described transmission data be sent to described the second equipment through described second channel described transmission data retransmission;
USB from controller by described second channel receive from described the second equipment from bus data;
USB is forwarded to described USB master controller by described from bus data from controller, makes described USB master controller send to described first equipment from bus data through described first passage by described.
Alternatively, USB master controller is that control command specifically comprises by described control command information analysis:
USB master controller is control command according to described usb bus agreement by described control command information analysis.
Alternatively, USB master controller specifically comprises described transmission data retransmission from controller to described USB:
USB master controller by parallel bus by described transmission data retransmission to described USB from controller.
Alternatively, USB is forwarded to described USB master controller from bus data and specifically comprises described from controller:
USB is forwarded to described USB master controller by described from bus data by parallel bus from controller.
Alternatively, USB master controller specifically comprises described transmission data retransmission from controller to described USB:
Described transmission data and relevant information are packaged into packet by USB master controller;
USB master controller by described package forward to described USB from controller.
Alternatively, described method also comprises:
The first equipment and USB master controller were set up taking usb bus agreement before basic first passage, and described the first equipment carries out USB enumeration operation;
The second equipment and USB set up taking usb bus agreement before basic second channel from controller, and described the second equipment carries out USB enumeration operation.
The one simulation USB flash disk shared device that the embodiment of the present invention provides, comprising:
USB master controller, USB is from controller;
Described USB master controller comprises: first sets up module, master data receiver module, parsing sending module, master data forwarding module;
Described first sets up module, for setting up taking usb bus agreement as basic first passage with the first equipment;
Described master data receiver module, for receiving the main bus data from described the first equipment by described first passage, described main bus data comprise control command information and transmission data;
Described parsing sending module, for being control command by described control command information analysis, and sends to described USB from controller described control command, make described USB from controller according to the corresponding operation of described control command response;
Described master data forwarding module, for by described transmission data retransmission to described USB from controller, make described USB, from controller, described transmission data be sent to described the second equipment through described second channel;
Described USB comprises from controller: second set up module, from data reception module, from data forwarding module;
Described second sets up module, for setting up taking usb bus agreement as basic second channel with the second equipment;
Described from data reception module, for receive by described second channel from described the second equipment from bus data;
Described from data forwarding module, for being forwarded to described USB master controller by described from bus data, make described USB master controller send to described first equipment from bus data through described first passage by described.
Alternatively, described parsing sending module specifically comprises:
Resolution unit, for being control command according to described usb bus agreement by described control command information analysis;
Transmitting element, for sending to described USB from controller described control command, makes described USB operate accordingly according to described control command response from controller.
Alternatively, described master data forwarding module specifically comprises:
The first packaged unit, for being packaged into packet by described transmission data and relevant information;
The first retransmission unit, for by parallel bus by described package forward to described USB from controller, make described USB, from controller, described packet be sent to described the second equipment through described second channel.
Alternatively, describedly specifically comprise from data forwarding module:
The second packaged unit, for being packaged into from packet from bus data and relevant information described;
The second retransmission unit, for by parallel bus by described from package forward to described USB master controller, make described USB master controller describedly to pass through described first passage from packet and send to described the first equipment.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, the first equipment and USB master controller are set up taking usb bus agreement as basic first passage; The second equipment and USB set up taking usb bus agreement as basic second channel from controller; USB master controller receives the main bus data from described the first equipment by described first passage, and described main bus data comprise control command information and transmission data; USB master controller is control command by described control command information analysis, and sends to described USB from controller described control command, and described USB is operated according to described control command response accordingly from controller; USB master controller to described USB from controller, makes described USB, from controller, described transmission data be sent to described the second equipment through described second channel described transmission data retransmission; USB from controller by described second channel receive from described the second equipment from bus data; USB is forwarded to described USB master controller by described from bus data from controller, makes described USB master controller send to described first equipment from bus data through described first passage by described.In embodiments of the present invention, between the first equipment and the second equipment, can be that basic transmission channel (first passage and second channel) and USB master controller, USB realize online swap data, file-sharing from controller by usb bus agreement, without carrying out copies data by the mode of artificial plug USB flash disk, operating process is simple, greatly improves the efficiency of exchanges data.
Brief description of the drawings
Fig. 1 is that in the embodiment of the present invention, a kind of simulation USB flash disk is shared embodiment flow chart of method;
Fig. 2 is that in the embodiment of the present invention, a kind of simulation USB flash disk is shared another embodiment flow chart of method;
Fig. 3 is example structure figure of a kind of simulation USB flash disk shared device in the embodiment of the present invention;
Fig. 4 is a kind of another example structure of simulation USB flash disk shared device figure in the embodiment of the present invention;
Fig. 5 is embodiment schematic diagram of a kind of simulation USB flash disk shared system in the embodiment of the present invention;
Fig. 6 is a kind of another embodiment schematic diagram of simulation USB flash disk shared system in the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of simulation USB flash disk to share method and equipment, and for realizing online swap data, file-sharing, without carrying out copies data by the mode of artificial plug USB flash disk, operating process is simple, greatly improves the efficiency of exchanges data.
For making goal of the invention of the present invention, feature, advantage can be more obvious and understandable, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, the embodiments described below are only the present invention's part embodiment, but not whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, in the embodiment of the present invention, the shared embodiment of method of a kind of simulation USB flash disk comprises:
101, the first equipment and USB master controller are set up taking usb bus agreement as basic first passage;
First, the first equipment and USB master controller can be set up taking usb bus agreement as basic first passage.
102, the second equipment and USB set up taking usb bus agreement as basic second channel from controller;
First, the second equipment and USB can set up taking usb bus agreement as basic second channel from controller.It should be noted that, step 101 can be exchanged with the order of step 102.
103, USB master controller receives the main bus data from this first equipment by this first passage;
Setting up after this first passage, USB master controller can receive the main bus data from this first equipment by this first passage, and these main bus data comprise control command information and transmission data.Be understandable that, main bus data can comprise control command information and transmission data, also can only include control command information, also can only include transmission data.
104, USB master controller is control command by this control command information analysis, and sends to this USB from controller this control command, and this USB is operated according to this control command response accordingly from controller;
After USB master controller receives these main bus data, USB master controller can be control command by this control command information analysis, and send to this USB from controller this control command, this USB is operated according to this control command response accordingly from controller.
105, USB master controller, by this transmission data retransmission to this USB from controller, makes this USB, from controller, these transmission data be sent to this second equipment through this second channel;
After USB master controller receives these main bus data, USB master controller can be by this transmission data retransmission to this USB from controller, makes this USB, from controller, these transmission data be sent to this second equipment through this second channel.
106, USB from controller by this second channel receive from this second equipment from bus data;
Setting up after this second channel, USB from controller can by this second channel receive from this second equipment from bus data.
107, USB should be forwarded to this USB master controller from bus data from controller, made this USB master controller to send to this first equipment through this first passage from bus data.
Receive this at USB after bus data from controller, USB can will should be forwarded to this USB master controller from bus data from controller, made this USB master controller to send to this first equipment through this first passage from bus data.
In the present embodiment, before said a kind of simulation USB flash disk share method step and be: the first equipment and USB master controller are set up taking usb bus agreement as basic first passage; The second equipment and USB set up taking usb bus agreement as basic second channel from controller; USB master controller receives the main bus data from this first equipment by this first passage, and these main bus data comprise control command information and transmission data; USB master controller is control command by this control command information analysis, and sends to this USB from controller this control command, and this USB is operated according to this control command response accordingly from controller; USB master controller to this USB from controller, makes this USB, from controller, these transmission data be sent to this second equipment through this second channel this transmission data retransmission; USB from controller by this second channel receive from this second equipment from bus data; USB should be forwarded to this USB master controller from bus data from controller, made this USB master controller to send to this first equipment through this first passage from bus data.In the present embodiment, between the first equipment and the second equipment, can be that basic transmission channel (first passage and second channel) and USB master controller, USB realize online swap data, file-sharing from controller by usb bus agreement, without carrying out copies data by the mode of artificial plug USB flash disk, operating process is simple, greatly improves the efficiency of exchanges data.
For ease of understanding, one simulation USB flash disk in the embodiment of the present invention is shared to method below and be described in detail, refer to Fig. 2, in the embodiment of the present invention, shared another embodiment of method of a kind of simulation USB flash disk comprises:
201, the first equipment carries out USB enumeration operation;
The first equipment and USB master controller were set up taking usb bus agreement before basic first passage, and this first equipment carries out USB enumeration operation.It should be noted that, it is to carry out at equipment (comprising the first equipment and the second equipment) and miscellaneous equipment the preparation that USB needs between being connected that USB enumerates, and belongs to known technology, no longer describes in detail herein.
202, the second equipment carries out USB enumeration operation;
The second equipment and USB set up taking usb bus agreement before basic second channel from controller, and this second equipment carries out USB enumeration operation.It should be noted that, it is to carry out at equipment (comprising the first equipment and the second equipment) and miscellaneous equipment the preparation that USB needs between being connected that USB enumerates, and belongs to known technology, no longer describes in detail herein.
203, the first equipment and USB master controller are set up taking usb bus agreement as basic first passage;
First, the first equipment and USB master controller can be set up taking usb bus agreement as basic first passage.
204, the second equipment and USB set up taking usb bus agreement as basic second channel from controller;
First, the second equipment and USB can set up taking usb bus agreement as basic second channel from controller.It should be noted that, step 203 can be exchanged with the order of step 204.
205, USB master controller receives the main bus data from this first equipment by this first passage;
Setting up after this first passage, USB master controller can receive the main bus data from this first equipment by this first passage, and these main bus data comprise control command information and transmission data.Be understandable that, main bus data can comprise control command information and transmission data, also can only include control command information, also can only include transmission data.
206, USB master controller is control command according to this usb bus agreement by this control command information analysis;
USB master controller, after receiving these main bus data, can be control command by the control command information analysis in these main bus data according to this usb bus agreement.Be understandable that, this first passage is set up according to usb bus agreement, and therefore this control command information is write or assigned according to usb bus agreement, so just can make this USB master controller of first passage one end read this control command information.But, this USB master controller and USB not set up according to usb bus agreement from the transmission of signaling between controller, therefore if desired control USB by this control command information and carry out corresponding operating from controller, needing USB master controller is control command according to this usb bus agreement by this control command information analysis, and this control command can be read and carry out from controller by USB.
207, send to this USB from controller this control command, this USB is operated according to this control command response accordingly from controller;
USB master controller is after control command according to this usb bus agreement by this control command information analysis, this control command can be sent to this USB from controller, make this USB from controller according to the corresponding operation of this control command response.
208, these transmission data and relevant information are packaged into packet by USB master controller;
USB master controller, after receiving these main bus data, can be packaged into packet by these transmission data and relevant information.Be understandable that, here above-mentioned relevant information can be that USB master controller and USB are from mutual needed authentication information between controller, also can be the state information of USB master controller, this state information can show the operating state that USB master controller is current etc., is not construed as limiting herein.
209, USB master controller by parallel bus by this package forward to this USB from controller, make this USB, from controller, this packet be sent to this second equipment through this second channel;
After USB master controller receives these main bus data, USB master controller can be by parallel bus by this package forward to this USB from controller, make this USB, from controller, this packet be sent to this second equipment through this second channel.It should be noted that, parallel bus refer to adopt parallel convey mode at USB master controller and USB from transmitting the passage of data between controller.
210, USB from controller by this second channel receive from this second equipment from bus data;
Setting up after this second channel, USB from controller can by this second channel receive from this second equipment from bus data.
211, USB should be forwarded to this USB master controller from controller from bus data by parallel bus, made this USB master controller to send to this first equipment through this first passage from bus data.
Receive this at USB after bus data from controller, USB can should be forwarded to this USB master controller from bus data by parallel bus from controller, made this USB master controller to send to this first equipment through this first passage from bus data.It should be noted that, parallel bus refer to adopt parallel convey mode at USB master controller and USB from transmitting the passage of data between controller.
For ease of understanding, according to the described embodiment of Fig. 2, with a practical application scene, a kind of simulation USB flash disk in the embodiment of the present invention is shared to method below and is described:
A: the first computer and USB master controller carry out physical connection, and second computer and USB carry out physical connection from controller;
B: the first computer and second computer all carry out USB enumeration operation;
After C:USB enumeration operation completes, the first computer and USB master controller are set up taking usb bus agreement as basic first passage, and second computer and USB set up taking usb bus agreement as basic second channel from controller;
D: now, after establishing first passage and second channel, the first computer and second computer can carry out exchanges data or file-sharing by USB master controller and USB from controller indirectly
E: if desired analog mouse equipment, the first computer can write the analog information of mouse device in built-in software program, the information such as the cursor address that these analog informations comprise mouse and corresponding time, then the first computer is transmitted to second computer by USB master controller and USB from controller by these analog informations, second computer receives after these analog informations, can think that these analog informations are sended over by mouse device, then carry out corresponding operation according to these analog informations, the mouse action of second computer is carried out according to these analog informations, and do not need to use real mouse device, thereby the first computer is by coordinating with USB master controller and USB the function that realizes analog mouse equipment from controller,
F: if desired simulate USB camera device, the first computer can write the analogue data of USB camera device in built-in software program, these analogue datas comprise image, time marking, video recording etc., then the first computer is transmitted to second computer by USB master controller and USB from controller by these analogue datas, second computer receives after these analogue datas, can think that these analogue datas are sended over by USB camera device, then carry out corresponding operation according to these analogue datas, and do not need to use real USB camera device, thereby the first computer is by coordinating with USB master controller and USB the function that realizes simulation USB camera device from controller.
Above step e, F are two kinds of application scenarioss enumerating, and that concrete application can have is a variety of, no longer specifically describe in detail herein.
Mainly described a kind of simulation USB flash disk above and shared method, will simulate USB flash disk shared device to one below and be described in detail, referred to Fig. 3, in the embodiment of the present invention, embodiment of a kind of simulation USB flash disk shared device comprises:
USB master controller 30, USB is from controller 31;
This USB master controller 30 comprises: first sets up module 301, master data receiver module 302, parsing sending module 303, master data forwarding module 304;
This first sets up module 301, for setting up taking usb bus agreement as basic first passage with the first equipment;
This master data receiver module 302, for receiving the main bus data from this first equipment by this first passage, these main bus data comprise control command information and transmission data;
This parsing sending module 303, for being control command by this control command information analysis, and sends to this USB from controller 31 this control command, make this USB from controller 31 according to the corresponding operation of this control command response;
This master data forwarding module 304, for by this transmission data retransmission to this USB from controller 31, make this USB, from controller 31, this transmission data be sent to this second equipment through this second channel;
This USB comprises from controller 31: second set up module 311, from data reception module 312, from data forwarding module 313;
This second sets up module 311, for setting up taking usb bus agreement as basic second channel with the second equipment;
Should be from data reception module 312, for receive by this second channel from this second equipment from bus data;
Should, from data forwarding module 313, for being forwarded to this USB master controller 30 from bus data, make this USB master controller 30 to send to this first equipment through this first passage from bus data.
In the present embodiment, first sets up module 301 and the first equipment is set up taking usb bus agreement as basic first passage, second sets up module 311 and the second equipment is set up taking usb bus agreement as basic second channel simultaneously.Then, master data receiver module 302 receives the main bus data from this first equipment by this first passage, resolving sending module 303 is control command by this control command information analysis, and send to this USB from controller 31 this control command, this USB is operated according to this control command response accordingly from controller 31.Then, master data forwarding module 304 to this USB from controller 31, makes this USB, from controller 31, these transmission data be sent to this second equipment through this second channel this transmission data retransmission.Another side, from data reception module 312 by this second channel receive from this second equipment from bus data, then, should be forwarded to this USB master controller 30 from bus data from data forwarding module 313, and make this USB master controller 30 to send to this first equipment through this first passage from bus data.In the present embodiment, between the first equipment and the second equipment, can be that basic transmission channel (first passage and second channel) and USB master controller 30, USB realize online swap data, file-sharing from controller 31 by usb bus agreement, without carrying out copies data by the mode of artificial plug USB flash disk, operating process is simple, greatly improves the efficiency of exchanges data.
For ease of understanding, below a kind of simulation USB flash disk shared device in the embodiment of the present invention is described in detail, refer to Fig. 4, in the embodiment of the present invention, a kind of another embodiment of simulation USB flash disk shared device comprises:
USB master controller 40, USB is from controller 41;
This USB master controller 40 comprises: first sets up module 401, master data receiver module 402, parsing sending module 403, master data forwarding module 404;
This first sets up module 401, for setting up taking usb bus agreement as basic first passage with the first equipment;
This master data receiver module 402, for receiving the main bus data from this first equipment by this first passage, these main bus data comprise control command information and transmission data;
This parsing sending module 403, for being control command by this control command information analysis, and sends to this USB from controller 41 this control command, make this USB from controller 41 according to the corresponding operation of this control command response;
This master data forwarding module 404, for by this transmission data retransmission to this USB from controller 41, make this USB, from controller 41, this transmission data be sent to this second equipment through this second channel;
This USB comprises from controller 41: second set up module 411, from data reception module 412, from data forwarding module 413;
This second sets up module 411, for setting up taking usb bus agreement as basic second channel with the second equipment;
Should be from data reception module 412, for receive by this second channel from this second equipment from bus data;
Should, from data forwarding module 413, for being forwarded to this USB master controller 40 from bus data, make this USB master controller 40 to send to this first equipment through this first passage from bus data.
In the present embodiment, this parsing sending module 403 specifically comprises:
Resolution unit 4031, for being control command according to this usb bus agreement by this control command information analysis;
Transmitting element 4032, for sending to this USB from controller 41 this control command, makes this USB operate accordingly according to this control command response from controller 41.
In the present embodiment, this master data forwarding module 404 specifically comprises:
The first packaged unit 4041, for being packaged into packet by these transmission data and relevant information;
The first retransmission unit 4042, for by parallel bus by this package forward to this USB from controller 41, make this USB, from controller 41, this packet be sent to this second equipment through this second channel.
In the present embodiment, should specifically comprise from data forwarding module 413:
The second packaged unit 4131, for being packaged into from packet from bus data and relevant information;
The second retransmission unit 4132, for should be from package forward to this USB master controller 40 by parallel bus, makes this USB master controller 40 to send to this first equipment through this first passage from packet.
Mainly described a kind of simulation USB flash disk shared device above, below one simulation USB flash disk shared system has been described, referred to Fig. 5, in the embodiment of the present invention, embodiment of a kind of simulation USB flash disk shared system comprises:
The first equipment 501 in any embodiment corresponding to Fig. 3 and Fig. 4 and simulation USB flash disk shared device 502;
This first equipment 501 drives this simulation USB flash disk shared device 502 for the driving service by preset, and sets up taking usb bus agreement as basic interface channel with this simulation USB flash disk shared device 502;
This simulation USB flash disk shared device 502, for receiving the main bus data from this first equipment 501, operates and forwards transmission data in these main bus data to the second equipment accordingly according to the control command information response in these main bus data;
This simulation USB flash disk shared device 502, also for receive from this second equipment from bus data, and should be transmitted to this first equipment 501 from bus data.
For ease of understanding, according to the described embodiment of Fig. 5, with a practical application scene, a kind of simulation USB flash disk shared system in the embodiment of the present invention is described below:
As shown in Figure 6, read-write USB flash disk equipment 61 communicates with simulation USB flash disk shared device 601 by usb bus A62, and the simulation USB flash disk of the data that receive from usb bus A62 being processed and be transmitted to computer system 602 by another usb bus B63 is driven service by simulation USB flash disk shared device 601.Simulation USB flash disk drives service to process the data that receive, access USB flash disk data mapping according to predefined USB mass-memory unit agreement (Universal Serial Bus Mass Storage Class), and respond the instruction of these agreements.For example, simulation USB flash disk drive service reception to command request while reading the data of USB flash disk sector, simulating USB flash disk drives service to read the data of USB flash disk data mapping respective sectors, and send to simulation USB flash disk shared device 601 by usb bus B63, then data processing in simulation USB flash disk shared device 601 forwards service data is carried out respective handling and are transmitted to read-write USB flash disk equipment 61 through another usb bus A62.Finally, what read-write USB flash disk equipment 61 was accessed by usb bus is exactly the system of a similar common U disk, simulates USB flash disk shared system 60.
It should be noted that, simulation USB flash disk shared system 60 can API (API) by driving service to carry out process communication with simulation USB flash disk, the access right of control to USB flash disk data mapping.For example, 1, initiatively connect or disconnect simulation USB flash disk shared system 60 and read and write being connected of USB flash disk equipment 61, Here it is is equivalent to plug the operation of USB flash disk; 2, carry or unloading USB flash disk data mapping are in computer system 602, and when USB flash disk data mapping is mounted to after computer system 602, computer system 602 just can directly be accessed all data in USB flash disk data mapping by file resource management device.
Those skilled in the art can be well understood to, for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, when actual realization, can have other dividing mode, for example multiple unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in multiple network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If described integrated unit is realized and during as production marketing independently or use, can be stored in a computer read/write memory medium using the form of SFU software functional unit.Based on such understanding, the all or part of of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, read-only memory (ROM, Read-OnlyMemory), the various media that can be program code stored such as random access memory (RAM, Random Access Memory), magnetic disc or CD.
The above, above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these amendments or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. simulation USB flash disk is shared a method, it is characterized in that, comprising:
The first equipment and USB master controller are set up taking usb bus agreement as basic first passage;
The second equipment and USB set up taking usb bus agreement as basic second channel from controller;
USB master controller receives the main bus data from described the first equipment by described first passage, and described main bus data comprise control command information and transmission data;
USB master controller is control command by described control command information analysis, and sends to described USB from controller described control command, and described USB is operated according to described control command response accordingly from controller;
USB master controller to described USB from controller, makes described USB, from controller, described transmission data be sent to described the second equipment through described second channel described transmission data retransmission;
USB from controller by described second channel receive from described the second equipment from bus data;
USB is forwarded to described USB master controller by described from bus data from controller, makes described USB master controller send to described first equipment from bus data through described first passage by described.
2. method according to claim 1, is characterized in that, USB master controller is that control command specifically comprises by described control command information analysis:
USB master controller is control command according to described usb bus agreement by described control command information analysis.
3. method according to claim 1, is characterized in that, USB master controller specifically comprises described transmission data retransmission from controller to described USB:
USB master controller by parallel bus by described transmission data retransmission to described USB from controller.
4. method according to claim 1, is characterized in that, USB is forwarded to described USB master controller from bus data and specifically comprises described from controller:
USB is forwarded to described USB master controller by described from bus data by parallel bus from controller.
5. method according to claim 1, is characterized in that, USB master controller specifically comprises described transmission data retransmission from controller to described USB:
Described transmission data and relevant information are packaged into packet by USB master controller;
USB master controller by described package forward to described USB from controller.
6. according to the method described in any one in claim 1 to 5, it is characterized in that, described method also comprises:
The first equipment and USB master controller were set up taking usb bus agreement before basic first passage, and described the first equipment carries out USB enumeration operation;
The second equipment and USB set up taking usb bus agreement before basic second channel from controller, and described the second equipment carries out USB enumeration operation.
7. a simulation USB flash disk shared device, is characterized in that, comprising:
USB master controller, USB is from controller;
Described USB master controller comprises: first sets up module, master data receiver module, parsing sending module, master data forwarding module;
Described first sets up module, for setting up taking usb bus agreement as basic first passage with the first equipment;
Described master data receiver module, for receiving the main bus data from described the first equipment by described first passage, described main bus data comprise control command information and transmission data;
Described parsing sending module, for being control command by described control command information analysis, and sends to described USB from controller described control command, make described USB from controller according to the corresponding operation of described control command response;
Described master data forwarding module, for by described transmission data retransmission to described USB from controller, make described USB, from controller, described transmission data be sent to described the second equipment through described second channel;
Described USB comprises from controller: second set up module, from data reception module, from data forwarding module;
Described second sets up module, for setting up taking usb bus agreement as basic second channel with the second equipment;
Described from data reception module, for receive by described second channel from described the second equipment from bus data;
Described from data forwarding module, for being forwarded to described USB master controller by described from bus data, make described USB master controller send to described first equipment from bus data through described first passage by described.
8. simulation USB flash disk shared device according to claim 7, is characterized in that, described parsing sending module specifically comprises:
Resolution unit, for being control command according to described usb bus agreement by described control command information analysis;
Transmitting element, for sending to described USB from controller described control command, makes described USB operate accordingly according to described control command response from controller.
9. simulation USB flash disk shared device according to claim 7, is characterized in that, described master data forwarding module specifically comprises:
The first packaged unit, for being packaged into packet by described transmission data and relevant information;
The first retransmission unit, for by parallel bus by described package forward to described USB from controller, make described USB, from controller, described packet be sent to described the second equipment through described second channel.
10. simulation USB flash disk shared device according to claim 7, is characterized in that, describedly specifically comprises from data forwarding module:
The second packaged unit, for being packaged into from packet from bus data and relevant information described;
The second retransmission unit, for by parallel bus by described from package forward to described USB master controller, make described USB master controller describedly to pass through described first passage from packet and send to described the first equipment.
CN201410232039.6A 2014-05-28 2014-05-28 Method and device for simulating sharing of USB flash disk Pending CN103973534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410232039.6A CN103973534A (en) 2014-05-28 2014-05-28 Method and device for simulating sharing of USB flash disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410232039.6A CN103973534A (en) 2014-05-28 2014-05-28 Method and device for simulating sharing of USB flash disk

Publications (1)

Publication Number Publication Date
CN103973534A true CN103973534A (en) 2014-08-06

Family

ID=51242598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410232039.6A Pending CN103973534A (en) 2014-05-28 2014-05-28 Method and device for simulating sharing of USB flash disk

Country Status (1)

Country Link
CN (1) CN103973534A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159848A (en) * 2015-07-07 2015-12-16 江苏惠通集团有限责任公司 USB device control method, apparatus and system
CN106780828A (en) * 2016-11-29 2017-05-31 株洲壹星科技股份有限公司 A kind of dump system and dump method for dump locomotive vehicle-mounted data
CN112992261A (en) * 2019-12-17 2021-06-18 深圳市江波龙电子股份有限公司 Memory test system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6633933B1 (en) * 1999-09-30 2003-10-14 Oak Technology, Inc. Controller for ATAPI mode operation and ATAPI driven universal serial bus mode operation and methods for making the same
CN1645344A (en) * 2005-02-24 2005-07-27 李春柏 Shared terminal, host computer and use thereof
CN1704917A (en) * 2004-05-27 2005-12-07 深圳市朗科科技有限公司 Equipment, method and system for realizing equipment interconnection
CN102541793A (en) * 2011-12-26 2012-07-04 浙江大学 USB (universal serial bus) based high-speed dual-computer data exchange method and data exchange device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6633933B1 (en) * 1999-09-30 2003-10-14 Oak Technology, Inc. Controller for ATAPI mode operation and ATAPI driven universal serial bus mode operation and methods for making the same
CN1704917A (en) * 2004-05-27 2005-12-07 深圳市朗科科技有限公司 Equipment, method and system for realizing equipment interconnection
CN1645344A (en) * 2005-02-24 2005-07-27 李春柏 Shared terminal, host computer and use thereof
CN102541793A (en) * 2011-12-26 2012-07-04 浙江大学 USB (universal serial bus) based high-speed dual-computer data exchange method and data exchange device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159848A (en) * 2015-07-07 2015-12-16 江苏惠通集团有限责任公司 USB device control method, apparatus and system
CN105159848B (en) * 2015-07-07 2018-06-22 江苏惠通集团有限责任公司 USB device control method, device and system
CN106780828A (en) * 2016-11-29 2017-05-31 株洲壹星科技股份有限公司 A kind of dump system and dump method for dump locomotive vehicle-mounted data
CN112992261A (en) * 2019-12-17 2021-06-18 深圳市江波龙电子股份有限公司 Memory test system
CN112992261B (en) * 2019-12-17 2024-04-05 深圳市江波龙电子股份有限公司 Memory test system

Similar Documents

Publication Publication Date Title
US10969983B2 (en) Method for implementing NVME over fabrics, terminal, server, and system
CN100454283C (en) Dummy general serial bus apparatus system and its data transmission method
CN104202197A (en) Equipment management method and device
KR20110010707A (en) Direct data transfer between slave devices
CN103828332B (en) Data processing method, device, storage control and rack
US7506078B2 (en) Integrated circuit capable of assigning a unique identity to ATA/ATAPI devices
CN103473202B (en) USB OTG, electronic equipment and the method realizing OTG function
CN106126465B (en) A kind of data transmission method and device
CN106407145A (en) An interface access method and system and a memory card
CN103984662A (en) Method and device for reading and writing data and storage system
CN101645058B (en) Command processing method, command sending method, device and system
CN102681790B (en) A kind of data dump equipment and carried out the method and system of data dump by it
CN102591812A (en) Method for operating a computer system
CN103973534A (en) Method and device for simulating sharing of USB flash disk
US20110072168A1 (en) Data transfer system with different operating modes
CN104038550A (en) Data communication method and data communication device and storage system
CN115883022B (en) DMA transmission control method, apparatus, electronic device and readable storage medium
CN107643938A (en) Data transmission method, device and storage medium
CN104363269A (en) Methods and devices for transmitting and receiving NAS (network attached storage) data through FC (fiber channel) link
CN102523221A (en) Detection method of data message and network safety detection device
JP2014048810A (en) Host system, storage device and communication method
US9122806B2 (en) SATA data appliance for providing SATA hosts with access to a configurable number of SATA drives residing in a SAS topology
CN102694717A (en) Method, device and system for transmitting messages on PCIE bus
CN102929792B (en) Data movement method and system, memory device and main frame
CN103916276A (en) Device and system with multiple channel bound interfaces and rapid initializing method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140806