CN102169469A - Circuit and method for communication among devices based on USB disk - Google Patents
Circuit and method for communication among devices based on USB disk Download PDFInfo
- Publication number
- CN102169469A CN102169469A CN2011100869329A CN201110086932A CN102169469A CN 102169469 A CN102169469 A CN 102169469A CN 2011100869329 A CN2011100869329 A CN 2011100869329A CN 201110086932 A CN201110086932 A CN 201110086932A CN 102169469 A CN102169469 A CN 102169469A
- Authority
- CN
- China
- Prior art keywords
- client
- host
- usb
- usb disk
- circuit
- 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
Links
Images
Abstract
The invention embodiment provides a circuit and method for communication among devices based on a USB disk; the method comprises the following steps of: modifying a CLIENT USB disk hardware interface and a relative driver to change a data file of the CLIENT on a storage space of a local USB disk, then forcibly notifying a HOST to receive the changed data file by using the CLIENT, thereby, realizing the intercommunication of the CLIENT device and the HOST device on the premise of a standard-compliant USB disk interface and a communication protocol.
Description
Technical field
The embodiment of the invention relates generally to the embedded computer technology application, particularly utilizing virtual USB disk and FAT file system to realize between embedded device and the embedded device circuit and the method for embedded device and host computer intercommunication under the embedded computer hardware environment.
Background technology
At present, the USB disk is widely used, and nearly all computer operating system all includes the USB disk driver.If therefore adopt USB disk interface and communication protocol in conjunction with general file system host-host protocol, the two-way communication that realizes between embedded device and the embedded device, exchanges mutually based on data file between embedded device and host computer, thereby can avoid equipment room owing to operating system version difference, different corresponding corresponding driving program or the communication protocols of installing of needs that cause of application program, realize good interaction, bring great convenience in the use will for the user.But because in the USB of standard disk interface and communication protocol, the USB disk interface is divided into " HOST " host side and " CLIENT " client-side, the storage space of USB disk is mapped in " CLIENT " client-side.The mode that " HOST " host side can adopt file to download, USB disk interface by standard and communication protocol change the data on the storage space that is positioned at " CLIENT " client-side USB disk easily, realize the data transmission from " HOST " host side to " CLIENT " client-side.And " CLIENT " client-side since be subjected to the USB disk communication protocol of standard and operating system in the restriction of data in magnetic disk cache management mechanism, the data on the storage space of local USB disk change can't notify " HOST " host side in time.Cause to utilize USB disk interface and communication protocol to realize intercommunication mutually between " CLIENT " client-side equipment and " HOST " host side equipment.
Summary of the invention
In view of this, the embodiment of the invention has proposed a kind of circuit and method of the equipment intercommunication based on the USB disk.By modification to " CLIENT " client-side USB disk hardware interface circuit and related driver programs, realize that " CLIENT " client-side is after the change of the data file on the storage space of local USB disk, " CLIENT " client-side can force notice " HOST " host side equipment to receive, thereby realizes the intercommunication mutually under the prerequisite of the USB of compatibility standard disk interface and communication protocol between " CLIENT " client-side equipment and " HOST " host side equipment.
The embodiment of the invention solves the technical scheme that its technical matters adopts:
Revise " CLIENT " client-side USB disk hardware interface circuit and related driver programs, after making on its storage space that the relevant data of preparing to be transferred to " HOST " host side equipment is left in local USB disk by the disk file system prescribed form at " CLIENT " client-side equipment, in the following operation of " CLIENT " client-side device start:
If " D+ " port of local " CLIENT " client-side USB hardware interface device can not onlinely be defined as under the situation of GPIO output state immediately, revise the interlock circuit of local " CLIENT " client-side USB hardware interface device, the GPIO pin of " CLIENT " client-side processor is defined as the output control signal, another GPIO pin is defined as the low level output pin, with of the switching of former " CLIENT " client-side USB " D+ " port, form new USB port " D+ " port by two-way Port Multiplier.By the output control signal of this client-side new USB port " D+ " port and former USB " D+ " port are connected at ordinary times, do not influenced the operate as normal of former USB " D+ " port.Connect new USB port " D+ " port and low level output GPIO by the output control signal of this client-side this moment, forces this port output low level.
If " D+ " of local " CLIENT " client-side USB hardware interface device can be by under the online situation that is defined as the GPIO output state immediately, then above-mentioned steps is reduced to: with the online GPIO output terminal that is defined as immediately of " D+ " port of " CLIENT " client-side USB hardware interface device of this locality, and make this port be output as electronegative potential, make " D+ " port of local " CLIENT " client-side USB hardware interface device be output as electronegative potential.
" D+ " port output low level of keeping local " CLIENT " client-side USB hardware interface device is more than 20 milliseconds.According to the USB disk interface of standard and the relevant agreement in the communication protocol, the Equipment Inspection of " HOST " host side is to just at connected " CLIENT " client-side USB " D+ " when port is output as constant low level, can be considered as " CLIENT " client computer is forced to withdraw, " HOST " host side disk interface program will be closed corresponding disk buffering district, withdraw from and the USB disk connection status of being somebody's turn to do " CLIENT " client-side, enter idle condition.
Reset local " CLIENT " client-side USB hardware interface, make " D+ " port output state of its USB hardware interface recover normal usb communication state.Should " D+ " port can present this moment and draw output on the high level.According to the USB disk interface of standard and the relevant agreement in the communication protocol, if " HOST " host side equipment detects USB " D+ " port that is connected to " CLIENT " client-side and exports when becoming high level under idle condition, can be considered as " CLIENT " client-side and insert the USB disk again, " HOST " host side program USB disk loading procedure that will restart to be correlated with at this moment, and again the USB data in magnetic disk (FAT table, root directory etc.) after upgrading is read in the disk buffering district.And " HOST " host side can leave renewal and change that the file attribute (filename, extension name, modification time or the like) of making an appointment in " CLIENT " client-side USB disk space is taken place by inspection in, instant new USB data in magnetic disk file is uploaded read in, thereby finishes the active data transmission of " CLIENT " client-side equipment to " HOST " host side equipment.
The beneficial effect of the embodiment of the invention is, by the hardware and software program of " CLIENT " client-side USB disk interface is changed, under the prerequisite of the USB of compatibility standard disk interface and communication protocol, realize between USB disk " CLIENT " client devices and " HOST " host side equipment intercommunication mutually based on data file operation.
Description of drawings
In order more to advance clearly to illustrate the technical scheme of the embodiment of the invention, will do the accompanying drawing of required use in describing among the embodiment below and briefly introduce.
Fig. 1 shows the embodiment of the invention " CLIENT " client-side hardware circuit and revises synoptic diagram.
Fig. 2 shows the manner of execution process flow diagram of the embodiment of the invention.
Embodiment
" HOST " host side equipment is constant according to the USB disk interface and the communication protocol mode of standard to the downlink data transmission flow process of " CLIENT " client-side equipment.Fig. 2 shows the transmitting uplink data mode schematic flow sheet 100 of " CLIENT " client-side equipment to " HOST " host side equipment.
In Fig. 2, at first Ben Di " CLIENT " client-side is connected with " HOST " host side hardware and finishes device initialize [step C110], [step H110] and set up the USB disk by software protocol respectively and is connected [step C120], [step H120].When uploading data transmission and beginning, local " CLIENT " client-side will be prepared the data file that transmits, and with the form of disk file, form is stored in the storage space of USB disk of this locality [step C130] by appointment.Force definition to be converted into constant low level output state " D+ " port of " CLIENT " client-side USB hardware interface device of this locality then, and time-delay keep more than 20 milliseconds [step C140].According to the USB disk interface of standard and the relevant agreement in the communication protocol, the Equipment Inspection of " HOST " host side is to just at connected " CLIENT " client-side USB " D+ " when port is output as constant low level, can be considered as " CLIENT " client computer is forced to withdraw, " HOST " host side disk interface program will be closed corresponding disk buffering district, withdraw from the USB disk connection status of being somebody's turn to do " CLIENT " client-side and enter idle condition [step H130].
" D+ " port that local " CLIENT " client-side USB hardware interface device then is set reverts to normal operating conditions [step C150].Should " D+ " port can present this moment and draw high level output.According to the USB disk interface of standard and the relevant agreement in the communication protocol, " HOST " host side equipment detects USB " D+ " port that is connected to " CLIENT " client-side and exports when becoming noble potential under idle condition, can be considered as " CLIENT " client computer inserts again, " HOST " host side program will restart to carry out device initialize [step C160] at this moment, [step H140] with set up the USB disk and be connected [step C170], a series of USB disk loading procedures such as [step H150], and again (the FAT table of the USB data in magnetic disk after upgrading, root directory etc.) read in the disk buffering district.And " HOST " host side can leave renewal and change that the file attribute (filename, extension name, modification time or the like) of making an appointment in " CLIENT " client-side USB disk space is taken place by inspection in, and instant new USB data in magnetic disk file is uploaded read in [step H160].Thereby finish the active data transmission of local " CLIENT " client-side equipment to " HOST " host side equipment.
Above-mentionedly be illustrated as preferred embodiment of the present invention, in order to restriction the present invention, all in the spirit and principles in the present invention, any modification of being done, replacement, improvement etc. all should not be included within protection scope of the present invention.
Claims (4)
1. circuit and method based on the communication between devices of USB disk is characterized in that comprising:
" CLIENT " client-side interface circuit to the USB disk unit is made amendment, and makes it under normal USB disk unit connection status the attribute and the state of its USB of forcibly changing able to programme " D+ " port.Thereby be implemented in " CLIENT " client-side and handle and control the USB disk unit connection status of being somebody's turn to do " CLIENT " client-side and " HOST " host side.
2. the circuit and the method for the communication between devices based on the USB disk according to claim 1 is characterized in that also comprising:
" CLIENT " client-side program of USB disk unit can be passed through interlock circuit, force its USB " D+ " port to enter constant low level output state, thereby make this " CLIENT " client-side withdraw from USB disk unit connection status with " HOST " host side.
3. the circuit and the method for the communication between devices based on the USB disk according to claim 1 is characterized in that also comprising:
" CLIENT " client-side program of USB disk unit can be passed through interlock circuit, force its USB " D+ " port to return to normal usb communication state, thereby make the USB disk unit of " HOST " host side recover to set up the normal connection status that is connected with this " CLIENT " client-side USB disk unit again from constant low level output state.
4. the circuit and the method for the communication between devices based on the USB disk according to claim 1 is characterized in that also comprising:
The application program of " HOST " host side, can leave renewal and change that the file attribute (filename, extension name, modification time or the like) of making an appointment in " CLIENT " client-side USB disk space is taken place by inspection in, instant new USB data in magnetic disk file is uploaded read in, thereby finishes the active data transmission of " CLIENT " client-side equipment to " HOST " host side equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100869329A CN102169469A (en) | 2011-04-07 | 2011-04-07 | Circuit and method for communication among devices based on USB disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100869329A CN102169469A (en) | 2011-04-07 | 2011-04-07 | Circuit and method for communication among devices based on USB disk |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102169469A true CN102169469A (en) | 2011-08-31 |
Family
ID=44490633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011100869329A Pending CN102169469A (en) | 2011-04-07 | 2011-04-07 | Circuit and method for communication among devices based on USB disk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102169469A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2783391Y (en) * | 2004-02-09 | 2006-05-24 | 联想(北京)有限公司 | Plug-pull free multi-state USB device |
CN101373399A (en) * | 2008-09-22 | 2009-02-25 | 华硕电脑股份有限公司 | Electronic device with mobile communication and control method thereof |
-
2011
- 2011-04-07 CN CN2011100869329A patent/CN102169469A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2783391Y (en) * | 2004-02-09 | 2006-05-24 | 联想(北京)有限公司 | Plug-pull free multi-state USB device |
CN101373399A (en) * | 2008-09-22 | 2009-02-25 | 华硕电脑股份有限公司 | Electronic device with mobile communication and control method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20050209842A1 (en) | Remote USB port system and method | |
US7519749B1 (en) | Redirecting input and output for multiple computers | |
CN105357273B (en) | SOCKET communications and management of process general-purpose platform and method under asynchronous communication model | |
CN104199723B (en) | Camera mapping method based on virtual equipment | |
EP2474913A1 (en) | USB device switching working mode | |
WO2008111448A1 (en) | Server function switching device, method and program, and thin client system and server device | |
WO2008014647A1 (en) | A maintenance method for the capability management object, capability management method, the system and the terminal thereof | |
TW200703022A (en) | Internet SCSI communication via UNDI services | |
GB2498045A (en) | Portable storage devices with two interfaces for coupling to a display and a host | |
CN108874428A (en) | A kind of remote upgrade method of refrigerator controller control software | |
CN103095703B (en) | A kind of method, equipment and system realizing network and serial port data interactive | |
CN104735123A (en) | Mass storage virtualization for cloud computing | |
CN102799545A (en) | Usb device remote control method and system | |
CN103279314B (en) | Have virtual unit window operation transmitting device and transmission system | |
CN201878181U (en) | Intelligent home system | |
CN102724305A (en) | Method for remotely accessing to terminal U (universal serial bus) flash disk | |
CN101763324B (en) | Method for realizing equipment simulating and device thereof | |
CN103902377A (en) | Terminal device and operating state synchronization method of terminal device | |
CN104090792B (en) | The dynamic loading method of logical file in a kind of broadband access network | |
CN102736926A (en) | Upgrade method, device and batch upgrade system based on task template | |
CN101833463A (en) | Method and system for updating data card firmware | |
CN103888283A (en) | SCTP communication method and device | |
CN102169469A (en) | Circuit and method for communication among devices based on USB disk | |
WO2008029974A1 (en) | Application framework system for distribution and migration of application | |
CN108874106A (en) | A kind of BMC power control system, method and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
DD01 | Delivery of document by public notice |
Addressee: Chai Ke Document name: Notification of Publication of the Application for Invention |
|
DD01 | Delivery of document by public notice | ||
DD01 | Delivery of document by public notice |
Addressee: Chai Ke Document name: Notification of before Expiration of Request of Examination as to Substance |
|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110831 |